[llvm] [AArch64] Fix return address auth in tail call epilogues (PR #189484)
Jon Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 14:47:00 PDT 2026
================
----------------
jroelofs wrote:
Sorry, I misspoke and that made this confusing. I should have said:
> PACSym needs to be materialized into `x15`
There are a few cases to consider:
* `MFnI->branchProtectionPAuthLR() && Subtarget->hasPAuthLR()` - here we should have the pure pauth-lr instructions only, i.e. `autia171615`
* `MFnI->branchProtectionPAuthLR() && !Subtarget->hasPAuthLR()` - here we should have the `hint` instruction `pacm` that tells `AUTIA1716` to behave as if it were `AUTIA171615` on hardware that supports pauth-lr. On hardware that does not support pauth-lr, that hint instruction is a no-op. Therefore in this case, we need the PACSym in x15, and it's simply ignored when it's not needed.
* `!MFnI->branchProtectionPAuthLR()` - here we should have the `AUTIA1716`, but it is unnecessary to put PACSym in `x15`.
https://github.com/llvm/llvm-project/pull/189484
More information about the llvm-commits
mailing list