diff options
author | Chris Lattner <sabre@nondot.org> | 2012-01-26 03:10:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2012-01-26 03:10:45 +0000 |
commit | 29bb00b3c5dda58dabb57d016bd0c4099d37cd3b (patch) | |
tree | 0df6f5194bdda7a001e7abe4700ba57ab6b198b6 /lib/VMCore/ConstantFold.cpp | |
parent | 71a494d6974f5105f008601a3e7c7474bf508139 (diff) |
unbreak test/Bitcode/shuffle.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 9c2919ea1d..f1b97dfce1 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -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(); |