Changes in directory llvm/lib/CodeGen/SelectionDAG:
ScheduleDAG.cpp updated: 1.104 -> 1.105 --- Log message: handle global address constant sdnodes --- Diffs of the changes: (+7 -2) ScheduleDAG.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp diff -u llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.104 llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.105 --- llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp:1.104 Sat Oct 14 03:34:06 2006 +++ llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp Tue Oct 31 14:01:56 2006 @@ -544,8 +544,13 @@ break; case 3: { // Immediate. assert(NumVals == 1 && "Unknown immediate value!"); - uint64_t Val = cast<ConstantSDNode>(Node->getOperand(i))->getValue(); - MI->addImmOperand(Val); + if (ConstantSDNode *CS=dyn_cast<ConstantSDNode>(Node->getOperand(i))){ + MI->addImmOperand(CS->getValue()); + } else { + GlobalAddressSDNode *GA = + cast<GlobalAddressSDNode>(Node->getOperand(i)); + MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset()); + } ++i; break; } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits