[all-commits] [llvm/llvm-project] 887619: Use t2LDRLIT_ga_pcrel for loading stack guards wit...

Amara Emerson via All-commits all-commits at lists.llvm.org
Sat Aug 30 14:32:31 PDT 2025


  Branch: refs/heads/users/aemerson/movt-pic
  Home:   https://github.com/llvm/llvm-project
  Commit: 887619b34c6ddba1fa383a6241ed2079d1823437
      https://github.com/llvm/llvm-project/commit/887619b34c6ddba1fa383a6241ed2079d1823437
  Author: Amara Emerson <amara at apple.com>
  Date:   2025-08-30 (Sat, 30 Aug 2025)

  Changed paths:
    M llvm/lib/Target/ARM/Thumb2InstrInfo.cpp
    M llvm/test/CodeGen/ARM/stack-guard-nomovt.ll

  Log Message:
  -----------
  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