[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 Mar 27 06:08:40 PDT 2024


eleanor-arm wrote:

There are two ways to observe the issue, either through a very specific C/C++ code or the integrated asm code. The difference is that the first code path is easier to fix, it seems much harder to fix the second path. I think this fix should fix it for all C/C++ testcases but it won't work if integrated asm is used. 

> The important change is the change to AArch64InstrInfo.td.

Yes. I see the checks like `MF->getInfo<AArch64FunctionInfo>()->branchTargetEnforcement() && !MF->getInfo<AArch64FunctionInfo>()->branchProtectionPAuthLR()`. They are all in `computeAvailableFunctionFeatures()` (when built) and I struggled to see this function being executed. I only saw it executed when running one of the llc tests added in #81020 when _global-isel_ is enabled. It looks like #81020  might be fixing the issue for the cases when _global-isel_ is enabled only. 



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


More information about the llvm-commits mailing list