| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 38 | |
| ; 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 %some_loop_body "some_loop_body" | |
| OpName %f "f" | |
| OpName %j "j" | |
| OpName %i "i" | |
| %void = OpTypeVoid | |
| %1 = OpTypeFunction %void | |
| %int = OpTypeInt 32 1 | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %12 = OpConstantNull %int | |
| %int_5 = OpConstant %int 5 | |
| %bool = OpTypeBool | |
| %int_10 = OpConstant %int 10 | |
| %int_30 = OpConstant %int 30 | |
| %int_1 = OpConstant %int 1 | |
| %unused_entry_point = OpFunction %void None %1 | |
| %4 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %some_loop_body = OpFunction %void None %1 | |
| %6 = OpLabel | |
| OpReturn | |
| OpFunctionEnd | |
| %f = OpFunction %void None %1 | |
| %8 = OpLabel | |
| %j = OpVariable %_ptr_Function_int Function %12 | |
| %i = OpVariable %_ptr_Function_int Function %12 | |
| OpStore %i %12 | |
| OpBranch %14 | |
| %14 = OpLabel | |
| OpLoopMerge %15 %16 None | |
| OpBranch %17 | |
| %17 = OpLabel | |
| %19 = OpLoad %int %i | |
| %21 = OpSLessThan %bool %19 %int_5 | |
| OpSelectionMerge %23 None | |
| OpBranchConditional %21 %24 %23 | |
| %24 = OpLabel | |
| %25 = OpLoad %int %j | |
| %27 = OpSLessThan %bool %25 %int_10 | |
| OpBranch %23 | |
| %23 = OpLabel | |
| %28 = OpPhi %bool %21 %17 %27 %24 | |
| %18 = OpLogicalNot %bool %28 | |
| OpSelectionMerge %29 None | |
| OpBranchConditional %18 %30 %29 | |
| %30 = OpLabel | |
| OpBranch %15 | |
| %29 = OpLabel | |
| %31 = OpFunctionCall %void %some_loop_body | |
| %32 = OpLoad %int %i | |
| %34 = OpIMul %int %32 %int_30 | |
| OpStore %j %34 | |
| OpBranch %16 | |
| %16 = OpLabel | |
| %35 = OpLoad %int %i | |
| %37 = OpIAdd %int %35 %int_1 | |
| OpStore %i %37 | |
| OpBranch %14 | |
| %15 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |