projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6f7f02f
)
Fix some bugs in an xform added yesterday. This fixes Prolangs-C/allroots.
author
Chris Lattner
<sabre@nondot.org>
Fri, 14 Jan 2005 17:35:12 +0000
(17:35 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 14 Jan 2005 17:35:12 +0000
(17:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19553
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/InstructionCombining.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/InstructionCombining.cpp
b/lib/Transforms/Scalar/InstructionCombining.cpp
index 840dbd47d43f01f9a4059abc5dd2b7d7a4cf142e..6d4718d42cacb8338aeff6696dd66e9b96823f02 100644
(file)
--- a/
lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/
lib/Transforms/Scalar/InstructionCombining.cpp
@@
-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(
Add
Op->getOperand(0), NewSel);
+ return BinaryOperator::createAdd(
Sub
Op->getOperand(0), NewSel);
}
}
}