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

Chris Lattner sabre at nondot.org
Tue Dec 12 10:41:18 PST 2006



Changes in directory llvm/lib/Transforms/Scalar:

InstructionCombining.cpp updated: 1.563 -> 1.564
---
Log message:

Fix regression on 400.perlbench last night.


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

 InstructionCombining.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.563 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.564
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.563	Tue Dec 12 03:18:51 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Tue Dec 12 12:41:03 2006
@@ -3112,7 +3112,7 @@
             } else if (CastOp->getOpcode() == Instruction::Or) {
               // Change: and (cast (or X, C1) to T), C2
               // into  : trunc(C1)&C2 iff trunc(C1)&C2 == C2
-              Constant *C3 = ConstantExpr::getBitCast(AndCI, I.getType());
+              Constant *C3 = ConstantExpr::getTrunc(AndCI, I.getType());
               if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS)   // trunc(C1)&C2
                 return ReplaceInstUsesWith(I, AndRHS);
             }






More information about the llvm-commits mailing list