git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149033
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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();