blob: 1619b7e65df7fc9f4ea58c1c406db163a6b86ed7 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 67
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %some_loop_body "some_loop_body"
OpName %f "f"
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"
OpName %unused_entry_point "unused_entry_point"
%void = OpTypeVoid
%3 = OpTypeFunction %void
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%10 = OpConstantNull %int
%uint = OpTypeInt 32 0
%v2uint = OpTypeVector %uint 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_4294967295 = OpConstant %uint 4294967295
%20 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%int_0 = OpConstant %int 0
%26 = OpConstantNull %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%int_5 = OpConstant %int 5
%false = OpConstantFalse %bool
%int_30 = OpConstant %int 30
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%int_10 = OpConstant %int 10
%some_loop_body = OpFunction %void None %3
%4 = OpLabel
OpReturn
OpFunctionEnd
%f = OpFunction %void None %3
%6 = OpLabel
%j = OpVariable %_ptr_Function_int Function %10
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function
%i = OpVariable %_ptr_Function_int Function
OpBranch %11
%11 = OpLabel
OpStore %tint_loop_idx %20
OpStore %i %int_0
OpBranch %14
%14 = OpLabel
OpLoopMerge %15 %13 None
OpBranch %12
%12 = OpLabel
%24 = OpLoad %v2uint %tint_loop_idx None
%25 = OpIEqual %v2bool %24 %26
%29 = OpAll %bool %25
OpSelectionMerge %30 None
OpBranchConditional %29 %31 %30
%31 = OpLabel
OpBranch %15
%30 = OpLabel
%32 = OpLoad %int %i None
%33 = OpSLessThan %bool %32 %int_5
OpSelectionMerge %35 None
OpBranchConditional %33 %36 %37
%36 = OpLabel
%63 = OpLoad %int %j None
%39 = OpSLessThan %bool %63 %int_10
OpBranch %35
%37 = OpLabel
OpBranch %35
%35 = OpLabel
%38 = OpPhi %bool %39 %36 %false %37
OpSelectionMerge %41 None
OpBranchConditional %38 %41 %42
%42 = OpLabel
OpBranch %15
%41 = OpLabel
%43 = OpFunctionCall %void %some_loop_body
%44 = OpLoad %int %i None
%45 = OpIMul %int %44 %int_30
OpStore %j %45 None
OpBranch %13
%13 = OpLabel
%47 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%50 = OpLoad %uint %47 None
%tint_low_inc = OpISub %uint %50 %uint_1
%53 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %53 %tint_low_inc None
%54 = OpIEqual %bool %tint_low_inc %uint_4294967295
%tint_carry = OpSelect %uint %54 %uint_1 %uint_0
%56 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%57 = OpLoad %uint %56 None
%58 = OpISub %uint %57 %tint_carry
%59 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %59 %58 None
%60 = OpLoad %int %i None
%61 = OpIAdd %int %60 %int_1
OpStore %i %61 None
OpBranch %14
%15 = OpLabel
OpReturn
OpFunctionEnd
%unused_entry_point = OpFunction %void None %3
%66 = OpLabel
OpReturn
OpFunctionEnd