mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-03 02:43:51 +00:00
Minor change, no functionality diff
llvm-svn: 5731
This commit is contained in:
parent
1dc15593c3
commit
9dec4368c0
@ -510,11 +510,11 @@ Instruction *InstCombiner::visitXor(BinaryOperator &I) {
|
||||
if (Op0I->getOpcode() == Instruction::Or && Op0I->use_size() == 1) {
|
||||
if (Op0I->getOperand(0) == Op1) // (B|A)^B == (A|B)^B
|
||||
cast<BinaryOperator>(Op0I)->swapOperands();
|
||||
if (Op0I->getOperand(1) == Op1) { // (A|B)^B == A & ~B
|
||||
if (Op0I->getOperand(1) == Op1) { // (A|B)^B == ~B & A
|
||||
Value *NotB = BinaryOperator::createNot(Op1, Op1->getName()+".not", &I);
|
||||
WorkList.push_back(cast<Instruction>(NotB));
|
||||
return BinaryOperator::create(Instruction::And, Op0I->getOperand(0),
|
||||
NotB);
|
||||
return BinaryOperator::create(Instruction::And, NotB,
|
||||
Op0I->getOperand(0));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user