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 | 34d9a177787f5f86e201d866140a10f5fecfd454 (patch) | |
| tree | 9092af12ec53e4b2b7fd490081c5190b554208eb /llvm/lib/VMCore | |
| parent | 1ca6ce5a226b97b8f381c9da79402a11fa0c1cdc (diff) | |
| download | bcm5719-llvm-34d9a177787f5f86e201d866140a10f5fecfd454.tar.gz bcm5719-llvm-34d9a177787f5f86e201d866140a10f5fecfd454.zip  | |
unbreak test/Bitcode/shuffle.ll.
llvm-svn: 149033
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/ConstantFold.cpp | 3 | 
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/ConstantFold.cpp b/llvm/lib/VMCore/ConstantFold.cpp index 9c2919ea1d8..f1b97dfce13 100644 --- a/llvm/lib/VMCore/ConstantFold.cpp +++ b/llvm/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();  | 

