[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 5 17:59:02 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.334 -> 1.335
---
Log message:
implement or.ll:test20
---
Diffs of the changes: (+7 -0)
InstructionCombining.cpp | 7 +++++++
1 files changed, 7 insertions(+)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.334 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.335
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.334 Wed May 4 14:10:26 2005
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Thu May 5 19:58:50 2005
@@ -1872,6 +1872,13 @@
A = 0;
}
+ if (match(Op0, m_And(m_Value(A), m_Value(B))))
+ if (A == Op1 || B == Op1) // (A & ?) | A --> A
+ return ReplaceInstUsesWith(I, Op1);
+ if (match(Op1, m_And(m_Value(A), m_Value(B))))
+ if (A == Op0 || B == Op0) // A | (A & ?) --> A
+ return ReplaceInstUsesWith(I, Op0);
+
if (match(Op1, m_Not(m_Value(B)))) { // Op0 | ~B
if (Op0 == B)
return ReplaceInstUsesWith(I,
More information about the llvm-commits
mailing list