[llvm-branch-commits] [llvm] AMDGPU: Refactor AMDGPUTargetID to not store MCSubtargetInfo (PR #204150)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jun 16 21:25:05 PDT 2026
================
@@ -0,0 +1,16 @@
+// RUN: split-file %s %t
+// RUN: llvm-mc -triple amdgcn-amd-amdhsa-llvm -mcpu=gfx802 %t/amdhsa-llvm.s | FileCheck --check-prefix=AMDHSA-LLVM %s
+// RUN: llvm-mc -triple amdgcn-amd-amdpal-llvm -mcpu=gfx802 %t/amdpal-llvm.s -filetype=null
+// RUN: not llvm-mc -triple amdgcn-amd-amdhsa -mcpu=gfx802 %t/amdhsa-llvm.s -filetype=null 2>&1 | FileCheck --check-prefix=AMDHSA-ERR %s
+// RUN: not llvm-mc -triple amdgcn-amd-amdpal -mcpu=gfx802 %t/amdpal-llvm.s -filetype=null 2>&1 | FileCheck --check-prefix=AMDPAL-ERR %s
+
+// Test that the environment component of the triple is preserved and validated
+
+//--- amdhsa-llvm.s
+// AMDHSA-LLVM: .amdgcn_target "amdgcn-amd-amdhsa-llvm-gfx802"
+// AMDHSA-ERR: error: .amdgcn_target directive's target id amdgcn-amd-amdhsa-llvm-gfx802 does not match the specified target id amdgcn-amd-amdhsa-unknown-gfx802
----------------
MaskRay wrote:
For assembly errors we should test line:column information like `[[#@LINE+1]]:1:`
https://github.com/llvm/llvm-project/pull/204150
More information about the llvm-branch-commits
mailing list