[all-commits] [llvm/llvm-project] 689c9e: AMDGPU: Only disassemble .amdhsa_reserve_xnack_mas...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Jul 29 08:02:42 PDT 2026


  Branch: refs/heads/users/arsenm/amdgpu-disasm-reserve-xnack-mask-supported-only
  Home:   https://github.com/llvm/llvm-project
  Commit: 689c9ee00b6ad8d29701ec657152e2029bdd8076
      https://github.com/llvm/llvm-project/commit/689c9ee00b6ad8d29701ec657152e2029bdd8076
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2026-07-29 (Wed, 29 Jul 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h
    M llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx11.s
    M llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-gfx12.s
    A llvm/test/tools/llvm-objdump/ELF/AMDGPU/kd-xnack-unsupported-eflags.yaml

  Log Message:
  -----------
  AMDGPU: Only disassemble .amdhsa_reserve_xnack_mask on xnack targets

The disassembler unconditionally printed .amdhsa_reserve_xnack_mask when
emitting a kernel descriptor. Targets that do not support xnack have no
xnack mask to reserve, and the assembler streamer already only emits the
directive when the subtarget supports xnack. Match that behavior in the
disassembler so the round-trip is consistent and gfx11/gfx12 descriptors
no longer carry a spurious directive.

As a guard against a malformed binary, if the object's ELF e_flags
erroneously select xnack "on" for a target that does not support xnack,
still print the directive so the invalid state remains visible in the
disassembly rather than being silently dropped.

Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>



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