[X86] Fix an unused variable warning in released builds.
[oota-llvm.git] / lib / Target / X86 / Utils / X86ShuffleDecode.cpp
index a3729769901f74c514db10305d003c3273ddbe4d..4fdd527d87c8a8b8aef729b4c289f6b51a22348d 100644 (file)
@@ -308,8 +308,10 @@ void DecodePSHUFBMask(const Constant *C, SmallVectorImpl<int> &ShuffleMask) {
   //   <4 x i32> <i32 -2147483648, i32 -2147483648,
   //              i32 -2147483648, i32 -2147483648>
 
+#ifndef NDEBUG
   unsigned MaskTySize = MaskTy->getPrimitiveSizeInBits();
   assert(MaskTySize == 128 || MaskTySize == 256 || MaskTySize == 512);
+#endif
 
   // This is a straightforward byte vector.
   if (MaskTy->isVectorTy() && MaskTy->getVectorElementType()->isIntegerTy(8)) {