[llvm] [AArch64][PAC] Don't skip global legalization for AUTH_TCRETURN (PR #182513)
Anatoly Trosinenko via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 10 04:57:48 PDT 2026
atrosinenko wrote:
> You do have a GOT for this.
> I've updated the test file. For your C example you can use -fPIC
Oh, my initial assumption was that this PR has nothing to do with GOT: based on `if (OpFlags & AArch64II::MO_GOT)` condition right above the changed line I assumed that the GOT case is already handled by the existing code. This assumption turned out to be wrong: it is `Subtarget->classifyGlobalFunctionReference` function that computes `OpFlags` for a few common cases and our case is not among these ones.
I wonder if it is actually possible for `:got:` + `:got_lo12:` to be used for materializing signed constant in a real world example (as opposed to `:got_auth:` + `:got_auth_lo12:`, which would handle authentication as part of address materialization, though) - I guess this is highly platform-specific. Anyway, requesting the constant to be materialized before it is fed to `AUTH_TCRETURN` sounds reasonable.
https://github.com/llvm/llvm-project/pull/182513
More information about the llvm-commits
mailing list