[all-commits] [llvm/llvm-project] f9c9f9: [AArch64] Mark X16 as clobbered in PAUTH_EPILOGUE ...

Victor Campos via All-commits all-commits at lists.llvm.org
Mon Apr 13 05:13:48 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9c9f94f13c88be0626d5a4e453f5494de0e106a
      https://github.com/llvm/llvm-project/commit/f9c9f94f13c88be0626d5a4e453f5494de0e106a
  Author: Victor Campos <victor.campos at arm.com>
  Date:   2026-04-13 (Mon, 13 Apr 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64FrameLowering.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.h
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Target/AArch64/AArch64PrologueEpilogue.cpp
    A llvm/test/CodeGen/AArch64/sign-return-address-pauthlr-slh.ll

  Log Message:
  -----------
  [AArch64] Mark X16 as clobbered in PAUTH_EPILOGUE for hint-based PAuthLR (#175991)

When users request branch protection with PAuthLR on targets that do not
support the PAuthLR instructions, the PAUTH_EPILOGUE falls back to using
hint-space instructions. This fallback sequence uses X16 as a temporary
register, but X16 was not listed in the clobber set.

Because Speculative Load Hardening uses X16, this omission made SLH
incompatible with this PAUTH_EPILOGUE path.

Mark X16 as clobbered so the compiler does not assume X16 is preserved
across the epilogue, restoring compatibility with Speculative Load
Hardening and avoiding incorrect register liveness assumptions. The
clobber is added in C++ rather than TableGen, as X16 is only clobbered
when PAuthLR is requested as a branch protection variation and should
not be treated as clobbered unconditionally.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list