[llvm] Do not use R12 for indirect tail calls with PACBTI (PR #82661)
Eleanor Bonnici via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 06:04:29 PDT 2024
eleanor-arm wrote:
You are right, Clang generates module attributes instead. The attribute that needs to be set explicitly for AArch64 to work is `branch-protection-pauth-lr` in fact, not `sign-return-address`. I am not sure why `sign-return-address` is even in the test. The test passes without it being used for any of the functions.
As far as ARM goes, `sign-return-address` seems to be the attribute that's set when pacbti is enabled, as when that's set as a function attribute the IR test passes. Why the codegen is not correct when it set as a module attribute I am not sure. The `MF->getInfo<ARMFunctionInfo>()->shouldSignReturnAddress()` check is present in `ARMGenDAGIsel.inc` and appears to be executing. I don't see any obvious difference between AArch64 and ARM atm.
https://github.com/llvm/llvm-project/pull/82661
More information about the llvm-commits
mailing list