diff options
author | Sanjay Patel <spatel@rotateright.com> | 2018-06-28 20:52:43 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2018-06-28 20:52:43 +0000 |
commit | d512853aa3cfd2fe5451f854ab8ba742ac9fe39b (patch) | |
tree | f3b52c6172a24308b0ebc5c44abc1c441b99823b | |
parent | 0b9629b286b43a00da29f5462d2c28d6779beb37 (diff) | |
download | bcm5719-llvm-d512853aa3cfd2fe5451f854ab8ba742ac9fe39b.tar.gz bcm5719-llvm-d512853aa3cfd2fe5451f854ab8ba742ac9fe39b.zip |
[InstCombine] fix opcode check in shuffle fold
There's no way to expose this difference currently,
but we should use the updated variable because the
original opcodes can go stale if we transform into
something new.
llvm-svn: 335920
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 458b0f02e15..d4fb0863c33 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -1199,7 +1199,7 @@ static Instruction *foldSelectShuffles(ShuffleVectorInst &Shuf) { // If the shuffle mask contains undef elements, then the new constant // vector will have undefs in those lanes. This could cause the entire // binop to be undef. - if (B0->isIntDivRem()) + if (Instruction::isIntDivRem(BOpc)) NewC = getSafeVectorConstantForIntDivRem(NewC); Instruction *NewBO = ConstantsAreOp1 ? BinaryOperator::Create(BOpc, X, NewC) : |