| ; 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_1 = OpConstant %int 1 | |
| %int_4 = OpConstant %int 4 | |
| %true = OpConstantTrue %bool | |
| %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 = OpIAdd %int %22 %int_1 | |
| OpStore %i %24 | |
| %25 = OpLoad %int %i | |
| %27 = OpSGreaterThan %bool %25 %int_4 | |
| OpSelectionMerge %28 None | |
| OpBranchConditional %27 %29 %28 | |
| %29 = OpLabel | |
| OpStore %tint_return_flag %true | |
| OpStore %tint_return_value %int_1 | |
| OpBranch %19 | |
| %28 = OpLabel | |
| OpBranch %31 | |
| %31 = OpLabel | |
| OpLoopMerge %32 %33 None | |
| OpBranch %34 | |
| %34 = OpLabel | |
| %35 = OpLoad %int %j | |
| %36 = OpIAdd %int %35 %int_1 | |
| OpStore %j %36 | |
| %37 = OpLoad %int %j | |
| %38 = OpSGreaterThan %bool %37 %int_4 | |
| OpSelectionMerge %39 None | |
| OpBranchConditional %38 %40 %39 | |
| %40 = OpLabel | |
| OpStore %tint_return_flag %true | |
| OpStore %tint_return_value %int_2 | |
| OpBranch %32 | |
| %39 = OpLabel | |
| OpBranch %33 | |
| %33 = OpLabel | |
| OpBranch %31 | |
| %32 = OpLabel | |
| OpBranch %19 | |
| %20 = OpLabel | |
| OpBranch %18 | |
| %19 = OpLabel | |
| %42 = OpLoad %int %tint_return_value | |
| OpReturnValue %42 | |
| OpFunctionEnd |