From 9ef51728b60cb6cd1ff7789816beb88799f859f3 Mon Sep 17 00:00:00 2001 From: Douglas Katzman Date: Thu, 29 Sep 2016 17:26:12 +0000 Subject: [PATCH] [X86] Avoid "unused" warnings if no asserts git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282732 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86ShuffleDecodeConstantPool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp b/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp index 978619999ab..09c31455c42 100644 --- a/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp +++ b/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp @@ -98,6 +98,7 @@ static bool extractConstantMask(const Constant *C, unsigned MaskEltSizeInBits, void DecodePSHUFBMask(const Constant *C, SmallVectorImpl &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. @@ -136,6 +137,7 @@ void DecodeVPERMILPMask(const Constant *C, unsigned ElSize, SmallVectorImpl &ShuffleMask) { Type *MaskTy = C->getType(); unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits(); + (void)MaskTySize; assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512); assert(ElSize == 32 || ElSize == 64); @@ -171,6 +173,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize, SmallVectorImpl &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. @@ -221,8 +224,7 @@ void DecodeVPERMIL2PMask(const Constant *C, unsigned M2Z, unsigned ElSize, } void DecodeVPPERMMask(const Constant *C, SmallVectorImpl &ShuffleMask) { - Type *MaskTy = C->getType(); - assert(MaskTy->getPrimitiveSizeInBits() == 128); + assert(C->getType()->getPrimitiveSizeInBits() == 128); // The shuffle mask requires a byte vector. SmallBitVector UndefElts; -- 2.50.1