mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-20 11:29:24 +00:00
Fix InstCombine/2004-08-09-RemInfLoop.llx
This should go into the 1.3 branch git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15593 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efd0149de9
commit
b49f306bdf
@ -829,7 +829,7 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) {
|
||||
if (I.getType()->isSigned())
|
||||
if (Value *RHSNeg = dyn_castNegVal(I.getOperand(1)))
|
||||
if (!isa<ConstantSInt>(RHSNeg) ||
|
||||
cast<ConstantSInt>(RHSNeg)->getValue() >= 0) {
|
||||
cast<ConstantSInt>(RHSNeg)->getValue() > 0) {
|
||||
// X % -Y -> X % Y
|
||||
AddUsesToWorkList(I);
|
||||
I.setOperand(1, RHSNeg);
|
||||
|
Loading…
Reference in New Issue
Block a user