[PATCH] Fix ARMFastISel::ARMEmitIntExt shift emission

Joey Gouly joey.gouly at arm.com
Tue Jul 16 10:04:06 PDT 2013


LGTM.

Thanks for the quick fix!


-----Original Message-----
From: JF Bastien [mailto:jfb at google.com] 
Sent: 16 July 2013 00:17
To: LLVM Commits
Cc: Eric Christopher; Joey Gouly
Subject: [PATCH] Fix ARMFastISel::ARMEmitIntExt shift emission

My patch "r183551 - ARM FastISel integer sext/zext improvements" was
incorrect when emitting ARM register-immediate ASR, LSL, LSR
instructions: they are pseudo-instructions in ARMInstrInfo.td and I
should have used MOVsi instead.

This is not an issue when code is generated through a .s file, but is
an issue when generated straight to a .o (-filetype=obj).

The attached patch fixes this issue by using MOVsi instead of
ASRi/LSLi/LSRi. It reorganizes the lookup table so that sext/zext
cases are consecutive table entries instead of sharing a struct entry
(other non-ARM-shift entries are unchanged, simply moved).







More information about the llvm-commits mailing list