[llvm] [AMDGPU] Avoid repeated parsing in generic classification test (PR #225551)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 22 18:00:09 PDT 2026
================
@@ -1,71 +1,40 @@
-// RUN: split-file %s %t
-// RUN: llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/valid.td \
-// RUN: | FileCheck %t/valid.td
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/missing-bug.td 2>&1 \
-// RUN: | FileCheck %t/missing-generic.td -DDIR=%t -DFEATURE=user-sgpr-init16-bug --implicit-check-not="error:"
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/missing-priority.td 2>&1 \
-// RUN: | FileCheck %t/missing-generic.td -DDIR=%t -DFEATURE=required-export-priority --implicit-check-not="error:"
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/missing-timing.td 2>&1 \
-// RUN: | FileCheck %t/missing-generic.td -DDIR=%t -DFEATURE=gfx125x-lowest-rate-wmma --implicit-check-not="error:"
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/missing-banks.td 2>&1 \
-// RUN: | FileCheck %t/missing-generic.td -DDIR=%t -DFEATURE=ldsbankcount32 --implicit-check-not="error:"
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/missing-lds-size.td 2>&1 \
-// RUN: | FileCheck %t/missing-generic.td -DDIR=%t -DFEATURE=addressablelocalmemorysize65536 --implicit-check-not="error:"
-// RUN: not llvm-tblgen -gen-amdgpu-target-def -I %t -I %p/../../include -I %p/../../lib/Target/AMDGPU %t/capability.td 2>&1 \
-// RUN: | FileCheck %t/capability.td -DFILE=%t/capability.td --implicit-check-not="error:"
+// RUN: llvm-tblgen -gen-amdgpu-target-def -I %p/../../include -I %p/../../lib/Target/AMDGPU %s \
+// RUN: | FileCheck %s
-//--- common.td
+// Parse the real target only once: loading all AMDGPU instruction definitions
+// for each negative case can exceed the test timeout. The lightweight
+// AMDGPUTargetDefGenericFeatures.td test covers the validation diagnostics.
----------------
shiltian wrote:
I honestly think it is really a bad idea to include `AMDGPU.td` in the test case.
https://github.com/llvm/llvm-project/pull/225551
More information about the llvm-commits
mailing list