[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Sun Mar 4 16:11:36 PST 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.646 -> 1.647
---
Log message:
fix a subtle bug that caused an MSVC warning. Thanks to Jeffc for pointing this out.
---
Diffs of the changes: (+3 -2)
InstructionCombining.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.646 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.647
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.646 Sun Mar 4 18:02:29 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Mar 4 18:11:19 2007
@@ -5559,10 +5559,11 @@
// Turn (Y + ((X >> C) & CC)) << C -> ((X & (CC << C)) + (Y << C))
Value *Op0BOOp1 = Op0BO->getOperand(1);
- if (isLeftShift && Op0BOOp1->hasOneUse() && V2 == Op1 &&
+ if (isLeftShift && Op0BOOp1->hasOneUse() &&
match(Op0BOOp1,
m_And(m_Shr(m_Value(V1), m_Value(V2)),m_ConstantInt(CC))) &&
- cast<BinaryOperator>(Op0BOOp1)->getOperand(0)-> hasOneUse()) {
+ cast<BinaryOperator>(Op0BOOp1)->getOperand(0)->hasOneUse() &&
+ V2 == Op1) {
Instruction *YS = BinaryOperator::createShl(
Op0BO->getOperand(0), Op1,
Op0BO->getName());
More information about the llvm-commits
mailing list