Fix InstCombine/2004-08-09-RemInfLoop.llx

This should go into the 1.3 branch

llvm-svn: 15593
This commit is contained in:
Chris Lattner 2004-08-09 21:05:48 +00:00
parent cf5dd04f8b
commit 8e7260652b
1 changed files with 1 additions and 1 deletions

View File

@ -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);