| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 1 |
| ; Bound: 55 |
| ; Schema: 0 |
| OpCapability Shader |
| OpCapability VulkanMemoryModel |
| OpCapability VulkanMemoryModelDeviceScope |
| OpCapability CooperativeMatrixKHR |
| OpExtension "SPV_KHR_vulkan_memory_model" |
| OpExtension "SPV_KHR_cooperative_matrix" |
| OpMemoryModel Logical Vulkan |
| OpEntryPoint GLCompute %main "main" %main_local_invocation_index_Input |
| OpExecutionMode %main LocalSize 32 1 1 |
| OpName %v "v" |
| OpName %main_local_invocation_index_Input "main_local_invocation_index_Input" |
| OpName %main_inner "main_inner" |
| OpName %tint_local_index "tint_local_index" |
| OpName %m "m" |
| OpName %main "main" |
| OpDecorate %main_local_invocation_index_Input BuiltIn LocalInvocationIndex |
| %uint = OpTypeInt 32 0 |
| %uint_256 = OpConstant %uint 256 |
| %_arr_uint_uint_256 = OpTypeArray %uint %uint_256 |
| %_ptr_Workgroup__arr_uint_uint_256 = OpTypePointer Workgroup %_arr_uint_uint_256 |
| %v = OpVariable %_ptr_Workgroup__arr_uint_uint_256 Workgroup |
| %_ptr_Input_uint = OpTypePointer Input %uint |
| %main_local_invocation_index_Input = OpVariable %_ptr_Input_uint Input |
| %void = OpTypeVoid |
| %11 = OpTypeFunction %void %uint |
| %uint_2 = OpConstant %uint 2 |
| %uint_24840 = OpConstant %uint 24840 |
| %uint_64 = OpConstant %uint 64 |
| %bool = OpTypeBool |
| %uint_0 = OpConstant %uint 0 |
| %uint_8 = OpConstant %uint 8 |
| %_ptr_Workgroup_uint = OpTypePointer Workgroup %uint |
| %uint_3 = OpConstant %uint 3 |
| %float = OpTypeFloat 32 |
| %33 = OpTypeCooperativeMatrixKHR %float %uint_3 %uint_8 %uint_8 %uint_0 |
| %uint_1 = OpConstant %uint 1 |
| %uint_4 = OpConstant %uint 4 |
| %uint_32 = OpConstant %uint 32 |
| %51 = OpTypeFunction %void |
| %main_inner = OpFunction %void None %11 |
| %tint_local_index = OpFunctionParameter %uint |
| %12 = OpLabel |
| OpBranch %13 |
| %13 = OpLabel |
| OpBranch %16 |
| %16 = OpLabel |
| %18 = OpPhi %uint %tint_local_index %13 %19 %15 |
| OpLoopMerge %17 %15 None |
| OpBranch %14 |
| %14 = OpLabel |
| %42 = OpUGreaterThanEqual %bool %18 %uint_256 |
| OpSelectionMerge %43 None |
| OpBranchConditional %42 %44 %43 |
| %44 = OpLabel |
| OpBranch %17 |
| %43 = OpLabel |
| %45 = OpIMul %uint %18 %uint_4 |
| %47 = OpUDiv %uint %45 %uint_4 |
| %48 = OpAccessChain %_ptr_Workgroup_uint %v %47 |
| OpStore %48 %uint_0 NonPrivatePointer |
| OpBranch %15 |
| %15 = OpLabel |
| %19 = OpIAdd %uint %18 %uint_32 |
| OpBranch %16 |
| %17 = OpLabel |
| OpControlBarrier %uint_2 %uint_2 %uint_24840 |
| %23 = OpULessThanEqual %bool %uint_64 %uint_256 |
| %26 = OpSelect %uint %23 %uint_0 %uint_0 |
| %28 = OpSelect %uint %23 %uint_8 %uint_8 |
| %30 = OpAccessChain %_ptr_Workgroup_uint %v %26 |
| %m = OpCooperativeMatrixLoadKHR %33 %30 %uint_1 %28 NonPrivatePointer |
| %37 = OpULessThanEqual %bool %uint_64 %uint_256 |
| %38 = OpSelect %uint %37 %uint_0 %uint_0 |
| %39 = OpSelect %uint %37 %uint_8 %uint_8 |
| %40 = OpAccessChain %_ptr_Workgroup_uint %v %38 |
| OpCooperativeMatrixStoreKHR %40 %m %uint_0 %39 NonPrivatePointer |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %51 |
| %52 = OpLabel |
| %53 = OpLoad %uint %main_local_invocation_index_Input None |
| %54 = OpFunctionCall %void %main_inner %53 |
| OpReturn |
| OpFunctionEnd |