[llvm] [AArch64][PAC] Combine signing with address materialization (PR #130809)
Ahmed Bougacha via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 31 13:24:43 PDT 2025
ahmedbougacha wrote:
Regarding this specific problem, I realized we have a downstream change that I must have lost in the upstreaming branch (my bad), that tries to address a similar problem in a way we can reason about more easily. Specifically: if, when lowering IR before ISel, we see an `llvm.ptrauth.sign` intrinsic with a constant pointer operand, we should lower that to the equivalent of a ptrauth constant. I tried to extract the most basic patch I could in:
https://github.com/llvm/llvm-project/pull/133788
please take a look and let me know if that addresses the original problem! I haven't looked too closely at this PR yet, I'll do that next
In general, we've tried to only do this sort of opportunistic late hardening after we tried to do all we could provide guarantees in the frontend and in IR. One good reason is, it makes these weak spots trivial to find and to generalize from, whereas doing something opportunistic will often hide problems in the common case and makes perfectly-accurate analysis tooling load-bearing. That said, the time may have come to do this as a catch-all, since we realistically won't be able to do much about the remaining representational problems (like adding an offset to a ptrauth qualified pointer). So it's a good idea to consider something like this patch.
https://github.com/llvm/llvm-project/pull/130809
More information about the llvm-commits
mailing list