[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 29 18:57:34 PDT 2005
Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.18 -> 1.19
---
Log message:
Handle CopyToReg nodes with flag operands correctly
---
Diffs of the changes: (+6 -1)
ScheduleDAG.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.18 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.19
--- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.18 Mon Aug 29 18:21:29 2005
+++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Mon Aug 29 20:57:23 2005
@@ -205,8 +205,13 @@
Emit(Op.getOperand(i));
break;
case ISD::CopyToReg: {
- Emit(Op.getOperand(0)); // Emit the chain.
+ SDOperand ChainOp;
+ if (Op.getNumOperands() == 4)
+ ChainOp = Op.getOperand(3);
+ if (Op.getOperand(0).Val != ChainOp.Val)
+ Emit(Op.getOperand(0)); // Emit the chain.
unsigned Val = Emit(Op.getOperand(2));
+ if (ChainOp.Val) Emit(ChainOp);
MRI.copyRegToReg(*BB, BB->end(),
cast<RegisterSDNode>(Op.getOperand(1))->getReg(), Val,
RegMap->getRegClass(Val));
More information about the llvm-commits
mailing list