[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 27 22:27:53 PST 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
LegalizeDAG.cpp updated: 1.53 -> 1.54
---
Log message:
CopyFromReg produces two values. Make sure that we remember that both are
legalized, and actually return the correct result when we legalize the chain first.
---
Diffs of the changes: (+8 -1)
LegalizeDAG.cpp | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.53 llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.54
--- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:1.53 Sun Jan 23 17:19:44 2005
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Fri Jan 28 00:27:38 2005
@@ -206,7 +206,14 @@
if (Tmp1 != Node->getOperand(0))
Result = DAG.getCopyFromReg(cast<RegSDNode>(Node)->getReg(),
Node->getValueType(0), Tmp1);
- break;
+ else
+ Result = Op.getValue(0);
+
+ // Since CopyFromReg produces two values, make sure to remember that we
+ // legalized both of them.
+ AddLegalizedOperand(Op.getValue(0), Result);
+ AddLegalizedOperand(Op.getValue(1), Result.getValue(1));
+ return Result.getValue(Op.ResNo);
case ISD::ImplicitDef:
Tmp1 = LegalizeOp(Node->getOperand(0));
if (Tmp1 != Node->getOperand(0))
More information about the llvm-commits
mailing list