[all-commits] [llvm/llvm-project] c7f3bd: [AArch64][PAC] Fix clobbering registers by BLRA an...
Anatoly Trosinenko via All-commits
all-commits at lists.llvm.org
Wed Aug 27 09:36:21 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c7f3bdb61233374de6b28af139a8abc41f5683ee
https://github.com/llvm/llvm-project/commit/c7f3bdb61233374de6b28af139a8abc41f5683ee
Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
Date: 2025-08-27 (Wed, 27 Aug 2025)
Changed paths:
M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
M llvm/test/CodeGen/AArch64/ptrauth-call.ll
Log Message:
-----------
[AArch64][PAC] Fix clobbering registers by BLRA and AUTH_TCRETURN (#155373)
After `isX16X17Safer` predicate was introduced, it became possible for
`emitPtrauthDiscriminator` function to return its `AddrDisc` argument
when it is neither X16 nor X17 (which are declared as implicit-def'ed by
`BLRA` and `AUTH_TCRETURN[_BTI]` pseudo instructions). This resulted in
the above pseudos being able to accidentally clobber unexpected
register.
As a quick fix for miscompilation possibility, this patch virtually
restores the old behavior for the affected pseudo instructions. It
should be possible to improve the efficiency via subsequent patches by
accounting for `killed` flags and register masks.
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