blob: f177fa1d190a510c4a7cb24536657cb84becaf76 [file] [log] [blame]
warning: parameter 'dimInner' of 'mm_matMul_i1_i1_i1_' must be uniform
note: 'workgroupBarrier' must only be called from uniform control flow
note: reading from module-scope private variable 'dimInner_1' may result in a non-uniform value
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 630
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main" %gl_LocalInvocationID_param_1 %gl_GlobalInvocationID_param_1 %local_invocation_index_1
OpExecutionMode %main LocalSize 1 64 1
OpName %gl_LocalInvocationID_param_1 "gl_LocalInvocationID_param_1"
OpName %gl_GlobalInvocationID_param_1 "gl_GlobalInvocationID_param_1"
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %dimAOuter_1 "dimAOuter_1"
OpName %Uniforms "Uniforms"
OpMemberName %Uniforms 0 "NAN"
OpMemberName %Uniforms 1 "aShape"
OpMemberName %Uniforms 2 "bShape"
OpMemberName %Uniforms 3 "outShape"
OpMemberName %Uniforms 4 "outShapeStrides"
OpName %x_48 "x_48"
OpName %dimInner_1 "dimInner_1"
OpName %dimBOuter_1 "dimBOuter_1"
OpName %ssbOut "ssbOut"
OpMemberName %ssbOut 0 "result"
OpName %x_54 "x_54"
OpName %gl_LocalInvocationID "gl_LocalInvocationID"
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID"
OpName %mm_Asub "mm_Asub"
OpName %mm_Bsub "mm_Bsub"
OpName %ssbA "ssbA"
OpMemberName %ssbA 0 "A"
OpName %x_165 "x_165"
OpName %batch "batch"
OpName %ssbB "ssbB"
OpMemberName %ssbB 0 "B"
OpName %x_185 "x_185"
OpName %coordsInBounds_vi2_vi2_ "coordsInBounds_vi2_vi2_"
OpName %coord "coord"
OpName %shape "shape"
OpName %x_87 "x_87"
OpName %x_88_phi "x_88_phi"
OpName %mm_readA_i1_i1_ "mm_readA_i1_i1_"
OpName %row "row"
OpName %col "col"
OpName %batchASize "batchASize"
OpName %param_10 "param_10"
OpName %param_11 "param_11"
OpName %x_430 "x_430"
OpName %mm_readB_i1_i1_ "mm_readB_i1_i1_"
OpName %row_1 "row_1"
OpName %col_1 "col_1"
OpName %batchBSize "batchBSize"
OpName %param_12 "param_12"
OpName %param_13 "param_13"
OpName %x_468 "x_468"
OpName %getOutputFlatIndex_vi3_ "getOutputFlatIndex_vi3_"
OpName %coords "coords"
OpName %setOutput_i1_f1_ "setOutput_i1_f1_"
OpName %flatIndex "flatIndex"
OpName %value "value"
OpName %setOutput_i1_i1_i1_f1_ "setOutput_i1_i1_i1_f1_"
OpName %d0 "d0"
OpName %d1 "d1"
OpName %d2 "d2"
OpName %value_1 "value_1"
OpName %flatIndex_1 "flatIndex_1"
OpName %param "param"
OpName %param_1 "param_1"
OpName %param_2 "param_2"
OpName %mm_write_i1_i1_f1_ "mm_write_i1_i1_f1_"
OpName %row_2 "row_2"
OpName %col_2 "col_2"
OpName %value_2 "value_2"
OpName %outCoord "outCoord"
OpName %param_14 "param_14"
OpName %param_15 "param_15"
OpName %param_16 "param_16"
OpName %param_17 "param_17"
OpName %mm_matMul_i1_i1_i1_ "mm_matMul_i1_i1_i1_"
OpName %dimAOuter "dimAOuter"
OpName %dimInner "dimInner"
OpName %dimBOuter "dimBOuter"
OpName %tileRow "tileRow"
OpName %tileCol "tileCol"
OpName %globalRow "globalRow"
OpName %globalCol "globalCol"
OpName %numTiles "numTiles"
OpName %innerRow "innerRow"
OpName %innerCol "innerCol"
OpName %acc "acc"
OpName %tileColA "tileColA"
OpName %tileRowB "tileRowB"
OpName %t "t"
OpName %innerRow_1 "innerRow_1"
OpName %innerCol_1 "innerCol_1"
OpName %inputRow "inputRow"
OpName %inputCol "inputCol"
OpName %param_3 "param_3"
OpName %param_4 "param_4"
OpName %innerRow_2 "innerRow_2"
OpName %innerCol_2 "innerCol_2"
OpName %inputRow_1 "inputRow_1"
OpName %inputCol_1 "inputCol_1"
OpName %param_5 "param_5"
OpName %param_6 "param_6"
OpName %k "k"
OpName %inner "inner"
OpName %BCached "BCached"
OpName %innerRow_3 "innerRow_3"
OpName %ACached "ACached"
OpName %innerCol_3 "innerCol_3"
OpName %innerRow_4 "innerRow_4"
OpName %innerCol_4 "innerCol_4"
OpName %param_7 "param_7"
OpName %param_8 "param_8"
OpName %param_9 "param_9"
OpName %x_393 "x_393"
OpName %x_394_phi "x_394_phi"
OpName %main_1 "main_1"
OpName %param_18 "param_18"
OpName %param_19 "param_19"
OpName %param_20 "param_20"
OpName %main_inner "main_inner"
OpName %gl_LocalInvocationID_param "gl_LocalInvocationID_param"
OpName %gl_GlobalInvocationID_param "gl_GlobalInvocationID_param"
OpName %local_invocation_index "local_invocation_index"
OpName %idx "idx"
OpName %main "main"
OpDecorate %gl_LocalInvocationID_param_1 BuiltIn LocalInvocationId
OpDecorate %gl_GlobalInvocationID_param_1 BuiltIn GlobalInvocationId
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpDecorate %Uniforms Block
OpMemberDecorate %Uniforms 0 Offset 0
OpMemberDecorate %Uniforms 1 Offset 16
OpMemberDecorate %Uniforms 2 Offset 32
OpMemberDecorate %Uniforms 3 Offset 48
OpMemberDecorate %Uniforms 4 Offset 64
OpDecorate %x_48 NonWritable
OpDecorate %x_48 DescriptorSet 0
OpDecorate %x_48 Binding 3
OpDecorate %ssbOut Block
OpMemberDecorate %ssbOut 0 Offset 0
OpDecorate %_runtimearr_float ArrayStride 4
OpDecorate %x_54 DescriptorSet 0
OpDecorate %x_54 Binding 0
OpDecorate %_arr_float_uint_64 ArrayStride 4
OpDecorate %_arr__arr_float_uint_64_uint_64 ArrayStride 256
OpDecorate %_arr_float_uint_1 ArrayStride 4
OpDecorate %_arr__arr_float_uint_1_uint_64 ArrayStride 4
OpDecorate %ssbA Block
OpMemberDecorate %ssbA 0 Offset 0
OpDecorate %x_165 NonWritable
OpDecorate %x_165 DescriptorSet 0
OpDecorate %x_165 Binding 1
OpDecorate %ssbB Block
OpMemberDecorate %ssbB 0 Offset 0
OpDecorate %x_185 NonWritable
OpDecorate %x_185 DescriptorSet 0
OpDecorate %x_185 Binding 2
OpDecorate %_arr__arr_float_uint_1_uint_1 ArrayStride 4
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%gl_LocalInvocationID_param_1 = OpVariable %_ptr_Input_v3uint Input
%gl_GlobalInvocationID_param_1 = OpVariable %_ptr_Input_v3uint Input
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%11 = OpConstantNull %int
%dimAOuter_1 = OpVariable %_ptr_Private_int Private %11
%float = OpTypeFloat 32
%v3int = OpTypeVector %int 3
%v2int = OpTypeVector %int 2
%Uniforms = OpTypeStruct %float %v3int %v3int %v3int %v2int
%_ptr_Uniform_Uniforms = OpTypePointer Uniform %Uniforms
%x_48 = OpVariable %_ptr_Uniform_Uniforms Uniform
%dimInner_1 = OpVariable %_ptr_Private_int Private %11
%dimBOuter_1 = OpVariable %_ptr_Private_int Private %11
%_runtimearr_float = OpTypeRuntimeArray %float
%ssbOut = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_ssbOut = OpTypePointer StorageBuffer %ssbOut
%x_54 = OpVariable %_ptr_StorageBuffer_ssbOut StorageBuffer
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
%26 = OpConstantNull %v3uint
%gl_LocalInvocationID = OpVariable %_ptr_Private_v3uint Private %26
%gl_GlobalInvocationID = OpVariable %_ptr_Private_v3uint Private %26
%uint_64 = OpConstant %uint 64
%_arr_float_uint_64 = OpTypeArray %float %uint_64
%_arr__arr_float_uint_64_uint_64 = OpTypeArray %_arr_float_uint_64 %uint_64
%_ptr_Workgroup__arr__arr_float_uint_64_uint_64 = OpTypePointer Workgroup %_arr__arr_float_uint_64_uint_64
%mm_Asub = OpVariable %_ptr_Workgroup__arr__arr_float_uint_64_uint_64 Workgroup
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%_arr__arr_float_uint_1_uint_64 = OpTypeArray %_arr_float_uint_1 %uint_64
%_ptr_Workgroup__arr__arr_float_uint_1_uint_64 = OpTypePointer Workgroup %_arr__arr_float_uint_1_uint_64
%mm_Bsub = OpVariable %_ptr_Workgroup__arr__arr_float_uint_1_uint_64 Workgroup
%ssbA = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_ssbA = OpTypePointer StorageBuffer %ssbA
%x_165 = OpVariable %_ptr_StorageBuffer_ssbA StorageBuffer
%batch = OpVariable %_ptr_Private_int Private %11
%ssbB = OpTypeStruct %_runtimearr_float
%_ptr_StorageBuffer_ssbB = OpTypePointer StorageBuffer %ssbB
%x_185 = OpVariable %_ptr_StorageBuffer_ssbB StorageBuffer
%bool = OpTypeBool
%_ptr_Function_v2int = OpTypePointer Function %v2int
%45 = OpTypeFunction %bool %_ptr_Function_v2int %_ptr_Function_v2int
%_ptr_Function_bool = OpTypePointer Function %bool
%54 = OpConstantNull %bool
%59 = OpConstantNull %v2int
%v2bool = OpTypeVector %bool 2
%_ptr_Function_int = OpTypePointer Function %int
%72 = OpTypeFunction %float %_ptr_Function_int %_ptr_Function_int
%_ptr_Function_float = OpTypePointer Function %float
%83 = OpConstantNull %float
%_ptr_Uniform_int = OpTypePointer Uniform %int
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
%_ptr_Function_v3int = OpTypePointer Function %v3int
%162 = OpTypeFunction %int %_ptr_Function_v3int
%uint_4 = OpConstant %uint 4
%v3float = OpTypeVector %float 3
%int_1 = OpConstant %int 1
%void = OpTypeVoid
%181 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_float
%192 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int %_ptr_Function_float
%201 = OpConstantNull %v3int
%219 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_float
%248 = OpTypeFunction %void %_ptr_Function_int %_ptr_Function_int %_ptr_Function_int
%_arr__arr_float_uint_1_uint_1 = OpTypeArray %_arr_float_uint_1 %uint_1
%_ptr_Function__arr__arr_float_uint_1_uint_1 = OpTypePointer Function %_arr__arr_float_uint_1_uint_1
%264 = OpConstantNull %_arr__arr_float_uint_1_uint_1
%_ptr_Function__arr_float_uint_1 = OpTypePointer Function %_arr_float_uint_1
%284 = OpConstantNull %_arr_float_uint_1
%_ptr_Private_uint = OpTypePointer Private %uint
%int_64 = OpConstant %int 64
%_ptr_Workgroup_float = OpTypePointer Workgroup %float
%uint_264 = OpConstant %uint 264
%572 = OpTypeFunction %void
%594 = OpTypeFunction %void %v3uint %v3uint %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%604 = OpConstantNull %uint
%uint_4096 = OpConstant %uint 4096
%coordsInBounds_vi2_vi2_ = OpFunction %bool None %45
%coord = OpFunctionParameter %_ptr_Function_v2int
%shape = OpFunctionParameter %_ptr_Function_v2int
%51 = OpLabel
%x_87 = OpVariable %_ptr_Function_bool Function %54
%x_88_phi = OpVariable %_ptr_Function_bool Function %54
%57 = OpLoad %v2int %coord
%60 = OpSGreaterThanEqual %v2bool %57 %59
%58 = OpAll %bool %60
OpStore %x_88_phi %58
OpSelectionMerge %62 None
OpBranchConditional %58 %63 %62
%63 = OpLabel
%65 = OpLoad %v2int %coord
%67 = OpLoad %v2int %shape
%69 = OpSLessThan %v2bool %65 %67
%68 = OpAll %bool %69
OpStore %x_87 %68
%70 = OpLoad %bool %x_87
OpStore %x_88_phi %70
OpBranch %62
%62 = OpLabel
%71 = OpLoad %bool %x_88_phi
OpReturnValue %71
OpFunctionEnd
%mm_readA_i1_i1_ = OpFunction %float None %72
%row = OpFunctionParameter %_ptr_Function_int
%col = OpFunctionParameter %_ptr_Function_int
%77 = OpLabel
%batchASize = OpVariable %_ptr_Function_int Function %11
%param_10 = OpVariable %_ptr_Function_v2int Function %59
%param_11 = OpVariable %_ptr_Function_v2int Function %59
%x_430 = OpVariable %_ptr_Function_float Function %83
%85 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_1 %uint_1
%86 = OpLoad %int %85
%88 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_1 %uint_2
%89 = OpLoad %int %88
%90 = OpIMul %int %86 %89
OpStore %batchASize %90
%92 = OpLoad %int %row
%94 = OpLoad %int %col
%95 = OpLoad %int %dimAOuter_1
%96 = OpLoad %int %dimInner_1
%97 = OpCompositeConstruct %v2int %92 %94
OpStore %param_10 %97
%98 = OpCompositeConstruct %v2int %95 %96
OpStore %param_11 %98
%99 = OpFunctionCall %bool %coordsInBounds_vi2_vi2_ %param_10 %param_11
OpSelectionMerge %102 None
OpBranchConditional %99 %103 %104
%103 = OpLabel
%105 = OpLoad %int %batch
%106 = OpLoad %int %batchASize
%108 = OpLoad %int %row
%109 = OpLoad %int %dimInner_1
%111 = OpLoad %int %col
%113 = OpIMul %int %105 %106
%114 = OpIMul %int %108 %109
%115 = OpIAdd %int %113 %114
%116 = OpIAdd %int %115 %111
%118 = OpAccessChain %_ptr_StorageBuffer_float %x_165 %uint_0 %116
%119 = OpLoad %float %118
OpStore %x_430 %119
OpBranch %102
%104 = OpLabel
OpStore %x_430 %83
OpBranch %102
%102 = OpLabel
%120 = OpLoad %float %x_430
OpReturnValue %120
OpFunctionEnd
%mm_readB_i1_i1_ = OpFunction %float None %72
%row_1 = OpFunctionParameter %_ptr_Function_int
%col_1 = OpFunctionParameter %_ptr_Function_int
%124 = OpLabel
%batchBSize = OpVariable %_ptr_Function_int Function %11
%param_12 = OpVariable %_ptr_Function_v2int Function %59
%param_13 = OpVariable %_ptr_Function_v2int Function %59
%x_468 = OpVariable %_ptr_Function_float Function %83
%129 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_2 %uint_1
%130 = OpLoad %int %129
%131 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_2 %uint_2
%132 = OpLoad %int %131
%133 = OpIMul %int %130 %132
OpStore %batchBSize %133
%135 = OpLoad %int %row_1
%137 = OpLoad %int %col_1
%138 = OpLoad %int %dimInner_1
%139 = OpLoad %int %dimBOuter_1
%140 = OpCompositeConstruct %v2int %135 %137
OpStore %param_12 %140
%141 = OpCompositeConstruct %v2int %138 %139
OpStore %param_13 %141
%142 = OpFunctionCall %bool %coordsInBounds_vi2_vi2_ %param_12 %param_13
OpSelectionMerge %145 None
OpBranchConditional %142 %146 %147
%146 = OpLabel
%148 = OpLoad %int %batch
%149 = OpLoad %int %batchBSize
%151 = OpLoad %int %row_1
%152 = OpLoad %int %dimBOuter_1
%154 = OpLoad %int %col_1
%155 = OpIMul %int %148 %149
%156 = OpIMul %int %151 %152
%157 = OpIAdd %int %155 %156
%158 = OpIAdd %int %157 %154
%159 = OpAccessChain %_ptr_StorageBuffer_float %x_185 %uint_0 %158
%160 = OpLoad %float %159
OpStore %x_468 %160
OpBranch %145
%147 = OpLabel
OpStore %x_468 %83
OpBranch %145
%145 = OpLabel
%161 = OpLoad %float %x_468
OpReturnValue %161
OpFunctionEnd
%getOutputFlatIndex_vi3_ = OpFunction %int None %162
%coords = OpFunctionParameter %_ptr_Function_v3int
%166 = OpLabel
%168 = OpLoad %v3int %coords
%170 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_4 %uint_0
%171 = OpLoad %int %170
%172 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_4 %uint_1
%173 = OpLoad %int %172
%176 = OpConvertSToF %v3float %168
%180 = OpCompositeConstruct %v3int %171 %173 %int_1
%178 = OpConvertSToF %v3float %180
%175 = OpDot %float %176 %178
%174 = OpConvertFToS %int %175
OpReturnValue %174
OpFunctionEnd
%setOutput_i1_f1_ = OpFunction %void None %181
%flatIndex = OpFunctionParameter %_ptr_Function_int
%value = OpFunctionParameter %_ptr_Function_float
%186 = OpLabel
%188 = OpLoad %int %flatIndex
%190 = OpLoad %float %value
%191 = OpAccessChain %_ptr_StorageBuffer_float %x_54 %uint_0 %188
OpStore %191 %190
OpReturn
OpFunctionEnd
%setOutput_i1_i1_i1_f1_ = OpFunction %void None %192
%d0 = OpFunctionParameter %_ptr_Function_int
%d1 = OpFunctionParameter %_ptr_Function_int
%d2 = OpFunctionParameter %_ptr_Function_int
%value_1 = OpFunctionParameter %_ptr_Function_float
%198 = OpLabel
%flatIndex_1 = OpVariable %_ptr_Function_int Function %11
%param = OpVariable %_ptr_Function_v3int Function %201
%param_1 = OpVariable %_ptr_Function_int Function %11
%param_2 = OpVariable %_ptr_Function_float Function %83
%205 = OpLoad %int %d0
%207 = OpLoad %int %d1
%209 = OpLoad %int %d2
%210 = OpCompositeConstruct %v3int %205 %207 %209
OpStore %param %210
%211 = OpFunctionCall %int %getOutputFlatIndex_vi3_ %param
OpStore %flatIndex_1 %211
%213 = OpLoad %int %flatIndex_1
OpStore %param_1 %213
%215 = OpLoad %float %value_1
OpStore %param_2 %215
%216 = OpFunctionCall %void %setOutput_i1_f1_ %param_1 %param_2
OpReturn
OpFunctionEnd
%mm_write_i1_i1_f1_ = OpFunction %void None %219
%row_2 = OpFunctionParameter %_ptr_Function_int
%col_2 = OpFunctionParameter %_ptr_Function_int
%value_2 = OpFunctionParameter %_ptr_Function_float
%224 = OpLabel
%outCoord = OpVariable %_ptr_Function_v3int Function %201
%param_14 = OpVariable %_ptr_Function_int Function %11
%param_15 = OpVariable %_ptr_Function_int Function %11
%param_16 = OpVariable %_ptr_Function_int Function %11
%param_17 = OpVariable %_ptr_Function_float Function %83
%230 = OpLoad %int %batch
%232 = OpLoad %int %row_2
%234 = OpLoad %int %col_2
%235 = OpCompositeConstruct %v3int %230 %232 %234
OpStore %outCoord %235
%236 = OpLoad %int %batch
OpStore %param_14 %236
%238 = OpLoad %int %row_2
OpStore %param_15 %238
%240 = OpLoad %int %col_2
OpStore %param_16 %240
%242 = OpLoad %float %value_2
OpStore %param_17 %242
%243 = OpFunctionCall %void %setOutput_i1_i1_i1_f1_ %param_14 %param_15 %param_16 %param_17
OpReturn
OpFunctionEnd
%mm_matMul_i1_i1_i1_ = OpFunction %void None %248
%dimAOuter = OpFunctionParameter %_ptr_Function_int
%dimInner = OpFunctionParameter %_ptr_Function_int
%dimBOuter = OpFunctionParameter %_ptr_Function_int
%253 = OpLabel
%tileRow = OpVariable %_ptr_Function_int Function %11
%tileCol = OpVariable %_ptr_Function_int Function %11
%globalRow = OpVariable %_ptr_Function_int Function %11
%globalCol = OpVariable %_ptr_Function_int Function %11
%numTiles = OpVariable %_ptr_Function_int Function %11
%innerRow = OpVariable %_ptr_Function_int Function %11
%innerCol = OpVariable %_ptr_Function_int Function %11
%acc = OpVariable %_ptr_Function__arr__arr_float_uint_1_uint_1 Function %264
%tileColA = OpVariable %_ptr_Function_int Function %11
%tileRowB = OpVariable %_ptr_Function_int Function %11
%t = OpVariable %_ptr_Function_int Function %11
%innerRow_1 = OpVariable %_ptr_Function_int Function %11
%innerCol_1 = OpVariable %_ptr_Function_int Function %11
%inputRow = OpVariable %_ptr_Function_int Function %11
%inputCol = OpVariable %_ptr_Function_int Function %11
%param_3 = OpVariable %_ptr_Function_int Function %11
%param_4 = OpVariable %_ptr_Function_int Function %11
%innerRow_2 = OpVariable %_ptr_Function_int Function %11
%innerCol_2 = OpVariable %_ptr_Function_int Function %11
%inputRow_1 = OpVariable %_ptr_Function_int Function %11
%inputCol_1 = OpVariable %_ptr_Function_int Function %11
%param_5 = OpVariable %_ptr_Function_int Function %11
%param_6 = OpVariable %_ptr_Function_int Function %11
%k = OpVariable %_ptr_Function_int Function %11
%inner = OpVariable %_ptr_Function_int Function %11
%BCached = OpVariable %_ptr_Function__arr_float_uint_1 Function %284
%innerRow_3 = OpVariable %_ptr_Function_int Function %11
%ACached = OpVariable %_ptr_Function_float Function %83
%innerCol_3 = OpVariable %_ptr_Function_int Function %11
%innerRow_4 = OpVariable %_ptr_Function_int Function %11
%innerCol_4 = OpVariable %_ptr_Function_int Function %11
%param_7 = OpVariable %_ptr_Function_int Function %11
%param_8 = OpVariable %_ptr_Function_int Function %11
%param_9 = OpVariable %_ptr_Function_float Function %83
%x_393 = OpVariable %_ptr_Function_bool Function %54
%x_394_phi = OpVariable %_ptr_Function_bool Function %54
%294 = OpAccessChain %_ptr_Private_uint %gl_LocalInvocationID %uint_1
%295 = OpLoad %uint %294
%296 = OpBitcast %int %295
%297 = OpIMul %int %296 %int_1
OpStore %tileRow %297
%298 = OpAccessChain %_ptr_Private_uint %gl_LocalInvocationID %uint_0
%299 = OpLoad %uint %298
%300 = OpBitcast %int %299
%301 = OpIMul %int %300 %int_1
OpStore %tileCol %301
%302 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_1
%303 = OpLoad %uint %302
%304 = OpBitcast %int %303
%305 = OpIMul %int %304 %int_1
OpStore %globalRow %305
%306 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_0
%307 = OpLoad %uint %306
%308 = OpBitcast %int %307
%309 = OpIMul %int %308 %int_1
OpStore %globalCol %309
%311 = OpLoad %int %dimInner
%312 = OpISub %int %311 %int_1
%314 = OpSDiv %int %312 %int_64
%315 = OpIAdd %int %314 %int_1
OpStore %numTiles %315
OpStore %innerRow %11
OpBranch %316
%316 = OpLabel
OpLoopMerge %317 %318 None
OpBranch %319
%319 = OpLabel
%320 = OpLoad %int %innerRow
%321 = OpSLessThan %bool %320 %int_1
OpSelectionMerge %322 None
OpBranchConditional %321 %323 %324
%323 = OpLabel
OpBranch %322
%324 = OpLabel
OpBranch %317
%322 = OpLabel
OpStore %innerCol %11
OpBranch %325
%325 = OpLabel
OpLoopMerge %326 %327 None
OpBranch %328
%328 = OpLabel
%329 = OpLoad %int %innerCol
%330 = OpSLessThan %bool %329 %int_1
OpSelectionMerge %331 None
OpBranchConditional %330 %332 %333
%332 = OpLabel
OpBranch %331
%333 = OpLabel
OpBranch %326
%331 = OpLabel
%334 = OpLoad %int %innerRow
%335 = OpLoad %int %innerCol
%336 = OpAccessChain %_ptr_Function_float %acc %334 %335
OpStore %336 %83
OpBranch %327
%327 = OpLabel
%337 = OpLoad %int %innerCol
%338 = OpIAdd %int %337 %int_1
OpStore %innerCol %338
OpBranch %325
%326 = OpLabel
OpBranch %318
%318 = OpLabel
%339 = OpLoad %int %innerRow
%340 = OpIAdd %int %339 %int_1
OpStore %innerRow %340
OpBranch %316
%317 = OpLabel
%341 = OpAccessChain %_ptr_Private_uint %gl_LocalInvocationID %uint_0
%342 = OpLoad %uint %341
%343 = OpBitcast %int %342
%344 = OpIMul %int %343 %int_64
OpStore %tileColA %344
%345 = OpAccessChain %_ptr_Private_uint %gl_LocalInvocationID %uint_1
%346 = OpLoad %uint %345
%347 = OpBitcast %int %346
%348 = OpIMul %int %347 %int_1
OpStore %tileRowB %348
OpStore %t %11
OpBranch %349
%349 = OpLabel
OpLoopMerge %350 %351 None
OpBranch %352
%352 = OpLabel
%353 = OpLoad %int %t
%354 = OpLoad %int %numTiles
%355 = OpSLessThan %bool %353 %354
OpSelectionMerge %356 None
OpBranchConditional %355 %357 %358
%357 = OpLabel
OpBranch %356
%358 = OpLabel
OpBranch %350
%356 = OpLabel
OpStore %innerRow_1 %11
OpBranch %359
%359 = OpLabel
OpLoopMerge %360 %361 None
OpBranch %362
%362 = OpLabel
%363 = OpLoad %int %innerRow_1
%364 = OpSLessThan %bool %363 %int_1
OpSelectionMerge %365 None
OpBranchConditional %364 %366 %367
%366 = OpLabel
OpBranch %365
%367 = OpLabel
OpBranch %360
%365 = OpLabel
OpStore %innerCol_1 %11
OpBranch %368
%368 = OpLabel
OpLoopMerge %369 %370 None
OpBranch %371
%371 = OpLabel
%372 = OpLoad %int %innerCol_1
%373 = OpSLessThan %bool %372 %int_64
OpSelectionMerge %374 None
OpBranchConditional %373 %375 %376
%375 = OpLabel
OpBranch %374
%376 = OpLabel
OpBranch %369
%374 = OpLabel
%377 = OpLoad %int %tileRow
%378 = OpLoad %int %innerRow_1
%379 = OpIAdd %int %377 %378
OpStore %inputRow %379
%380 = OpLoad %int %tileColA
%381 = OpLoad %int %innerCol_1
%382 = OpIAdd %int %380 %381
OpStore %inputCol %382
%383 = OpLoad %int %inputRow
%384 = OpLoad %int %inputCol
%385 = OpLoad %int %globalRow
%386 = OpLoad %int %innerRow_1
%387 = OpLoad %int %t
%388 = OpLoad %int %inputCol
%389 = OpIAdd %int %385 %386
OpStore %param_3 %389
%390 = OpIMul %int %387 %int_64
%391 = OpIAdd %int %390 %388
OpStore %param_4 %391
%392 = OpFunctionCall %float %mm_readA_i1_i1_ %param_3 %param_4
%396 = OpAccessChain %_ptr_Workgroup_float %mm_Asub %383 %384
OpStore %396 %392
OpBranch %370
%370 = OpLabel
%397 = OpLoad %int %innerCol_1
%398 = OpIAdd %int %397 %int_1
OpStore %innerCol_1 %398
OpBranch %368
%369 = OpLabel
OpBranch %361
%361 = OpLabel
%399 = OpLoad %int %innerRow_1
%400 = OpIAdd %int %399 %int_1
OpStore %innerRow_1 %400
OpBranch %359
%360 = OpLabel
OpStore %innerRow_2 %11
OpBranch %401
%401 = OpLabel
OpLoopMerge %402 %403 None
OpBranch %404
%404 = OpLabel
%405 = OpLoad %int %innerRow_2
%406 = OpSLessThan %bool %405 %int_1
OpSelectionMerge %407 None
OpBranchConditional %406 %408 %409
%408 = OpLabel
OpBranch %407
%409 = OpLabel
OpBranch %402
%407 = OpLabel
OpStore %innerCol_2 %11
OpBranch %410
%410 = OpLabel
OpLoopMerge %411 %412 None
OpBranch %413
%413 = OpLabel
%414 = OpLoad %int %innerCol_2
%415 = OpSLessThan %bool %414 %int_1
OpSelectionMerge %416 None
OpBranchConditional %415 %417 %418
%417 = OpLabel
OpBranch %416
%418 = OpLabel
OpBranch %411
%416 = OpLabel
%419 = OpLoad %int %tileRowB
%420 = OpLoad %int %innerRow_2
%421 = OpIAdd %int %419 %420
OpStore %inputRow_1 %421
%422 = OpLoad %int %tileCol
%423 = OpLoad %int %innerCol_2
%424 = OpIAdd %int %422 %423
OpStore %inputCol_1 %424
%425 = OpLoad %int %inputRow_1
%426 = OpLoad %int %inputCol_1
%427 = OpLoad %int %t
%428 = OpLoad %int %inputRow_1
%429 = OpLoad %int %globalCol
%430 = OpLoad %int %innerCol_2
%431 = OpIMul %int %427 %int_64
%432 = OpIAdd %int %431 %428
OpStore %param_5 %432
%433 = OpIAdd %int %429 %430
OpStore %param_6 %433
%434 = OpFunctionCall %float %mm_readB_i1_i1_ %param_5 %param_6
%437 = OpAccessChain %_ptr_Workgroup_float %mm_Bsub %425 %426
OpStore %437 %434
OpBranch %412
%412 = OpLabel
%438 = OpLoad %int %innerCol_2
%439 = OpIAdd %int %438 %int_1
OpStore %innerCol_2 %439
OpBranch %410
%411 = OpLabel
OpBranch %403
%403 = OpLabel
%440 = OpLoad %int %innerRow_2
%441 = OpIAdd %int %440 %int_1
OpStore %innerRow_2 %441
OpBranch %401
%402 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %k %11
OpBranch %444
%444 = OpLabel
OpLoopMerge %445 %446 None
OpBranch %447
%447 = OpLabel
%448 = OpLoad %int %k
%449 = OpSLessThan %bool %448 %int_64
OpSelectionMerge %450 None
OpBranchConditional %449 %451 %452
%451 = OpLabel
OpBranch %450
%452 = OpLabel
OpBranch %445
%450 = OpLabel
OpStore %inner %11
OpBranch %453
%453 = OpLabel
OpLoopMerge %454 %455 None
OpBranch %456
%456 = OpLabel
%457 = OpLoad %int %inner
%458 = OpSLessThan %bool %457 %int_1
OpSelectionMerge %459 None
OpBranchConditional %458 %460 %461
%460 = OpLabel
OpBranch %459
%461 = OpLabel
OpBranch %454
%459 = OpLabel
%462 = OpLoad %int %inner
%463 = OpLoad %int %k
%464 = OpLoad %int %tileCol
%465 = OpLoad %int %inner
%466 = OpIAdd %int %464 %465
%467 = OpAccessChain %_ptr_Workgroup_float %mm_Bsub %463 %466
%468 = OpLoad %float %467
%469 = OpAccessChain %_ptr_Function_float %BCached %462
OpStore %469 %468
OpBranch %455
%455 = OpLabel
%470 = OpLoad %int %inner
%471 = OpIAdd %int %470 %int_1
OpStore %inner %471
OpBranch %453
%454 = OpLabel
OpStore %innerRow_3 %11
OpBranch %472
%472 = OpLabel
OpLoopMerge %473 %474 None
OpBranch %475
%475 = OpLabel
%476 = OpLoad %int %innerRow_3
%477 = OpSLessThan %bool %476 %int_1
OpSelectionMerge %478 None
OpBranchConditional %477 %479 %480
%479 = OpLabel
OpBranch %478
%480 = OpLabel
OpBranch %473
%478 = OpLabel
%481 = OpLoad %int %tileRow
%482 = OpLoad %int %innerRow_3
%483 = OpLoad %int %k
%484 = OpIAdd %int %481 %482
%485 = OpAccessChain %_ptr_Workgroup_float %mm_Asub %484 %483
%486 = OpLoad %float %485
OpStore %ACached %486
OpStore %innerCol_3 %11
OpBranch %487
%487 = OpLabel
OpLoopMerge %488 %489 None
OpBranch %490
%490 = OpLabel
%491 = OpLoad %int %innerCol_3
%492 = OpSLessThan %bool %491 %int_1
OpSelectionMerge %493 None
OpBranchConditional %492 %494 %495
%494 = OpLabel
OpBranch %493
%495 = OpLabel
OpBranch %488
%493 = OpLabel
%496 = OpLoad %int %innerRow_3
%497 = OpLoad %int %innerCol_3
%498 = OpLoad %float %ACached
%499 = OpLoad %int %innerCol_3
%500 = OpAccessChain %_ptr_Function_float %BCached %499
%501 = OpLoad %float %500
%502 = OpAccessChain %_ptr_Function_float %acc %496 %497
%503 = OpLoad %float %502
%504 = OpAccessChain %_ptr_Function_float %acc %496 %497
%505 = OpFMul %float %498 %501
%506 = OpFAdd %float %503 %505
OpStore %504 %506
OpBranch %489
%489 = OpLabel
%507 = OpLoad %int %innerCol_3
%508 = OpIAdd %int %507 %int_1
OpStore %innerCol_3 %508
OpBranch %487
%488 = OpLabel
OpBranch %474
%474 = OpLabel
%509 = OpLoad %int %innerRow_3
%510 = OpIAdd %int %509 %int_1
OpStore %innerRow_3 %510
OpBranch %472
%473 = OpLabel
OpBranch %446
%446 = OpLabel
%511 = OpLoad %int %k
%512 = OpIAdd %int %511 %int_1
OpStore %k %512
OpBranch %444
%445 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpBranch %351
%351 = OpLabel
%514 = OpLoad %int %t
%515 = OpIAdd %int %514 %int_1
OpStore %t %515
OpBranch %349
%350 = OpLabel
OpStore %innerRow_4 %11
OpBranch %516
%516 = OpLabel
OpLoopMerge %517 %518 None
OpBranch %519
%519 = OpLabel
%520 = OpLoad %int %innerRow_4
%521 = OpSLessThan %bool %520 %int_1
OpSelectionMerge %522 None
OpBranchConditional %521 %523 %524
%523 = OpLabel
OpBranch %522
%524 = OpLabel
OpBranch %517
%522 = OpLabel
OpStore %innerCol_4 %11
OpBranch %525
%525 = OpLabel
OpLoopMerge %526 %527 None
OpBranch %528
%528 = OpLabel
%531 = OpLoad %int %innerCol_4
%532 = OpSLessThan %bool %531 %int_1
OpSelectionMerge %533 None
OpBranchConditional %532 %534 %535
%534 = OpLabel
OpBranch %533
%535 = OpLabel
OpBranch %526
%533 = OpLabel
%536 = OpLoad %int %globalCol
%537 = OpLoad %int %innerCol_4
%539 = OpLoad %int %dimBOuter
%540 = OpIAdd %int %536 %537
%541 = OpSLessThan %bool %540 %539
OpStore %x_394_phi %541
OpSelectionMerge %542 None
OpBranchConditional %541 %543 %542
%543 = OpLabel
%544 = OpLoad %int %globalRow
%545 = OpLoad %int %innerRow_4
%547 = OpLoad %int %dimAOuter
%548 = OpIAdd %int %544 %545
%549 = OpSLessThan %bool %548 %547
OpStore %x_393 %549
%550 = OpLoad %bool %x_393
OpStore %x_394_phi %550
OpBranch %542
%542 = OpLabel
%551 = OpLoad %bool %x_394_phi
OpSelectionMerge %552 None
OpBranchConditional %551 %553 %552
%553 = OpLabel
%554 = OpLoad %int %globalRow
%555 = OpLoad %int %innerRow_4
%556 = OpLoad %int %globalCol
%557 = OpLoad %int %innerCol_4
%558 = OpLoad %int %innerRow_4
%559 = OpLoad %int %innerCol_4
%560 = OpIAdd %int %554 %555
OpStore %param_7 %560
%561 = OpIAdd %int %556 %557
OpStore %param_8 %561
%562 = OpAccessChain %_ptr_Function_float %acc %558 %559
%563 = OpLoad %float %562
OpStore %param_9 %563
%564 = OpFunctionCall %void %mm_write_i1_i1_f1_ %param_7 %param_8 %param_9
OpBranch %552
%552 = OpLabel
OpBranch %527
%527 = OpLabel
%568 = OpLoad %int %innerCol_4
%569 = OpIAdd %int %568 %int_1
OpStore %innerCol_4 %569
OpBranch %525
%526 = OpLabel
OpBranch %518
%518 = OpLabel
%570 = OpLoad %int %innerRow_4
%571 = OpIAdd %int %570 %int_1
OpStore %innerRow_4 %571
OpBranch %516
%517 = OpLabel
OpReturn
OpFunctionEnd
%main_1 = OpFunction %void None %572
%574 = OpLabel
%param_18 = OpVariable %_ptr_Function_int Function %11
%param_19 = OpVariable %_ptr_Function_int Function %11
%param_20 = OpVariable %_ptr_Function_int Function %11
%578 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_1 %uint_1
%579 = OpLoad %int %578
OpStore %dimAOuter_1 %579
%580 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_1 %uint_2
%581 = OpLoad %int %580
OpStore %dimInner_1 %581
%582 = OpAccessChain %_ptr_Uniform_int %x_48 %uint_2 %uint_2
%583 = OpLoad %int %582
OpStore %dimBOuter_1 %583
%584 = OpAccessChain %_ptr_Private_uint %gl_GlobalInvocationID %uint_2
%585 = OpLoad %uint %584
%586 = OpBitcast %int %585
OpStore %batch %586
%587 = OpLoad %int %dimAOuter_1
OpStore %param_18 %587
%588 = OpLoad %int %dimInner_1
OpStore %param_19 %588
%589 = OpLoad %int %dimBOuter_1
OpStore %param_20 %589
%590 = OpFunctionCall %void %mm_matMul_i1_i1_i1_ %param_18 %param_19 %param_20
OpReturn
OpFunctionEnd
%main_inner = OpFunction %void None %594
%gl_LocalInvocationID_param = OpFunctionParameter %v3uint
%gl_GlobalInvocationID_param = OpFunctionParameter %v3uint
%local_invocation_index = OpFunctionParameter %uint
%599 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %604
%600 = OpUMod %uint %local_invocation_index %uint_1
%601 = OpAccessChain %_ptr_Workgroup_float %mm_Bsub %local_invocation_index %600
OpStore %601 %83
OpStore %idx %local_invocation_index
OpBranch %605
%605 = OpLabel
OpLoopMerge %606 %607 None
OpBranch %608
%608 = OpLabel
%610 = OpLoad %uint %idx
%612 = OpULessThan %bool %610 %uint_4096
%609 = OpLogicalNot %bool %612
OpSelectionMerge %613 None
OpBranchConditional %609 %614 %613
%614 = OpLabel
OpBranch %606
%613 = OpLabel
%615 = OpLoad %uint %idx
%616 = OpUDiv %uint %615 %uint_64
%617 = OpLoad %uint %idx
%618 = OpUMod %uint %617 %uint_64
%619 = OpAccessChain %_ptr_Workgroup_float %mm_Asub %616 %618
OpStore %619 %83
OpBranch %607
%607 = OpLabel
%620 = OpLoad %uint %idx
%621 = OpIAdd %uint %620 %uint_64
OpStore %idx %621
OpBranch %605
%606 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %gl_LocalInvocationID %gl_LocalInvocationID_param
OpStore %gl_GlobalInvocationID %gl_GlobalInvocationID_param
%623 = OpFunctionCall %void %main_1
OpReturn
OpFunctionEnd
%main = OpFunction %void None %572
%625 = OpLabel
%627 = OpLoad %v3uint %gl_LocalInvocationID_param_1
%628 = OpLoad %v3uint %gl_GlobalInvocationID_param_1
%629 = OpLoad %uint %local_invocation_index_1
%626 = OpFunctionCall %void %main_inner %627 %628 %629
OpReturn
OpFunctionEnd