[llvm] r368521 - [InstCombine][NFC] Use SimplifyAddInst() instead of SimplifyBinOp(Instruction::BinaryOps::Add, )
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 10 12:29:10 PDT 2019
Author: lebedevri
Date: Sat Aug 10 12:29:10 2019
New Revision: 368521
URL: http://llvm.org/viewvc/llvm-project?rev=368521&view=rev
Log:
[InstCombine][NFC] Use SimplifyAddInst() instead of SimplifyBinOp(Instruction::BinaryOps::Add, )
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp?rev=368521&r1=368520&r2=368521&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCompares.cpp Sat Aug 10 12:29:10 2019
@@ -3343,8 +3343,8 @@ foldShiftIntoShiftInAnotherHandOfAndInIC
}
// 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?
More information about the llvm-commits
mailing list