aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-25 00:53:07 +0000
committerChris Lattner <sabre@nondot.org>2007-08-25 00:53:07 +0000
commit23544c1a464db6d5ef3a0ca174316038de701701 (patch)
tree93b97fef17a1db81099e0d6cdf04ed19d70f819b /lib
parent38cb7c9aab50cf1104b775ed31b4b94e722c9f9c (diff)
downloadexternal_llvm-23544c1a464db6d5ef3a0ca174316038de701701.tar.gz
external_llvm-23544c1a464db6d5ef3a0ca174316038de701701.tar.bz2
external_llvm-23544c1a464db6d5ef3a0ca174316038de701701.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 192b0767e3..11c69a4e29 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<ConstantSDNode>(Node->getOperand(i))){
- MI->addImmOperand(CS->getValue());
- } else {
- GlobalAddressSDNode *GA =
- cast<GlobalAddressSDNode>(Node->getOperand(i));
- MI->addGlobalAddressOperand(GA->getGlobal(), GA->getOffset());
+ for (; NumVals; --NumVals, ++i) {
+ 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;
}
case 4: // Addressing mode.