| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 1 | |
| ; Bound: 48 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint GLCompute %main "main" | |
| OpExecutionMode %main LocalSize 1 1 1 | |
| OpName %main "main" | |
| OpName %k "k" | |
| OpName %i "i" | |
| OpName %j "j" | |
| %void = OpTypeVoid | |
| %3 = OpTypeFunction %void | |
| %int = OpTypeInt 32 1 | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %int_0 = OpConstant %int 0 | |
| %int_2 = OpConstant %int 2 | |
| %bool = OpTypeBool | |
| %main = OpFunction %void None %3 | |
| %4 = OpLabel | |
| %k = OpVariable %_ptr_Function_int Function | |
| %i = OpVariable %_ptr_Function_int Function | |
| %j = OpVariable %_ptr_Function_int Function | |
| OpStore %k %int_0 | |
| OpBranch %9 | |
| %9 = OpLabel | |
| OpStore %i %int_0 | |
| OpBranch %12 | |
| %12 = OpLabel | |
| OpLoopMerge %13 %11 None | |
| OpBranch %10 | |
| %10 = OpLabel | |
| %15 = OpLoad %int %i None | |
| %16 = OpSLessThan %bool %15 %int_2 | |
| OpSelectionMerge %19 None | |
| OpBranchConditional %16 %19 %20 | |
| %20 = OpLabel | |
| OpBranch %13 | |
| %19 = OpLabel | |
| %21 = OpLoad %int %i None | |
| OpSelectionMerge %24 None | |
| OpSwitch %21 %22 0 %23 | |
| %23 = OpLabel | |
| OpBranch %25 | |
| %25 = OpLabel | |
| OpStore %j %int_0 | |
| OpBranch %28 | |
| %28 = OpLabel | |
| OpLoopMerge %29 %27 None | |
| OpBranch %26 | |
| %26 = OpLabel | |
| %31 = OpLoad %int %j None | |
| %32 = OpSLessThan %bool %31 %int_2 | |
| OpSelectionMerge %33 None | |
| OpBranchConditional %32 %33 %34 | |
| %34 = OpLabel | |
| OpBranch %29 | |
| %33 = OpLabel | |
| %35 = OpLoad %int %j None | |
| OpSelectionMerge %39 None | |
| OpSwitch %35 %36 0 %37 1 %38 | |
| %37 = OpLabel | |
| OpBranch %27 | |
| %38 = OpLabel | |
| %40 = OpLoad %int %k None | |
| OpSelectionMerge %43 None | |
| OpSwitch %40 %41 0 %42 | |
| %42 = OpLabel | |
| OpBranch %27 | |
| %41 = OpLabel | |
| OpBranch %43 | |
| %43 = OpLabel | |
| OpBranch %39 | |
| %36 = OpLabel | |
| OpBranch %39 | |
| %39 = OpLabel | |
| OpBranch %27 | |
| %27 = OpLabel | |
| %44 = OpLoad %int %j None | |
| %45 = OpIAdd %int %44 %int_2 | |
| OpStore %j %45 None | |
| OpBranch %28 | |
| %29 = OpLabel | |
| OpBranch %11 | |
| %22 = OpLabel | |
| OpBranch %24 | |
| %24 = OpLabel | |
| OpBranch %11 | |
| %11 = OpLabel | |
| %46 = OpLoad %int %i None | |
| %47 = OpIAdd %int %46 %int_2 | |
| OpStore %i %47 None | |
| OpBranch %12 | |
| %13 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |