From: Chris Lattner Date: Thu, 26 Jan 2012 03:10:45 +0000 (+0000) Subject: unbreak test/Bitcode/shuffle.ll. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=29bb00b3c5dda58dabb57d016bd0c4099d37cd3b;p=oota-llvm.git unbreak test/Bitcode/shuffle.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149033 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 9c2919ea1d8..f1b97dfce13 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(Mask)) return UndefValue::get(V1->getType()); + // Don't break the bitcode reader hack. + if (isa(Mask)) return 0; + unsigned MaskNumElts = Mask->getType()->getVectorNumElements(); unsigned SrcNumElts = V1->getType()->getVectorNumElements(); Type *EltTy = V1->getType()->getVectorElementType();