Skip to content

Commit

Permalink
[X86] Avoid "unused" warnings if no asserts
Browse files Browse the repository at this point in the history
llvm-svn: 282732
  • Loading branch information
snuglas committed Sep 29, 2016
1 parent eb0ba8d commit 3ace13a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits,
void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
Type *MaskTy = C->getType();
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
(void)MaskTySize;
assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512);

// The shuffle mask requires a byte vector.
Expand Down Expand Up @@ -136,6 +137,7 @@ void DecodeVPERMILPMask(const Constant *C, unsigned ElSize,
SmallVectorImpl<int> &ShuffleMask) {
Type *MaskTy = C->getType();
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
(void)MaskTySize;
assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512);
assert(ElSize == 32 || ElSize == 64);

Expand Down Expand Up @@ -171,6 +173,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
SmallVectorImpl<int> &ShuffleMask) {
Type *MaskTy = C->getType();
unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
(void)MaskTySize;
assert(MaskTySize == 128 || MaskTySize == 256);

// The shuffle mask requires elements the same size as the target.
Expand Down Expand Up @@ -221,8 +224,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize,
}

void DecodeVPPERMMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
Type *MaskTy = C->getType();
assert(MaskTy->getPrimitiveSizeInBits() == 128);
assert(C->getType()->getPrimitiveSizeInBits() == 128);

// The shuffle mask requires a byte vector.
SmallBitVector UndefElts;
Expand Down

0 comments on commit 3ace13a

Please sign in to comment.