blob: 458006a9e28b2dda76a652636fa9f7a79d4285da [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 57
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
OpName %j "j"
OpName %tint_loop_idx "tint_loop_idx"
OpName %i "i"
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
%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
%j = OpVariable %_ptr_Function_int Function
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function
%i = OpVariable %_ptr_Function_int Function
OpStore %j %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
%53 = OpLoad %int %j None
OpSelectionMerge %56 None
OpSwitch %53 %54 0 %55
%54 = OpLabel
OpBranch %56
%55 = OpLabel
OpBranch %11
%56 = OpLabel
OpBranch %37
%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