From b49f306bdfedf936c283d80c334264ce63219711 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 9 Aug 2004 21:05:48 +0000 Subject: [PATCH] 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 --- lib/Transforms/Scalar/InstructionCombining.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index eb4f1e31a6a..bf0f0e839d0 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -829,7 +829,7 @@ Instruction *InstCombiner::visitRem(BinaryOperator &I) { if (I.getType()->isSigned()) if (Value *RHSNeg = dyn_castNegVal(I.getOperand(1))) if (!isa(RHSNeg) || - cast(RHSNeg)->getValue() >= 0) { + cast(RHSNeg)->getValue() > 0) { // X % -Y -> X % Y AddUsesToWorkList(I); I.setOperand(1, RHSNeg);