blob: a5324c85852e52347ef05115fcd86d6ec733968d [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 68
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f 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"
%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
%uint_30 = OpConstant %uint 30
%_ptr_Function_uint = OpTypePointer Function %uint
%uint_0 = OpConstant %uint 0
%uint_1 = OpConstant %uint 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
%66 = OpLoad %int %j None
%39 = OpSLessThan %bool %66 %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 = OpBitcast %uint %44
%46 = OpIMul %uint %45 %uint_30
%48 = OpBitcast %int %46
OpStore %j %48 None
OpBranch %13
%13 = OpLabel
%49 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%52 = OpLoad %uint %49 None
%tint_low_inc = OpISub %uint %52 %uint_1
%55 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %55 %tint_low_inc None
%56 = OpIEqual %bool %tint_low_inc %uint_4294967295
%tint_carry = OpSelect %uint %56 %uint_1 %uint_0
%58 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%59 = OpLoad %uint %58 None
%60 = OpISub %uint %59 %tint_carry
%61 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %61 %60 None
%62 = OpLoad %int %i None
%63 = OpBitcast %uint %62
%64 = OpIAdd %uint %63 %uint_1
%65 = OpBitcast %int %64
OpStore %i %65 None
OpBranch %14
%15 = OpLabel
OpReturn
OpFunctionEnd