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:
parent
da2e7749bb
commit
666f15ac0a
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user