1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; TODO: re-enable spirv-val
; R/U/N: spirv-val %t.spv
; RUN: llvm-spirv -r -o - %t.spv | llvm-dis | FileCheck %s
OpCapability Addresses
OpCapability Kernel
OpCapability CooperativeMatrixKHR
OpExtension "SPV_KHR_cooperative_matrix"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "testCoopMat"
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%fnTy = OpTypeFunction %void %_ptr_CrossWorkgroup_uint
%uint_0 = OpConstant %uint 0
%uint_3 = OpConstant %uint 3
%uint_8 = OpConstant %uint 8
%uint_42 = OpConstant %uint 42
%matTy = OpTypeCooperativeMatrixKHR %uint %uint_3 %uint_8 %uint_8 %uint_0
%matConst = OpConstantComposite %matTy %uint_42
%1 = OpFunction %void None %fnTy
%outPtr = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%2 = OpLabel
OpCooperativeMatrixStoreKHR %outPtr %matConst %uint_0 %uint_8
OpReturn
OpFunctionEnd
; CHECK: call spir_func %spirv.CooperativeMatrixKHR._int_3_8_8_0 addrspace(1)* @__spirv_ConstantComposite_RPU3AS141__spirv_CooperativeMatrixKHR__int_3_8_8_0(i32 42)
|