[llvm] [ARM] Add size to `tLDRLIT_ga_pcrel` Pseudo Instructoin (PR #175663)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 13 11:30:05 PST 2026
================
@@ -1605,7 +1605,9 @@ def tLDRLIT_ga_pcrel : PseudoInst<(outs tGPR:$dst), (ins i32imm:$addr),
IIC_iLoadiALU,
[(set tGPR:$dst,
(ARMWrapperPIC tglobaladdr:$addr))]>,
- Requires<[IsThumb, DontUseMovtInPic]>;
+ Requires<[IsThumb, DontUseMovtInPic]> {
+ let Size = 8; // 2 instructions + constant.
----------------
smithp35 wrote:
Looking at the example I have again, the constant pool entries were created by legalization and were using `tLDRpci` rather than a pseudo. I agree that if the constant pool entries haven't been created yet then they'll need to be accounted for in the instruction size for the benefit of the size estimate.
https://github.com/llvm/llvm-project/pull/175663
More information about the llvm-commits
mailing list