summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-08-09 21:05:48 +0000
committerChris Lattner <sabre@nondot.org>2004-08-09 21:05:48 +0000
commit8e7260652bda2a93bdb2d7454c1927ea451f9f3e (patch)
treeee30bb0fe344aa305371bbc1a3425a990943ec52 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp
parentcf5dd04f8b229cd8969b79c18381ccaa2728b52a (diff)
downloadbcm5719-llvm-8e7260652bda2a93bdb2d7454c1927ea451f9f3e.tar.gz
bcm5719-llvm-8e7260652bda2a93bdb2d7454c1927ea451f9f3e.zip
Fix InstCombine/2004-08-09-RemInfLoop.llx
This should go into the 1.3 branch llvm-svn: 15593
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index eb4f1e31a6a..bf0f0e839d0 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/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<ConstantSInt>(RHSNeg) ||
- cast<ConstantSInt>(RHSNeg)->getValue() >= 0) {
+ cast<ConstantSInt>(RHSNeg)->getValue() > 0) {
// X % -Y -> X % Y
AddUsesToWorkList(I);
I.setOperand(1, RHSNeg);
OpenPOWER on IntegriCloud