[all-commits] [llvm/llvm-project] c4fa68: [AArch64][PAC] Eliminate excessive MOVs when compu...

Anatoly Trosinenko via All-commits all-commits at lists.llvm.org
Mon Nov 11 08:38:39 PST 2024


  Branch: refs/heads/users/atrosinenko/pauth-discriminator
  Home:   https://github.com/llvm/llvm-project
  Commit: c4fa68c7ad66911e006c175ec9acf9e3cca9c1d9
      https://github.com/llvm/llvm-project/commit/c4fa68c7ad66911e006c175ec9acf9e3cca9c1d9
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/test/CodeGen/AArch64/ptrauth-call.ll

  Log Message:
  -----------
  [AArch64][PAC] Eliminate excessive MOVs when computing blend

As function calls do not generally preserve X16 and X17, it is beneficial
to allow AddrDisc operand of B(L)RA instruction to reside in these
registers and make use of this condition when computing the discriminator.

This can save up to two MOVs in cases such as loading a (signed) virtual
function pointer via a (signed) pointer to vtable, for example

    ldr   x9, [x16]
    mov   x8, x16
    mov   x17, x8
    movk  x17, #34646, lsl #48
    blraa x9, x17

can be simplified to

    ldr   x8, [x16]
    movk  x16, #34646, lsl #48
    blraa x8, x16


  Commit: 05c9852d7e27a79bdf9e291247ad9f731abdb500
      https://github.com/llvm/llvm-project/commit/05c9852d7e27a79bdf9e291247ad9f731abdb500
  Author: Anatoly Trosinenko <atrosinenko at accesssoftek.com>
  Date:   2024-11-11 (Mon, 11 Nov 2024)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td

  Log Message:
  -----------
  Fixes


Compare: https://github.com/llvm/llvm-project/compare/54cb6c877d07...05c9852d7e27

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