mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 03:59:12 +00:00
Fix InstCombine/2007-03-31-InfiniteLoop.ll
llvm-svn: 35536
This commit is contained in:
parent
f8977023f4
commit
aa4b06bdae
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user