From: Chris Lattner Date: Sat, 25 Aug 2007 00:53:07 +0000 (+0000) Subject: Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7df31dc89b0323bca5fd6aa0a72db4d663c9b8f3;p=oota-llvm.git Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41386 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 192b0767e36..11c69a4e293 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -753,15 +753,16 @@ void ScheduleDAG::EmitNode(SDNode *Node, } break; case 3: { // Immediate. - assert(NumVals == 1 && "Unknown immediate value!"); - if (ConstantSDNode *CS=dyn_cast(Node->getOperand(i))){ - MI->addImmOperand(CS->getValue()); - } else { - GlobalAddressSDNode *GA = - cast(Node->getOperand(i)); - MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset()); + for (; NumVals; --NumVals, ++i) { + if (ConstantSDNode *CS = + dyn_cast(Node->getOperand(i))) { + MI->addImmOperand(CS->getValue()); + } else { + GlobalAddressSDNode *GA = + cast(Node->getOperand(i)); + MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset()); + } } - ++i; break; } case 4: // Addressing mode.