projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a606af
)
Fix InstCombine/2007-03-31-InfiniteLoop.ll
author
Chris Lattner
<sabre@nondot.org>
Sun, 1 Apr 2007 05:36:37 +0000
(
05:36
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sun, 1 Apr 2007 05:36:37 +0000
(
05:36
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35536
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index e0fdc5fbaeab5d6bb1c6d8b8136020c5e43e8508..2735dff48f4f4a99a30ce97b0392ef9d72c36677 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-4083,8
+4083,10
@@
Instruction *InstCombiner::visitXor(BinaryOperator &I) {
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);