summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2008-06-22 09:42:16 +0000
committerDuncan Sands <baldrick@free.fr>2008-06-22 09:42:16 +0000
commit5fb92e58de2c1ef416acfca04e683b4c6fbb794e (patch)
tree3265eec77bc069b4b1786a650b0d80f84aebd1a0 /llvm/lib/CodeGen
parent8a6274d745f49f6c354d9ec93da3e1e739189e00 (diff)
downloadbcm5719-llvm-5fb92e58de2c1ef416acfca04e683b4c6fbb794e.tar.gz
bcm5719-llvm-5fb92e58de2c1ef416acfca04e683b4c6fbb794e.zip
Make custom lowering of ADD work correctly. This
fixes PR2476; patch by Richard Osborne. The same problem exists for a bunch of other operators, but I'm ignoring this because they will be automagically fixed when the new LegalizeTypes infrastructure lands, since it already solves this problem centrally. llvm-svn: 52610
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 3be33770bc8..bf1608d4c29 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -6374,9 +6374,9 @@ void SelectionDAGLegalize::ExpandOp(SDOperand Op, SDOperand &Lo, SDOperand &Hi){
// If the target wants to custom expand this, let them.
if (TLI.getOperationAction(Node->getOpcode(), VT) ==
TargetLowering::Custom) {
- Op = TLI.LowerOperation(Op, DAG);
- if (Op.Val) {
- ExpandOp(Op, Lo, Hi);
+ SDOperand Result = TLI.LowerOperation(Op, DAG);
+ if (Result.Val) {
+ ExpandOp(Result, Lo, Hi);
break;
}
}
OpenPOWER on IntegriCloud