[all-commits] [llvm/llvm-project] 65becc: [ARM] Use t2LDRLIT_ga_pcrel for loading stack guar...
Amara Emerson via All-commits
all-commits at lists.llvm.org
Sun Aug 31 21:47:34 PDT 2025
Branch: refs/heads/users/aemerson/movt-pic
Home: https://github.com/llvm/llvm-project
Commit: 65becc4781468d1fbd16b15551b73915355d2ef0
https://github.com/llvm/llvm-project/commit/65becc4781468d1fbd16b15551b73915355d2ef0
Author: Amara Emerson <amara at apple.com>
Date: 2025-08-31 (Sun, 31 Aug 2025)
Changed paths:
M llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
M llvm/test/CodeGen/ARM/stack-guard-nomovt.ll
Log Message:
-----------
[ARM] Use t2LDRLIT_ga_pcrel for loading stack guards with no-movt in PIC mode.
When using no-movt we don't use the pcrel version of the literal load.
This change also unifies logic with the ARM version of this function as well,
which has:
```
if (!Subtarget.useMovt() || ForceELFGOTPIC) {
// For ELF non-PIC, use GOT PIC code sequence as well because R_ARM_GOT_ABS
// does not have assembler support.
if (TM.isPositionIndependent() || ForceELFGOTPIC)
expandLoadStackGuardBase(MI, ARM::LDRLIT_ga_pcrel, ARM::LDRi12);
else
expandLoadStackGuardBase(MI, ARM::LDRLIT_ga_abs, ARM::LDRi12);
return;
}
```
rdar://138334512
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list