[all-commits] [llvm/llvm-project] ce72ad: [AArch64][PAC] Precommit test cases for BLRA/AUTH_...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Mon Aug 25 14:00:45 PDT 2025


  Branch: refs/heads/users/atrosinenko/auth-call-register-clobbering
  Home:   https://github.com/llvm/llvm-project
  Commit: ce72adde9dc0847aff7014431c0e29ac74241c1f
      https://github.com/llvm/llvm-project/commit/ce72adde9dc0847aff7014431c0e29ac74241c1f
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M llvm/test/CodeGen/AArch64/ptrauth-call.ll

  Log Message:
  -----------
  [AArch64][PAC] Precommit test cases for BLRA/AUTH_TCRETURN clobbering AddrDisc


  Commit: b4fc557aa2c1c534bd2a84ea80b1059d2b98794d
      https://github.com/llvm/llvm-project/commit/b4fc557aa2c1c534bd2a84ea80b1059d2b98794d
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2025-08-25 (Mon, 25 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

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.


Compare: https://github.com/llvm/llvm-project/compare/ce72adde9dc0%5E...b4fc557aa2c1

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