@@ -3678,11 +3678,12 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
3678
3678
// Emit boilerplate.
3679
3679
OS << " SDNode *Select_INLINEASM(SDOperand N) {\n "
3680
3680
<< " 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
+
3686
3687
<< " std::vector<MVT::ValueType> VTs;\n "
3687
3688
<< " VTs.push_back(MVT::Other);\n "
3688
3689
<< " VTs.push_back(MVT::Flag);\n "
@@ -3718,6 +3719,7 @@ void DAGISelEmitter::EmitInstructionSelector(std::ostream &OS) {
3718
3719
<< " case ISD::TargetConstant:\n "
3719
3720
<< " case ISD::TargetConstantPool:\n "
3720
3721
<< " case ISD::TargetFrameIndex:\n "
3722
+ << " case ISD::TargetExternalSymbol:\n "
3721
3723
<< " case ISD::TargetJumpTable:\n "
3722
3724
<< " case ISD::TargetGlobalTLSAddress:\n "
3723
3725
<< " case ISD::TargetGlobalAddress: {\n "
0 commit comments