1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Teach the dag scheduler to handle inline asm nodes with multi-value immediate operands.

llvm-svn: 41386
This commit is contained in:
Chris Lattner 2007-08-25 00:53:07 +00:00
parent da2e7749bb
commit 666f15ac0a

View File

@ -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.