| 1 |
; REQUIRES: spirv-as |
| 2 |
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s |
| 3 |
; RUN: spirv-val %t.spv |
| 4 |
; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s |
| 5 |
|
| 6 |
OpCapability Addresses |
| 7 |
OpCapability Kernel |
| 8 |
OpCapability CooperativeMatrixKHR |
| 9 |
OpExtension "SPV_KHR_cooperative_matrix" |
| 10 |
OpMemoryModel Physical64 OpenCL |
| 11 |
OpEntryPoint Kernel %1 "testCoopMat" |
| 12 |
%void = OpTypeVoid |
| 13 |
%float = OpTypeFloat 32 |
| 14 |
%fnTy = OpTypeFunction %void |
| 15 |
%uint = OpTypeInt 32 0 |
| 16 |
%uint_3 = OpConstant %uint 3 |
| 17 |
%uint_0 = OpConstant %uint 0 |
| 18 |
%uint_8 = OpConstant %uint 8 |
| 19 |
%matTy = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_0 |
| 20 |
%1 = OpFunction %void None %fnTy |
| 21 |
%2 = OpLabel |
| 22 |
%3 = OpCooperativeMatrixLengthKHR %uint %matTy |
| 23 |
OpReturn |
| 24 |
OpFunctionEnd |
| 25 |
|
| 26 |
; CHECK: call spir_func i32 @_Z34__spirv_CooperativeMatrixLengthKHRPU3AS143__spirv_CooperativeMatrixKHR__float_3_8_8_0(target("spirv.CooperativeMatrixKHR", float, 3, 8, 8, 0) zeroinitializer) |