mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Fix bug: test/Regression/Transforms/InstCombine/2002-05-14-SubFailure.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -187,7 +187,7 @@ Instruction *InstCombiner::visitSub(BinaryOperator *I) {
|
|||||||
// not used by anyone else...
|
// not used by anyone else...
|
||||||
//
|
//
|
||||||
if (BinaryOperator *Op1I = dyn_cast<BinaryOperator>(Op1))
|
if (BinaryOperator *Op1I = dyn_cast<BinaryOperator>(Op1))
|
||||||
if (Op1I->use_size() == 1) {
|
if (Op1I->use_size() == 1 && Op1I->getOpcode() == Instruction::Sub) {
|
||||||
// Swap the two operands of the subexpr...
|
// Swap the two operands of the subexpr...
|
||||||
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
|
Value *IIOp0 = Op1I->getOperand(0), *IIOp1 = Op1I->getOperand(1);
|
||||||
Op1I->setOperand(0, IIOp1);
|
Op1I->setOperand(0, IIOp1);
|
||||||
|
Reference in New Issue
Block a user