[all-commits] [llvm/llvm-project] 484fc3: [AArch64][llvm] Some instructions should be `HINT`...

Jonathan Thackray via All-commits all-commits at lists.llvm.org
Wed Jun 17 16:38:17 PDT 2026


  Branch: refs/heads/users/jthackray/rewrite_stshh
  Home:   https://github.com/llvm/llvm-project
  Commit: 484fc36422ebace3ac9f38d15464640a4c6b0195
      https://github.com/llvm/llvm-project/commit/484fc36422ebace3ac9f38d15464640a4c6b0195
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/lib/Target/AArch64/AArch64InstrInfo.td
    M llvm/lib/Target/AArch64/AArch64SystemOperands.td
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
    M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h

  Log Message:
  -----------
  [AArch64][llvm] Some instructions should be `HINT` aliases (NFC)

Implement the following instructions as a `HINT` alias instead of a
dedicated instruction in separate classes:
  * `stshh`
  * `stcph`
  * `shuh`
  * `tsb`

Updated all their helper methods too, and updated the `stshh` pseudo
expansion for the intrinsic to emit `HINT #0x30 | policy`.

Code in AArch64AsmPrinter::emitInstruction identified an initial BTI using a
broad bitmask on the HINT immediate, which also matched shuh/stcph (50..52)
This could move the patchable entry label after a non-BTI instruction.
Replaced it with an exact BTI check using the BTI HINT range (32..63) and
AArch64BTIHint::lookupBTIByEncoding(Imm ^ 32).

A following change will remove duplicated code and simplify.

No test changes.


  Commit: cc60ab0de461f59bc0f9afa352da2df01d89e80d
      https://github.com/llvm/llvm-project/commit/cc60ab0de461f59bc0f9afa352da2df01d89e80d
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M llvm/test/MC/AArch64/armv8.2a-statistical-profiling.s
    M llvm/test/MC/AArch64/armv8.4a-trace.s
    M llvm/test/MC/AArch64/armv9.5a-pauthlr.s
    M llvm/test/MC/AArch64/armv9.6a-pcdphint.s
    M llvm/test/MC/AArch64/armv9.7a-memsys.s
    M llvm/test/MC/AArch64/basic-a64-instructions.s
    M llvm/test/MC/AArch64/ras-extension.s
    M llvm/test/MC/AArch64/speculation-barriers.s

  Log Message:
  -----------
  fixup! Add testcases for all missing HINTs


  Commit: 0c6222d9a55b651488e6d30296d9e7ab0520a2fb
      https://github.com/llvm/llvm-project/commit/0c6222d9a55b651488e6d30296d9e7ab0520a2fb
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-06-18 (Thu, 18 Jun 2026)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64InstrFormats.td
    M llvm/lib/Target/AArch64/AArch64SystemOperands.td
    M llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
    M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp
    M llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h
    M llvm/test/MC/AArch64/armv8.4a-trace-error.s

  Log Message:
  -----------
  fixup! Address PR comments


Compare: https://github.com/llvm/llvm-project/compare/3be6ddb5df22...0c6222d9a55b

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