blob: 961b58385f0e2408c610c72c8e3aa5bbfe909a38 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 51
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %f "f"
OpName %i "i"
OpName %tint_loop_idx "tint_loop_idx"
OpName %tint_low_inc "tint_low_inc"
OpName %tint_carry "tint_carry"
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%int_0 = OpConstant %int 0
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%18 = OpConstantNull %v2uint
%uint_4294967295 = OpConstant %uint 4294967295
%21 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%int_4 = OpConstant %int 4
%f = OpFunction %void None %3
%4 = OpLabel
%i = OpVariable %_ptr_Function_int Function
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function %18
OpStore %i %int_0
OpBranch %9
%9 = OpLabel
OpBranch %12
%12 = OpLabel
OpLoopMerge %13 %11 None
OpBranch %10
%10 = OpLabel
%19 = OpLoad %v2uint %tint_loop_idx None
%20 = OpIEqual %v2bool %19 %21
%25 = OpAll %bool %20
OpSelectionMerge %26 None
OpBranchConditional %25 %27 %26
%27 = OpLabel
OpBranch %13
%26 = OpLabel
%28 = OpLoad %int %i None
OpSelectionMerge %31 None
OpSwitch %28 %29 0 %30
%30 = OpLabel
OpBranch %11
%29 = OpLabel
OpBranch %31
%31 = OpLabel
OpBranch %11
%11 = OpLabel
%32 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%35 = OpLoad %uint %32 None
%tint_low_inc = OpIAdd %uint %35 %uint_1
%38 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %38 %tint_low_inc None
%39 = OpIEqual %bool %tint_low_inc %uint_0
%tint_carry = OpSelect %uint %39 %uint_1 %uint_0
%41 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%42 = OpLoad %uint %41 None
%43 = OpIAdd %uint %42 %tint_carry
%44 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %44 %43 None
%45 = OpLoad %int %i None
%46 = OpIAdd %int %45 %int_1
OpStore %i %46 None
%48 = OpLoad %int %i None
%49 = OpSGreaterThanEqual %bool %48 %int_4
OpBranchConditional %49 %13 %12
%13 = OpLabel
OpReturn
OpFunctionEnd