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

Chris Lattner lattner at cs.uiuc.edu
Thu Oct 21 21:53:30 PDT 2004



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.275 -> 1.276
---
Log message:

Fix a bug Nate noticed, where we miscompiled a simple testcase


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

Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.275 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.276
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.275	Sun Oct 17 21:59:09 2004
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Thu Oct 21 23:53:16 2004
@@ -1285,7 +1285,7 @@
         Constant *AllOne = ConstantIntegral::getAllOnesValue(AndRHS->getType());
         Constant *ShrMask = ConstantExpr::getUShr(AllOne, OpRHS);
         Constant *CI = ConstantExpr::getAnd(AndRHS, ShrMask);
-        if (CI == ShrMask) {          // Masking out bits shifted in.
+        if (CI == AndRHS) {          // Masking out bits shifted in.
           // Make the argument unsigned.
           Value *ShVal = Op->getOperand(0);
           ShVal = InsertCastBefore(ShVal,






More information about the llvm-commits mailing list