mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-05 01:01:45 +00:00
Fix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
llvm-svn: 19553
This commit is contained in:
parent
13fd87be57
commit
708ff662ba
@ -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