[llvm] [NFC][SPIR-V] Enable testing using spirv-val in CodeGen tests (PR #192407)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 00:59:35 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: Arseniy Obolenskiy (aobolensk)
<details>
<summary>Changes</summary>
related to https://github.com/llvm/llvm-project/issues/190736
---
Patch is 109.27 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/192407.diff
161 Files Affected:
- (modified) llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/CheckCapKernelWithoutKernel.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/ExecutionMode_GLCompute.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_bool.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_int.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/OpVectorInsertDynamic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/SpecConstants/bool-spirv-specconstant.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/TruncToBool.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/assume.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/basic_int_types_spirvdis.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/branching/if-merging.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/capability-Int64Atomics-store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/capability-Int64Atomics.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/capability-Shader.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/capability-integers.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-float-point-constants.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-integers-constants.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/debug-info/no-nonsemantic-without-extension.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/event_no_group_cap.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/expect.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/builtin_printf.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_half.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_double.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_float.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_min_max/atomicrmw_fminfmax_half.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_16bit_atomics/atomic_bfloat16_load_store_xchg.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_16bit_atomics/atomic_int16_arithmetic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_16bit_atomics/atomic_int16_load_store_xchg_cmpxchg.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_16bit_atomics/atomicrmw_faddfsub_bfloat16.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_16bit_atomics/atomicrmw_fminfmax_bfloat16.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_bf16.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_checked.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_get_coord.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_packed.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_prefetch.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_joint_matrix/cooperative_matrix_tf32.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-barrier.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-empty-md.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-atomic.ll (+1-1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-struct.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-masked-load-store.ll (+1-1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_predicated_io/predicated_io_generic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_subgroups/builtin-op-wrappers.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_no_integer_wrap_decoration.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_KHR_uniform_group_instructions/uniform-group-instructions.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector/atomicrmw_faddfsub_vec_float16.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/SPV_NV_shader_atomic_fp16_vector/atomicrmw_fminfmax_vec_float16.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/enable-all-extensions-but-one.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/enable-all-extensions.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/extensions/unused-but-allowed-SPV_INTEL_arbitrary_precision_integers.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/alloca-load-store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/identity-function.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/multiple-anonymous-functions.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/trivial-function-definition.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/trivial-function-with-attributes.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/trivial-function-with-call.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/variadics-lowering-builtin-substr-in-name.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/function/variadics-lowering-namespace-printf.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/global-var-intrinsic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/half_extension.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/hlsl-intrinsics/rcp.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/hlsl-resources/cbuffer_unused.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/image-unoptimized.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/image.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/image_decl_func_arg.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/image_dim.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/call-complex-function.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/call-trivial-function.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/fcmp.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/float-casts.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/float-fast-flags.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/intrinsics.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/scalar-bitwise-operations.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/undef-nested-composite-store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/undef-simple-composite-store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/unreachable.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/vector-bitwise-operations.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/vector-floating-point-arithmetic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/instructions/vector-integer-arithmetic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/linked-list.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llc-pipeline.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/assume.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/bswap.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/ceil.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/ctlz.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/ctpop.ll (+1-1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/cttz.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/debugtrap.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/expect.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/fabs.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/fshl.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/fshr.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/invariant.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/maxnum.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/memset.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/nearbyint.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/llvm-intrinsics/sqrt.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/logical-access-chain.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/mangled_function.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/multi_md.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/no_capability_shader.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opaque_pointers.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/basic/get_global_offset.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/basic/progvar_prog_scope_init.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/basic/progvar_prog_scope_uninit.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/device_execution/execute_block.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/get_global_id.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/get_num_groups.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/metadata/fp_contractions_metadata.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/metadata/no_fp_contractions_metadata.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/opencl/metadata/opencl_version_metadata.ll (+3)
- (modified) llvm/test/CodeGen/SPIRV/opencl/vstore2.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/physical-layout/generator-magic-number.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/physical-layout/spirv-version.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/preprocess-metadata.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/pstruct.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/read_image.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/sitofp-with-bool.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/spec_const_decoration.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/spirv-tools-dis.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/spirv.Queue.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/spirv_param_decorations_quals.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/store.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/NoSignedUnsignedWrap.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpAllAny.ll (+1-1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpConstantBool.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpConstantSampler.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpImageQuerySize.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpImageReadMS.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/OpImageSampleExplicitLod.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/RelationalOperators.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/RelationalOperatorsFUnord.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/ReqdSubgroupSize.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/SpecConstantComposite.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/TransFNeg.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/image_get_size_with_access_qualifiers.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/memory_access.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/optional-core-features-multiple.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/readonly.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/sub_group_ballot.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/sub_group_clustered_reduce.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/sub_group_non_uniform_arithmetic.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/sub_group_non_uniform_vote.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/vec8.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/transcoding/vec_type_hint.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/uitofp-with-bool.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/vk-pushconstant-access.ll (+1)
- (modified) llvm/test/CodeGen/SPIRV/vk-pushconstant-layout-natural.ll (+1)
``````````diff
diff --git a/llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll b/llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll
index 345f21c260588..cb81df5b61019 100644
--- a/llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.ll
+++ b/llvm/test/CodeGen/SPIRV/AtomicBuiltinsFloat.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 %}
;; Types:
; CHECK: %[[#F32:]] = OpTypeFloat 32
diff --git a/llvm/test/CodeGen/SPIRV/CheckCapKernelWithoutKernel.ll b/llvm/test/CodeGen/SPIRV/CheckCapKernelWithoutKernel.ll
index c61b3d90eb25a..35eb9a124ab6f 100644
--- a/llvm/test/CodeGen/SPIRV/CheckCapKernelWithoutKernel.ll
+++ b/llvm/test/CodeGen/SPIRV/CheckCapKernelWithoutKernel.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 %}
@a = addrspace(2) constant i32 1, align 4
diff --git a/llvm/test/CodeGen/SPIRV/ExecutionMode_GLCompute.ll b/llvm/test/CodeGen/SPIRV/ExecutionMode_GLCompute.ll
index 9eb4fefb738b8..b696ef0e962fb 100644
--- a/llvm/test/CodeGen/SPIRV/ExecutionMode_GLCompute.ll
+++ b/llvm/test/CodeGen/SPIRV/ExecutionMode_GLCompute.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-DAG: OpEntryPoint GLCompute %[[#entry:]] "main"
; CHECK-DAG: OpExecutionMode %[[#entry]] LocalSize 4 8 16
diff --git a/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_bool.ll b/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_bool.ll
index 735b35d757e7d..24491f313490b 100644
--- a/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_bool.ll
+++ b/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_bool.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-SPIRV: OpFOrdGreaterThanEqual
; CHECK-SPIRV-NOT: OpSelect
diff --git a/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_int.ll b/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_int.ll
index 2baa06f0ab3b5..3399aa402f7f7 100644
--- a/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_int.ll
+++ b/llvm/test/CodeGen/SPIRV/FOrdGreaterThanEqual_int.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-SPIRV: %[[#result:]] = OpFOrdGreaterThanEqual %[[#]] %[[#]] %[[#]]
; CHECK-SPIRV: %[[#]] = OpSelect %[[#]] %[[#result]] %[[#]] %[[#]]
diff --git a/llvm/test/CodeGen/SPIRV/OpVectorInsertDynamic.ll b/llvm/test/CodeGen/SPIRV/OpVectorInsertDynamic.ll
index 8da39a1315249..8682e29f85ebd 100644
--- a/llvm/test/CodeGen/SPIRV/OpVectorInsertDynamic.ll
+++ b/llvm/test/CodeGen/SPIRV/OpVectorInsertDynamic.ll
@@ -4,6 +4,7 @@
;; }
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK: %[[#TypeInt:]] = OpTypeInt 32
; CHECK: %[[#TypeVector:]] = OpTypeVector %[[#TypeInt]] 8
diff --git a/llvm/test/CodeGen/SPIRV/SpecConstants/bool-spirv-specconstant.ll b/llvm/test/CodeGen/SPIRV/SpecConstants/bool-spirv-specconstant.ll
index f5a5cafaaefc2..c34af504052f1 100644
--- a/llvm/test/CodeGen/SPIRV/SpecConstants/bool-spirv-specconstant.ll
+++ b/llvm/test/CodeGen/SPIRV/SpecConstants/bool-spirv-specconstant.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 %}
; CHECK: OpDecorate %[[#BOOL_CONST:]] SpecId [[#]]
; CHECK: %[[#BOOL_TY:]] = OpTypeBool
diff --git a/llvm/test/CodeGen/SPIRV/TruncToBool.ll b/llvm/test/CodeGen/SPIRV/TruncToBool.ll
index 5d45f48e2603a..0be84390f9ad4 100644
--- a/llvm/test/CodeGen/SPIRV/TruncToBool.ll
+++ b/llvm/test/CodeGen/SPIRV/TruncToBool.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-SPIRV: OpBitwiseAnd
; CHECK-SPIRV-NEXT: OpINotEqual
diff --git a/llvm/test/CodeGen/SPIRV/assume.ll b/llvm/test/CodeGen/SPIRV/assume.ll
index 2f99d49d7d677..7bab12390824d 100644
--- a/llvm/test/CodeGen/SPIRV/assume.ll
+++ b/llvm/test/CodeGen/SPIRV/assume.ll
@@ -2,6 +2,7 @@
; RUN: llc -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=EXT,CHECK %s
; RUN: llc -mtriple=spirv32-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
; RUN: llc -mtriple=spirv64-unknown-unknown < %s | FileCheck --check-prefixes=NOEXT,CHECK %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s -o - -filetype=obj | spirv-val %}
; EXT-DAG: OpCapability ExpectAssumeKHR
; EXT-DAG: OpExtension "SPV_KHR_expect_assume"
diff --git a/llvm/test/CodeGen/SPIRV/basic_int_types_spirvdis.ll b/llvm/test/CodeGen/SPIRV/basic_int_types_spirvdis.ll
index 5eba16c964f16..52fe4106f1da9 100644
--- a/llvm/test/CodeGen/SPIRV/basic_int_types_spirvdis.ll
+++ b/llvm/test/CodeGen/SPIRV/basic_int_types_spirvdis.ll
@@ -1,6 +1,7 @@
; REQUIRES: spirv-tools
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - --filetype=obj | spirv-dis | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
define void @main() {
entry:
diff --git a/llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll b/llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll
index 2f49317dd913e..90a79ff78e6e5 100644
--- a/llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll
+++ b/llvm/test/CodeGen/SPIRV/branching/OpSwitch32.ll
@@ -15,6 +15,7 @@
;; bash$ clang -cc1 -triple spir64-unknown-unknown -x cl -cl-std=CL2.0 -O0 -include opencl.h -emit-llvm OpSwitch.cl -o test_32.ll
; RUN: llc -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-SPIRV: OpSwitch %[[#]] %[[#]] 0 %[[#]] 1 %[[#]]
diff --git a/llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll b/llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll
index fc488dd72b18c..decad40d11df0 100644
--- a/llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll
+++ b/llvm/test/CodeGen/SPIRV/branching/OpSwitchChar.ll
@@ -15,6 +15,7 @@
;; }
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-SPIRV: OpSwitch %[[#]] %[[#]] 0 %[[#]] 1 %[[#]] 2 %[[#]]
diff --git a/llvm/test/CodeGen/SPIRV/branching/if-merging.ll b/llvm/test/CodeGen/SPIRV/branching/if-merging.ll
index 18fbe417addf8..d51b3babe15bb 100644
--- a/llvm/test/CodeGen/SPIRV/branching/if-merging.ll
+++ b/llvm/test/CodeGen/SPIRV/branching/if-merging.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
;; NOTE: This does not check for structured control-flow operations.
diff --git a/llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll b/llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll
index b664a65a5829c..67e1cc447ce14 100644
--- a/llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll
+++ b/llvm/test/CodeGen/SPIRV/branching/if-non-merging.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-DAG: [[I32:%.+]] = OpTypeInt 32
; CHECK-DAG: [[BOOL:%.+]] = OpTypeBool
diff --git a/llvm/test/CodeGen/SPIRV/capability-Int64Atomics-store.ll b/llvm/test/CodeGen/SPIRV/capability-Int64Atomics-store.ll
index cc731b6ce57f3..8c97463546ffd 100644
--- a/llvm/test/CodeGen/SPIRV/capability-Int64Atomics-store.ll
+++ b/llvm/test/CodeGen/SPIRV/capability-Int64Atomics-store.ll
@@ -7,6 +7,7 @@
;; }
; 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 %}
; CHECK: OpCapability Int64Atomics
diff --git a/llvm/test/CodeGen/SPIRV/capability-Int64Atomics.ll b/llvm/test/CodeGen/SPIRV/capability-Int64Atomics.ll
index 5b22361b035ff..97151a8d88626 100644
--- a/llvm/test/CodeGen/SPIRV/capability-Int64Atomics.ll
+++ b/llvm/test/CodeGen/SPIRV/capability-Int64Atomics.ll
@@ -7,6 +7,7 @@
;; }
; 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 %}
; CHECK: OpCapability Int64Atomics
diff --git a/llvm/test/CodeGen/SPIRV/capability-Shader.ll b/llvm/test/CodeGen/SPIRV/capability-Shader.ll
index 76adcd04a1270..c9ce51d2731c8 100644
--- a/llvm/test/CodeGen/SPIRV/capability-Shader.ll
+++ b/llvm/test/CodeGen/SPIRV/capability-Shader.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-DAG: OpCapability Shader
;; Ensure no other capability is listed.
diff --git a/llvm/test/CodeGen/SPIRV/capability-integers.ll b/llvm/test/CodeGen/SPIRV/capability-integers.ll
index 259199a548cf9..a4085d1339cd6 100644
--- a/llvm/test/CodeGen/SPIRV/capability-integers.ll
+++ b/llvm/test/CodeGen/SPIRV/capability-integers.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-DAG: OpCapability Int8
; CHECK-DAG: OpCapability Int16
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll b/llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll
index 447cad6528dd4..8fed72b52912b 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-aggregate-constant.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
%aggregate = type { i8, i32 }
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll b/llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll
index 06ab469e70077..3778f59d76bc6 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-arbitrary-width-integers-constants-type-promotion.ll
@@ -1,4 +1,5 @@
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
define i4 @getConstantI4() {
ret i4 2 ; i4 => OpTypeInt 8
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll b/llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll
index c98f253aedfb4..c2c326f70c4ac 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-bool-constants.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
define i1 @getConstantTrue() {
ret i1 true
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-float-point-constants.ll b/llvm/test/CodeGen/SPIRV/constant/local-float-point-constants.ll
index 5764e95634222..66f9786626f5e 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-float-point-constants.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-float-point-constants.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
define half @getConstantFP16() {
ret half 0x3ff1340000000000 ; 0x3c4d represented as double.
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-integers-constants.ll b/llvm/test/CodeGen/SPIRV/constant/local-integers-constants.ll
index a7c04fa00e752..aeeb3a9d3d5cf 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-integers-constants.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-integers-constants.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
define i8 @getConstantI8() {
ret i8 2
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll b/llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll
index 210679021532a..17d24c4d332d7 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-null-constants.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
;; OpenCL global memory
define ptr addrspace(1) @getConstant1() {
diff --git a/llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll b/llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll
index 981ab08dbef33..b165d7670123e 100644
--- a/llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll
+++ b/llvm/test/CodeGen/SPIRV/constant/local-vector-matrix-constants.ll
@@ -1,4 +1,5 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
;; TODO: Add test for matrix. But how are they represented in LLVM IR?
diff --git a/llvm/test/CodeGen/SPIRV/debug-info/no-nonsemantic-without-extension.ll b/llvm/test/CodeGen/SPIRV/debug-info/no-nonsemantic-without-extension.ll
index 376a13742dc70..33542c614da57 100644
--- a/llvm/test/CodeGen/SPIRV/debug-info/no-nonsemantic-without-extension.ll
+++ b/llvm/test/CodeGen/SPIRV/debug-info/no-nonsemantic-without-extension.ll
@@ -4,6 +4,7 @@
; RUN: llc --verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - \
; RUN: | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
; CHECK-NOT: OpExtInstImport "NonSemantic.Shader.DebugInfo.100"
; CHECK-NOT: OpExtension "SPV_KHR_non_semantic_info"
diff --git a/llvm/test/CodeGen/SPIRV/event_no_group_cap.ll b/llvm/test/CodeGen/SPIRV/event_no_group_cap.ll
index e5da3163b53b4..148ecd7c3ccbe 100644
--- a/llvm/test/CodeGen/SPIRV/event_no_group_cap.ll
+++ b/llvm/test/CodeGen/SPIRV/event_no_group_cap.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 %}
; __kernel void test_fn( const __global char *src)
; {
diff --git a/llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll b/llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll
index d3131e5606857..90de1cab46a23 100644
--- a/llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll
+++ b/llvm/test/CodeGen/SPIRV/exec_mode_float_control_khr.ll
@@ -1,5 +1,6 @@
; RUN: llc -O0 -mtriple=spirv32v1.3-unknown-unknown %s -o - | FileCheck %s --check-prefixes=SPV
; RUN: llc -O0 -mtriple=spirv32v1.3-unknown-unknown %s --spirv-ext=+SPV_KHR_float_controls -o - | FileCheck %s --check-prefixes=SPVEXT
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32v1.3-unknown-unknown %s --spirv-ext=+SPV_KHR_float_controls -o - -filetype=obj | spirv-val %}
define dso_local dllexport spir_kernel void @k_float_controls_0(i32 %ibuf, i32 %obuf) local_unnamed_addr {
entry:
diff --git a/llvm/test/CodeGen/SPIRV/expect.ll b/llvm/test/CodeGen/SPIRV/expect.ll
index 251d870801c3c..8c59b140a19b9 100644
--- a/llvm/test/CodeGen/SPIRV/expect.ll
+++ b/llvm/test/CodeGen/SPIRV/expect.ll
@@ -2,6 +2,7 @@
; RUN: llc -verify-machineinstrs -mtriple=spirv64-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s | FileCheck --check-prefixes=CHECK,EXT %s
; RUN: llc -verify-machineinstrs -mtriple=spirv32-unknown-unknown < %s | FileCheck --check-prefixes=CHECK,NOEXT %s
; RUN: llc -verify-machineinstrs -mtriple=spirv64-unknown-unknown < %s | FileCheck --check-prefixes=CHECK,NOEXT %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_KHR_expect_assume < %s -o - -filetype=obj | spirv-val %}
; EXT: OpCapability ExpectAssumeKHR
; EXT-NEXT: OpExtension "SPV_KHR_expect_assume"
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/builtin_printf.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/builtin_printf.ll
index 093d172c5c1b1..81b1446f4089b 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/builtin_printf.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/builtin_printf.ll
@@ -1,5 +1,6 @@
; RUN: llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space %s -o - | FileCheck %s
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space %s -o - -filetype=obj | spirv-val %}
; CHECK: OpExtension "SPV_EXT_relaxed_printf_string_address_space"
; CHECK: %[[#]] = OpExtInst %[[#]] %[[#]] printf
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll
index 5a330dad47aa3..6ff7f00a47e4a 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_relaxed_printf_string_address_space/non-constant-printf.ll
@@ -4,6 +4,7 @@
; RUN: not llc -O0 -mtriple=spirv32-intel-unknown --spirv-ext=-SPV_EXT_relaxed_printf_string_address_space %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
; RUN: not llc -O0 -mtriple=spirv32-intel-unknown --spirv-ext=all,-SPV_EXT_relaxed_printf_string_address_space %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
; RUN: not llc -O0 -mtriple=spirv32-intel-unknown --spirv-ext=-SPV_EXT_relaxed_printf_string_address_space,all %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_relaxed_printf_string_address_space %s -o - -filetype=obj | spirv-val %}
; CHECK: OpExtension "SPV_EXT_relaxed_printf_string_address_space"
; CHECK: %[[#ExtInstSetId:]] = OpExtInstImport "OpenCL.std"
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll
index 5d53ea06232c0..f945d04643d75 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_EXT_shader_atomic_float_add/atomicrmw_faddfsub_double.ll
@@ -1,6 +1,7 @@
; RUN: not llc -O0 -mtriple=spirv32-unknown-unknown %s -o %t.spvt 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown --spirv-ext=+SPV_EXT_shader...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/192407
More information about the llvm-commits
mailing list