| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 43 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %unused_entry_point "unused_entry_point" | |
| OpExecutionMode %unused_entry_point LocalSize 1 1 1 | |
| OpName %unused_entry_point "unused_entry_point" | |
| OpName %f "f" | |
| OpName %tint_return_flag "tint_return_flag" | |
| OpName %tint_return_value "tint_return_value" | |
| OpName %i "i" | |
| OpName %j "j" | |
| %void = OpTypeVoid | |
| %1 = OpTypeFunction %void | |
| %int = OpTypeInt 32 1 | |
| %5 = OpTypeFunction %int | |
| %bool = OpTypeBool | |
| %_ptr_Function_bool = OpTypePointer Function %bool | |
| %12 = OpConstantNull %bool | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %15 = OpConstantNull %int | |
| %int_4 = OpConstant %int 4 | |
| %true = OpConstantTrue %bool | |
| %int_1 = OpConstant %int 1 | |
| %int_2 = OpConstant %int 2 | |
| %unused_entry_point = OpFunction %void None %1 | |
| %4 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %f = OpFunction %int None %5 | |
| %8 = OpLabel | |
| %tint_return_flag = OpVariable %_ptr_Function_bool Function %12 | |
| %tint_return_value = OpVariable %_ptr_Function_int Function %15 | |
| %i = OpVariable %_ptr_Function_int Function %15 | |
| %j = OpVariable %_ptr_Function_int Function %15 | |
| OpBranch %18 | |
| %18 = OpLabel | |
| OpLoopMerge %19 %20 None | |
| OpBranch %21 | |
| %21 = OpLabel | |
| %22 = OpLoad %int %i | |
| %24 = OpSGreaterThan %bool %22 %int_4 | |
| OpSelectionMerge %25 None | |
| OpBranchConditional %24 %26 %25 | |
| %26 = OpLabel | |
| OpStore %tint_return_flag %true | |
| OpStore %tint_return_value %int_1 | |
| OpBranch %19 | |
| %25 = OpLabel | |
| OpBranch %29 | |
| %29 = OpLabel | |
| OpLoopMerge %30 %31 None | |
| OpBranch %32 | |
| %32 = OpLabel | |
| %33 = OpLoad %int %j | |
| %34 = OpSGreaterThan %bool %33 %int_4 | |
| OpSelectionMerge %35 None | |
| OpBranchConditional %34 %36 %35 | |
| %36 = OpLabel | |
| OpStore %tint_return_flag %true | |
| OpStore %tint_return_value %int_2 | |
| OpBranch %30 | |
| %35 = OpLabel | |
| OpBranch %31 | |
| %31 = OpLabel | |
| %38 = OpLoad %int %j | |
| %39 = OpIAdd %int %38 %int_1 | |
| OpStore %j %39 | |
| OpBranch %29 | |
| %30 = OpLabel | |
| OpBranch %19 | |
| %20 = OpLabel | |
| %40 = OpLoad %int %i | |
| %41 = OpIAdd %int %40 %int_1 | |
| OpStore %i %41 | |
| OpBranch %18 | |
| %19 = OpLabel | |
| %42 = OpLoad %int %tint_return_value | |
| OpReturnValue %42 | |
| OpFunctionEnd |