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

Chris Lattner sabre at nondot.org
Tue Dec 12 11:11:35 PST 2006



Changes in directory llvm/lib/Transforms/Scalar:

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

this can be trunc or bitcast, per line 3092.


---
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.564 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.565
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.564	Tue Dec 12 12:41:03 2006
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Tue Dec 12 13:11:20 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::getTrunc(AndCI, I.getType());
+              Constant *C3 = ConstantExpr::getTruncOrBitCast(AndCI,I.getType());
               if (ConstantExpr::getAnd(C3, AndRHS) == AndRHS)   // trunc(C1)&C2
                 return ReplaceInstUsesWith(I, AndRHS);
             }






More information about the llvm-commits mailing list