[PATCH] Added a new register class for Thumb PC-rel loads

Tim Northover t.p.northover at gmail.com
Thu Sep 5 08:39:54 PDT 2013


> Correct, with your patch t2LEApcrelJT has the proper constraint to not use
> LR for the destination register.
>
> My understanding is that the t2LEApcrelJT gets expanded to an ADR
> instruction eventually. However, the MOV seems to be completely independent
> of the t2LEApcrelJT, thus there’s no way the constraint on t2LEApcrelJT
> helps to constrain the source register of the MOV (correct me if I’m wrong
> here).

It does look like it's BR_JT and friends that are the key instructions
needing to be constrained (referring to the lowering in
ARMAsmPrinter.cpp to see just which operands we don't want to be
allocated in LR).

Cheers.

Tim.




More information about the llvm-commits mailing list