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

Jonathan Thackray via All-commits all-commits at lists.llvm.org
Fri Apr 17 09:15:29 PDT 2026


  Branch: refs/heads/users/jthackray/rewrite_stshh
  Home:   https://github.com/llvm/llvm-project
  Commit: 424140a876e764f01896fab05c7c1e451826ed44
      https://github.com/llvm/llvm-project/commit/424140a876e764f01896fab05c7c1e451826ed44
  Author: Jonathan Thackray <jonathan.thackray at arm.com>
  Date:   2026-04-17 (Fri, 17 Apr 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.



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