mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Fix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19553 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6f7f02fdec
commit
906ab50acf
@ -3651,7 +3651,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
|
||||
BinaryOperator::createNeg(SubOp->getOperand(1)), SI);
|
||||
}
|
||||
|
||||
Value *NewTrueOp = AddOp->getOperand(1);
|
||||
Value *NewTrueOp = OtherAddOp;
|
||||
Value *NewFalseOp = NegVal;
|
||||
if (AddOp != TI)
|
||||
std::swap(NewTrueOp, NewFalseOp);
|
||||
@ -3659,7 +3659,7 @@ Instruction *InstCombiner::visitSelectInst(SelectInst &SI) {
|
||||
new SelectInst(CondVal, NewTrueOp,NewFalseOp,SI.getName()+".p");
|
||||
|
||||
NewSel = InsertNewInstBefore(NewSel, SI);
|
||||
return BinaryOperator::createAdd(AddOp->getOperand(0), NewSel);
|
||||
return BinaryOperator::createAdd(SubOp->getOperand(0), NewSel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user