Fix bad assert.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Jasper 2014-05-27 09:55:37 +00:00
parent 9bbb4066f8
commit ae85c73d4a

View File

@ -735,7 +735,8 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
auto EltTy = SelectorType->getElementType(); auto EltTy = SelectorType->getElementType();
unsigned Size = SelectorType->getNumElements(); unsigned Size = SelectorType->getNumElements();
unsigned BitWidth = EltTy->isFloatTy() ? 32 : (EltTy->isDoubleTy() ? 64 : EltTy->getIntegerBitWidth()); unsigned BitWidth = EltTy->isFloatTy() ? 32 : (EltTy->isDoubleTy() ? 64 : EltTy->getIntegerBitWidth());
assert(BitWidth == 64 || BitWidth == 32 || BitWidth == 8 && "Wrong arguments for variable blend intrinsic"); assert((BitWidth == 64 || BitWidth == 32 || BitWidth == 8) &&
"Wrong arguments for variable blend intrinsic");
SmallVector<Constant*, 32> Selectors; SmallVector<Constant*, 32> Selectors;
for (unsigned I = 0; I < Size; ++I) { for (unsigned I = 0; I < Size; ++I) {
// The intrinsics only read the top bit // The intrinsics only read the top bit