[llvm] [NFC][SPIR-V] Add spirv-val RUN lines where missing (PR #227245)

Arseniy Obolenskiy via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 02:47:29 PDT 2026


https://github.com/aobolensk created https://github.com/llvm/llvm-project/pull/227245

None

>From 9443624f368b370f60f286133feccff6fd92eec4 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Tue, 29 Sep 2026 11:46:45 +0200
Subject: [PATCH] [NFC][SPIR-V] Add spirv-val RUN lines where missing

---
 .../CodeGen/SPIRV/extensions/SPV_KHR_abort/trap-ext-disabled.ll | 1 +
 .../SPIRV/extensions/SPV_KHR_bit_instructions_remove_cap_if.ll  | 1 +
 llvm/test/CodeGen/SPIRV/get-global-id-non-integer-dim.ll        | 2 ++
 llvm/test/CodeGen/SPIRV/linkage/available-externally-global.ll  | 2 ++
 llvm/test/CodeGen/SPIRV/malformed-mangled-builtin-name.ll       | 1 +
 5 files changed, 7 insertions(+)

diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_abort/trap-ext-disabled.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_abort/trap-ext-disabled.ll
index 7cf78e8553303..a1d0bb90e25d3 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_abort/trap-ext-disabled.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_abort/trap-ext-disabled.ll
@@ -1,4 +1,5 @@
 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
 
 ;; When SPV_KHR_abort is not enabled, llvm.trap is dropped (existing behavior),
 ;; and no AbortKHR capability/extension/instruction is emitted.
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bit_instructions_remove_cap_if.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bit_instructions_remove_cap_if.ll
index cec59cd4fd21c..04c3e61e7352b 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bit_instructions_remove_cap_if.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_bit_instructions_remove_cap_if.ll
@@ -1,4 +1,5 @@
 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s --spirv-ext=+SPV_KHR_bit_instructions -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown --spirv-ext=+SPV_KHR_bit_instructions %s -o - -filetype=obj | spirv-val %}
 
 ; CHECK: OpCapability Shader
 ; CHECK-NOT: OpCapability BitInstructions
diff --git a/llvm/test/CodeGen/SPIRV/get-global-id-non-integer-dim.ll b/llvm/test/CodeGen/SPIRV/get-global-id-non-integer-dim.ll
index a9c19df446eaa..39bb4ab5659a0 100644
--- a/llvm/test/CodeGen/SPIRV/get-global-id-non-integer-dim.ll
+++ b/llvm/test/CodeGen/SPIRV/get-global-id-non-integer-dim.ll
@@ -1,5 +1,7 @@
 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown -spirv-ext=+SPV_KHR_bfloat16 %s -o - | FileCheck %s
 ; RUN: llc -O2 -mtriple=spirv64-unknown-unknown -spirv-ext=+SPV_KHR_bfloat16 %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown -spirv-ext=+SPV_KHR_bfloat16 %s -o - -filetype=obj | spirv-val %}
+; RUN: %if spirv-tools %{ llc -O2 -mtriple=spirv64-unknown-unknown -spirv-ext=+SPV_KHR_bfloat16 %s -o - -filetype=obj | spirv-val %}
 
 ; get_global_id and its sibling workgroup-query builtins take an integer
 ; dimension index.
diff --git a/llvm/test/CodeGen/SPIRV/linkage/available-externally-global.ll b/llvm/test/CodeGen/SPIRV/linkage/available-externally-global.ll
index 93672265cbdd2..9996367785d87 100644
--- a/llvm/test/CodeGen/SPIRV/linkage/available-externally-global.ll
+++ b/llvm/test/CodeGen/SPIRV/linkage/available-externally-global.ll
@@ -3,6 +3,7 @@
 ; when -spirv-preserve-auxdata is passed.
 
 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=NOAUX
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
 
 ; NOAUX-NOT: NonSemantic.AuxData
 ; NOAUX-DAG: OpName %[[#ae_gv:]] "ae_gv"
@@ -13,6 +14,7 @@
 ; Linkage annotation recording the original available_externally linkage.
 
 ; RUN: llc -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info --spirv-preserve-auxdata %s -o - | FileCheck %s --check-prefix=AUX
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_non_semantic_info --spirv-preserve-auxdata %s -o - -filetype=obj | spirv-val %}
 
 ; AUX-DAG: %[[#auxset:]] = OpExtInstImport "NonSemantic.AuxData"
 ; AUX-DAG: OpName %[[#ae_gv:]] "ae_gv"
diff --git a/llvm/test/CodeGen/SPIRV/malformed-mangled-builtin-name.ll b/llvm/test/CodeGen/SPIRV/malformed-mangled-builtin-name.ll
index e260e7333d332..c5e60b69c8060 100644
--- a/llvm/test/CodeGen/SPIRV/malformed-mangled-builtin-name.ll
+++ b/llvm/test/CodeGen/SPIRV/malformed-mangled-builtin-name.ll
@@ -1,6 +1,7 @@
 ; A call target with a malformed mangled name must not crash the demangler.
 
 ; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o /dev/null
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
 
 declare spir_func i64 @"_Z&3gmt_global_idj"(i32)
 



More information about the llvm-commits mailing list