[LLVMdev] Instruction Emitter crash when emitting glued InlineAsm SDNode

Marcello Maggioni marcello at codeplay.com
Mon Oct 21 04:15:57 PDT 2013


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 :)

Cheers,
Marcello

--
Marcello Maggioni

Compiler Engineer

  

Codeplay Software Ltd

45 York Place, Edinburgh, EH1 3HP

Tel: 0131 466 0503

Fax: 0131 557 6600

Website: http://www.codeplay.com

Twitter: https://twitter.com/@codeplaybiz

  

This email and any attachments may contain confidential and /or privileged information and  is for use  by the addressee only. If you are not the intended recipient, please notify Codeplay Software Ltd immediately and delete the message from your computer. You may not copy or forward it,or use or disclose its contents to any other person. Any views or other information in this message which do not relate to our business are not authorized by Codeplay software Ltd, nor does this message form part of any contract unless so stated.

As internet communications are capable of data corruption Codeplay Software Ltd does not accept any responsibility for any changes made to this message after it was sent. Please note that Codeplay Software Ltd does not accept any liability or responsibility for viruses and it is your responsibility to scan any attachments.

Company registered in England and Wales, number: 04567874

Registered office: 81 Linkfield Street, Redhill RH1 6BY

-------------- next part --------------
A non-text attachment was scrubbed...
Name: InstrEmitterInlineAsm.patch
Type: text/x-patch
Size: 1686 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131021/df3b066b/attachment.bin>


More information about the llvm-dev mailing list