[llvm-commits] LDRB_POST_IMM crash

Stepan Dyatkovskiy stpworld at narod.ru
Mon Oct 8 08:15:17 PDT 2012


ping.
Stepan Dyatkovskiy wrote:
> Hi all!
>
> SDNode for LDRB_POST_IMM is invalid: number of registers added to SDNode
> fewer that described in .td.
>
> 7 ops is needed, but SDNode with only 6 is created. For fast comparison,
> you can look in generated code ARMGenInstrInfo.inc. At LDRB_POST_IMM
> description and its OperandInfo52.
>
> In more details:
> In ARMInstrInfo.td, in multiclass AI2_ldridx, in definition _POST_IMM,
> offset operand is defined as am2offset_imm. am2offset_imm is complex
> parameter type, and actually it consists from dummy register and imm
> itself. As I understood trick with dummy reg was made for AsmParser. In
> ARMISelLowering.cpp, this dummy register was not added to SDNode, and it
> cause crash in Peephole Optimizer pass.
>
> Please find the patch in attachment.
>
> -Stepan.




More information about the llvm-commits mailing list