blob: 8484beebea80ad50439eab93d26346ececb2f704 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 90
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
OpName %k "k"
OpName %tint_loop_idx "tint_loop_idx"
OpName %i "i"
OpName %tint_low_inc "tint_low_inc"
OpName %tint_carry "tint_carry"
OpName %tint_loop_idx_0 "tint_loop_idx"
OpName %j "j"
OpName %tint_low_inc_1 "tint_low_inc_1"
OpName %tint_carry_1 "tint_carry_1"
%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
%uint_4294967295 = OpConstant %uint 4294967295
%18 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%23 = OpConstantNull %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%int_2 = OpConstant %int 2
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%main = OpFunction %void None %3
%4 = OpLabel
%k = OpVariable %_ptr_Function_int Function
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function
%i = OpVariable %_ptr_Function_int Function
%tint_loop_idx_0 = OpVariable %_ptr_Function_v2uint Function
%j = OpVariable %_ptr_Function_int Function
OpStore %k %int_0
OpBranch %9
%9 = OpLabel
OpStore %tint_loop_idx %18
OpStore %i %int_0
OpBranch %12
%12 = OpLabel
OpLoopMerge %13 %11 None
OpBranch %10
%10 = OpLabel
%21 = OpLoad %v2uint %tint_loop_idx None
%22 = OpIEqual %v2bool %21 %23
%26 = OpAll %bool %22
OpSelectionMerge %27 None
OpBranchConditional %26 %28 %27
%28 = OpLabel
OpBranch %13
%27 = OpLabel
%29 = OpLoad %int %i None
%30 = OpSLessThan %bool %29 %int_2
OpSelectionMerge %32 None
OpBranchConditional %30 %32 %33
%33 = OpLabel
OpBranch %13
%32 = OpLabel
%34 = OpLoad %int %i None
OpSelectionMerge %37 None
OpSwitch %34 %35 0 %36
%35 = OpLabel
OpBranch %37
%36 = OpLabel
OpBranch %53
%53 = OpLabel
OpStore %tint_loop_idx_0 %18
OpStore %j %int_0
OpBranch %56
%56 = OpLabel
OpLoopMerge %57 %55 None
OpBranch %54
%54 = OpLabel
%60 = OpLoad %v2uint %tint_loop_idx_0 None
%61 = OpIEqual %v2bool %60 %23
%62 = OpAll %bool %61
OpSelectionMerge %63 None
OpBranchConditional %62 %64 %63
%64 = OpLabel
OpBranch %57
%63 = OpLabel
%65 = OpLoad %int %j None
%66 = OpSLessThan %bool %65 %int_2
OpSelectionMerge %67 None
OpBranchConditional %66 %67 %68
%68 = OpLabel
OpBranch %57
%67 = OpLabel
%69 = OpLoad %int %j None
OpSelectionMerge %73 None
OpSwitch %69 %70 0 %71 1 %72
%70 = OpLabel
OpBranch %73
%71 = OpLabel
OpBranch %55
%72 = OpLabel
%86 = OpLoad %int %k None
OpSelectionMerge %89 None
OpSwitch %86 %87 0 %88
%87 = OpLabel
OpBranch %89
%88 = OpLabel
OpBranch %55
%89 = OpLabel
OpBranch %73
%73 = OpLabel
OpBranch %55
%55 = OpLabel
%74 = OpAccessChain %_ptr_Function_uint %tint_loop_idx_0 %uint_0
%75 = OpLoad %uint %74 None
%tint_low_inc_1 = OpISub %uint %75 %uint_1
%77 = OpAccessChain %_ptr_Function_uint %tint_loop_idx_0 %uint_0
OpStore %77 %tint_low_inc_1 None
%78 = OpIEqual %bool %tint_low_inc_1 %uint_4294967295
%tint_carry_1 = OpSelect %uint %78 %uint_1 %uint_0
%80 = OpAccessChain %_ptr_Function_uint %tint_loop_idx_0 %uint_1
%81 = OpLoad %uint %80 None
%82 = OpISub %uint %81 %tint_carry_1
%83 = OpAccessChain %_ptr_Function_uint %tint_loop_idx_0 %uint_1
OpStore %83 %82 None
%84 = OpLoad %int %j None
%85 = OpIAdd %int %84 %int_2
OpStore %j %85 None
OpBranch %56
%57 = OpLabel
OpBranch %11
%37 = OpLabel
OpBranch %11
%11 = OpLabel
%38 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%41 = OpLoad %uint %38 None
%tint_low_inc = OpISub %uint %41 %uint_1
%44 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %44 %tint_low_inc None
%45 = OpIEqual %bool %tint_low_inc %uint_4294967295
%tint_carry = OpSelect %uint %45 %uint_1 %uint_0
%47 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%48 = OpLoad %uint %47 None
%49 = OpISub %uint %48 %tint_carry
%50 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %50 %49 None
%51 = OpLoad %int %i None
%52 = OpIAdd %int %51 %int_2
OpStore %i %52 None
OpBranch %12
%13 = OpLabel
OpReturn
OpFunctionEnd