[llvm] [ARM] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR #70014)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 24 16:22:50 PDT 2023


================
@@ -104,11 +104,12 @@ void ARMInstrInfo::expandLoadStackGuard(MachineBasicBlock::iterator MI) const {
   const GlobalValue *GV =
       cast<GlobalValue>((*MI->memoperands_begin())->getValue());
 
-  if (!Subtarget.useMovt() || Subtarget.isGVInGOT(GV)) {
----------------
MaskRay wrote:

I agree that we can technically use `LDRLIT_ga_abs` to load the GOT entry address but 
ARMExpandPseudoInsts.cpp:2640 does not use GOT for `LDRLIT_ga_abs`.

https://github.com/llvm/llvm-project/pull/70014


More information about the llvm-commits mailing list