[all-commits] [llvm/llvm-project] 47e79b: AMDGPU: Respect target assembler directives over c...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Jul 9 13:28:28 PDT 2026
Branch: refs/heads/users/arsenm/amdgpu/repect-not-validate-amdgcn-targetid-directive
Home: https://github.com/llvm/llvm-project
Commit: 47e79b5f0b1727cc34252d5081594ac43f04d93c
https://github.com/llvm/llvm-project/commit/47e79b5f0b1727cc34252d5081594ac43f04d93c
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M llvm/include/llvm/MC/MCSubtargetInfo.h
M llvm/include/llvm/TargetParser/AMDGPUTargetParser.h
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
A llvm/test/MC/AMDGPU/amdgcn-target-directive-conflict.s
M llvm/test/MC/AMDGPU/amdgcn-target-directive-triple-env.s
M llvm/test/MC/AMDGPU/hsa-diag-v4.s
M llvm/test/MC/AMDGPU/hsa-exp.s
M llvm/test/MC/AMDGPU/hsa-gfx12-v4.s
M llvm/test/MC/AMDGPU/hsa-gfx13-v4.s
M llvm/test/MC/AMDGPU/hsa-tg-split.s
M llvm/test/MC/AMDGPU/hsa-v4.s
M llvm/test/MC/AMDGPU/hsa-v5-uses-dynamic-stack.s
M llvm/test/MC/AMDGPU/isa-version-hsa.s
M llvm/test/MC/AMDGPU/isa-version-pal.s
M llvm/test/MC/AMDGPU/isa-version-unk.s
Log Message:
-----------
AMDGPU: Respect target assembler directives over command line
Mutate the global subtarget, using essentially the same code that ARM uses.
The main difference is we need to mutate the actual CPU name in addition
to just flipping the feature bits, so this needs a new setter in
MCSubtargetInfo. Liberalize the triple check so that after #206480,
old assembly files to not break on new assembler invocations.
For some reason we have 2 different assembler directives that indicate the
target, .amdgcn_target for amdhsa and .amd_amdgpu_isa for amdpal. Previously,
we would take the target from the command line and then error if the directive
did not exactly match. In order to move away from depending on the xnack and
sramecc subtarget features, start treating the directives as a change of target,
similar to ARM's .cpu and .arch directives.
Both .amdgcn_target and .amd_amdgpu_isa encode full triples, but unlike
.amdgcn_target, the PAL directive does not include xnack or sramecc. Ideally
we would introduce new independent directives for these.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
Commit: 07b48766dcd3e7bf0116d906cd6459843b548561
https://github.com/llvm/llvm-project/commit/07b48766dcd3e7bf0116d906cd6459843b548561
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
M llvm/test/MC/AMDGPU/amdgcn-target-directive-triple-env.s
M llvm/test/MC/AMDGPU/hsa-diag-v4.s
M llvm/test/MC/AMDGPU/isa-version-hsa.s
M llvm/test/MC/AMDGPU/isa-version-pal.s
M llvm/test/MC/AMDGPU/isa-version-unk.s
Log Message:
-----------
Clarify .amdgcn_target processor mismatch diagnostic
Commit: c7f5b5ebf159f48fc0d1acd303f16eb3b4b34dda
https://github.com/llvm/llvm-project/commit/c7f5b5ebf159f48fc0d1acd303f16eb3b4b34dda
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M llvm/include/llvm/MC/MCSubtargetInfo.h
Log Message:
-----------
Drop setCPU change
Commit: ccef92e20c5f8d103a4834661caf2b132646ae5a
https://github.com/llvm/llvm-project/commit/ccef92e20c5f8d103a4834661caf2b132646ae5a
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-09 (Thu, 09 Jul 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Log Message:
-----------
remove r600 check
Compare: https://github.com/llvm/llvm-project/compare/31e30ebde254...ccef92e20c5f
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