[all-commits] [llvm/llvm-project] 3fb028: AMDGPU: Respect target assembler directives over c...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Mon Jul 13 14:31:32 PDT 2026
Branch: refs/heads/users/arsenm/amdgpu/repect-not-validate-amdgcn-targetid-directive
Home: https://github.com/llvm/llvm-project
Commit: 3fb0288a8a94017fe2d470ab73a2efa8a8f3a94a
https://github.com/llvm/llvm-project/commit/3fb0288a8a94017fe2d470ab73a2efa8a8f3a94a
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-13 (Mon, 13 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: ecf1e2424672fc16993d445e0a30a6b99e7c1bbe
https://github.com/llvm/llvm-project/commit/ecf1e2424672fc16993d445e0a30a6b99e7c1bbe
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-13 (Mon, 13 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: f0f77c31656fbe45ca4f691470e99b2233de1814
https://github.com/llvm/llvm-project/commit/f0f77c31656fbe45ca4f691470e99b2233de1814
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M llvm/include/llvm/MC/MCSubtargetInfo.h
Log Message:
-----------
Drop setCPU change
Commit: 5d888c2f2d0d886d53830e28a952dcb82b342647
https://github.com/llvm/llvm-project/commit/5d888c2f2d0d886d53830e28a952dcb82b342647
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
Log Message:
-----------
remove r600 check
Commit: 5b825abd7af29123dad7819ae362d1d2e60da891
https://github.com/llvm/llvm-project/commit/5b825abd7af29123dad7819ae362d1d2e60da891
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2026-07-13 (Mon, 13 Jul 2026)
Changed paths:
M llvm/test/MC/AMDGPU/amdgcn-target-directive-subarch-cpu-field.s
Log Message:
-----------
Fix test after rebases
Compare: https://github.com/llvm/llvm-project/compare/ccef92e20c5f...5b825abd7af2
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