Skip to content

Commit ac864c0

Browse files
committed
Merge inline asm fix from mainline.
llvm-svn: 37209
1 parent 35fb622 commit ac864c0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

llvm/utils/TableGen/DAGISelEmitter.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3678,11 +3678,12 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
36783678
// Emit boilerplate.
36793679
OS << "SDNode *Select_INLINEASM(SDOperand N) {\n"
36803680
<< " std::vector<SDOperand> Ops(N.Val->op_begin(), N.Val->op_end());\n"
3681-
<< " AddToISelQueue(N.getOperand(0)); // Select the chain.\n\n"
3682-
<< " // Select the flag operand.\n"
3683-
<< " if (Ops.back().getValueType() == MVT::Flag)\n"
3684-
<< " AddToISelQueue(Ops.back());\n"
3685-
<< " SelectInlineAsmMemoryOperands(Ops, *CurDAG);\n"
3681+
<< " SelectInlineAsmMemoryOperands(Ops, *CurDAG);\n\n"
3682+
3683+
<< " // Ensure that the asm operands are themselves selected.\n"
3684+
<< " for (unsigned j = 0, e = Ops.size(); j != e; ++j)\n"
3685+
<< " AddToISelQueue(Ops[j]);\n\n"
3686+
36863687
<< " std::vector<MVT::ValueType> VTs;\n"
36873688
<< " VTs.push_back(MVT::Other);\n"
36883689
<< " VTs.push_back(MVT::Flag);\n"
@@ -3718,6 +3719,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
37183719
<< " case ISD::TargetConstant:\n"
37193720
<< " case ISD::TargetConstantPool:\n"
37203721
<< " case ISD::TargetFrameIndex:\n"
3722+
<< " case ISD::TargetExternalSymbol:\n"
37213723
<< " case ISD::TargetJumpTable:\n"
37223724
<< " case ISD::TargetGlobalTLSAddress:\n"
37233725
<< " case ISD::TargetGlobalAddress: {\n"

0 commit comments

Comments
 (0)