diff options
Diffstat (limited to 'llvm/lib/IR/AutoUpgrade.cpp')
| -rw-r--r-- | llvm/lib/IR/AutoUpgrade.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp index 8fee0f35c35..468644314e3 100644 --- a/llvm/lib/IR/AutoUpgrade.cpp +++ b/llvm/lib/IR/AutoUpgrade.cpp @@ -601,8 +601,9 @@ static Value *upgradeMaskedCompare(IRBuilder<> &Builder, CallInst &CI, for (unsigned i = 0; i != NumElts; ++i) Indices[i] = i; for (unsigned i = NumElts; i != 8; ++i) - Indices[i] = NumElts; - Cmp = Builder.CreateShuffleVector(Cmp, UndefValue::get(Cmp->getType()), + Indices[i] = NumElts + i % NumElts; + Cmp = Builder.CreateShuffleVector(Cmp, + Constant::getNullValue(Cmp->getType()), Indices); } return Builder.CreateBitCast(Cmp, IntegerType::get(CI.getContext(), |

