[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp

Chris Lattner sabre at nondot.org
Mon Apr 9 16:52:30 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.737 -> 1.738
---
Log message:

Strengthen the boundary conditions of this fold, implementing
InstCombine/set.ll:test25


---
Diffs of the changes:  (+3 -3)

 InstructionCombining.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.737 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.738
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.737	Sun Apr  8 20:37:55 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Mon Apr  9 18:52:13 2007
@@ -4741,13 +4741,13 @@
       case ICmpInst::ICMP_ULT:
         if (Max.ult(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getTrue());
-        if (Min.ugt(RHSVal))
+        if (Min.uge(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getFalse());
         break;
       case ICmpInst::ICMP_UGT:
         if (Min.ugt(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getTrue());
-        if (Max.ult(RHSVal))
+        if (Max.ule(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getFalse());
         break;
       case ICmpInst::ICMP_SLT:
@@ -4759,7 +4759,7 @@
       case ICmpInst::ICMP_SGT: 
         if (Min.sgt(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getTrue());
-        if (Max.slt(RHSVal))
+        if (Max.sle(RHSVal))
           return ReplaceInstUsesWith(I, ConstantInt::getFalse());
         break;
       }






More information about the llvm-commits mailing list