unbreak test/Bitcode/shuffle.ll.

llvm-svn: 149033
This commit is contained in:
Chris Lattner 2012-01-26 03:10:45 +00:00
parent 1ca6ce5a22
commit 34d9a17778
1 changed files with 3 additions and 0 deletions

View File

@ -787,6 +787,9 @@ Constant *llvm::ConstantFoldShuffleVectorInstruction(Constant *V1,
// Undefined shuffle mask -> undefined value.
if (isa<UndefValue>(Mask)) return UndefValue::get(V1->getType());
// Don't break the bitcode reader hack.
if (isa<ConstantExpr>(Mask)) return 0;
unsigned MaskNumElts = Mask->getType()->getVectorNumElements();
unsigned SrcNumElts = V1->getType()->getVectorNumElements();
Type *EltTy = V1->getType()->getVectorElementType();