summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2019-08-10 19:29:10 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2019-08-10 19:29:10 +0000
commit96474d17c618348487760893cfeb7199fd4a3c7c (patch)
tree1c001bec53700ee0265997e1eef4ce2403cd6f87 /llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
parent404e978f2721eb77894881d60a6175f4018182a2 (diff)
downloadbcm5719-llvm-96474d17c618348487760893cfeb7199fd4a3c7c.tar.gz
bcm5719-llvm-96474d17c618348487760893cfeb7199fd4a3c7c.zip
[InstCombine][NFC] Use SimplifyAddInst() instead of SimplifyBinOp(Instruction::BinaryOps::Add, )
llvm-svn: 368521
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
index f82a5b1806c..46294ad732a 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
@@ -3343,8 +3343,8 @@ foldShiftIntoShiftInAnotherHandOfAndInICmp(ICmpInst &I, const SimplifyQuery SQ,
}
// Can we fold (XShAmt+YShAmt) ?
- Value *NewShAmt = SimplifyBinOp(Instruction::BinaryOps::Add, XShAmt, YShAmt,
- SQ.getWithInstruction(&I));
+ Value *NewShAmt = SimplifyAddInst(XShAmt, YShAmt, /*IsNSW=*/false,
+ /*IsNUW=*/false, SQ.getWithInstruction(&I));
if (!NewShAmt)
return nullptr;
// Is the new shift amount smaller than the bit width?
OpenPOWER on IntegriCloud