Instruction Emitter crash when emitting glued InlineAsm SDNode

Hi,

I'm getting an Instruction emitter crash when emitting an INLINEASM SDNode that is Glued to other nodes.

The crash happens at line 808 of file llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp:

const MCInstrDesc &MCID = TII->get(F->getMachineOpcode());

with the assertion:
assert(isMachineOpcode() && "Not a MachineInstr opcode!");

I'm not a great expert of the instruction emitter part unfortunately, but I tried to track down the problem and I managed to fix it for my case (now the instruction emitter outputs the InlineAsm correctly without crashes and the inlined code is in the assembly output).

I attached the patch with this email.

The regression tests pass, but if someone more expert on that code could tell me if I'm doing something wrong I'd appreciate :slight_smile:

Cheers,
Marcello

InstrEmitterInlineAsm.patch (1.65 KB)