[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Sat Mar 31 22:36:54 PDT 2007
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.714 -> 1.715
---
Log message:
Fix InstCombine/2007-03-31-InfiniteLoop.ll
---
Diffs of the changes: (+3 -1)
InstructionCombining.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.714 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.715
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.714 Fri Mar 30 21:50:26 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Sun Apr 1 00:36:37 2007
@@ -4083,8 +4083,10 @@
else if (Op0 == B) // A^(B^A) == B
return ReplaceInstUsesWith(I, A);
} else if (match(Op1I, m_And(m_Value(A), m_Value(B))) && Op1I->hasOneUse()){
- if (A == Op0) // A^(A&B) -> A^(B&A)
+ if (A == Op0) { // A^(A&B) -> A^(B&A)
Op1I->swapOperands();
+ std::swap(A, B);
+ }
if (B == Op0) { // A^(B&A) -> (B&A)^A
I.swapOperands(); // Simplified below.
std::swap(Op0, Op1);
More information about the llvm-commits
mailing list