[llvm] [SPIRV] Cooperative matrix under the Vulkan/Shader flavor (PR #202049)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 23 05:02:08 PDT 2026
================
@@ -0,0 +1,22 @@
+; Check that the opaque CooperativeMatrix type under the Vulkan/Shader flavor,
+; target("spirv.CooperativeMatrixKHR", elem, scope, rows, cols, use), lowers to
+; OpTypeCooperativeMatrixKHR, gated behind the CooperativeMatrixKHR capability and
+; the SPV_KHR_cooperative_matrix extension, and that it errors cleanly without it.
+; This is a text-emission check only; the type is forced via a by-value parameter,
+; so it is not run through spirv-val here.
+
+; RUN: not llc -O0 -mtriple=spirv-unknown-vulkan1.3-compute %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-vulkan1.3-compute --spirv-ext=+SPV_KHR_cooperative_matrix,+SPV_KHR_vulkan_memory_model %s -o - | FileCheck %s
+
+; CHECK-ERROR: LLVM ERROR: OpTypeCooperativeMatrixKHR type requires the following SPIR-V extension: SPV_KHR_cooperative_matrix
----------------
MrSidims wrote:
I kinda feel, that the existing extensions/SPV_KHR_cooperative_matrix/cooperative_matrix.ll test covers the error emission.
https://github.com/llvm/llvm-project/pull/202049
More information about the llvm-commits
mailing list