[llvm-commits] CVS: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 10 13:21:01 PST 2003
Changes in directory llvm/lib/Transforms/Scalar:
InstructionCombining.cpp updated: 1.72 -> 1.73
---
Log message:
Minor change, no functionality diff
---
Diffs of the changes:
Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.72 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.73
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.72 Mon Mar 10 13:16:08 2003
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp Mon Mar 10 13:20:30 2003
@@ -510,11 +510,11 @@
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));
}
}
More information about the llvm-commits
mailing list