| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; 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 | |
| %1 = OpTypeFunction %void | |
| %int = OpTypeInt 32 1 | |
| %6 = OpConstantNull %int | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %int_2 = OpConstant %int 2 | |
| %bool = OpTypeBool | |
| %main = OpFunction %void None %1 | |
| %4 = OpLabel | |
| %k = OpVariable %_ptr_Function_int Function %6 | |
| %i = OpVariable %_ptr_Function_int Function %6 | |
| %j = OpVariable %_ptr_Function_int Function %6 | |
| OpStore %k %6 | |
| OpStore %i %6 | |
| OpBranch %10 | |
| %10 = OpLabel | |
| OpLoopMerge %11 %12 None | |
| OpBranch %13 | |
| %13 = OpLabel | |
| %15 = OpLoad %int %i | |
| %17 = OpSLessThan %bool %15 %int_2 | |
| %14 = OpLogicalNot %bool %17 | |
| OpSelectionMerge %19 None | |
| OpBranchConditional %14 %20 %19 | |
| %20 = OpLabel | |
| OpBranch %11 | |
| %19 = OpLabel | |
| %22 = OpLoad %int %i | |
| OpSelectionMerge %21 None | |
| OpSwitch %22 %23 0 %24 | |
| %24 = OpLabel | |
| OpStore %j %6 | |
| OpBranch %26 | |
| %26 = OpLabel | |
| OpLoopMerge %27 %28 None | |
| OpBranch %29 | |
| %29 = OpLabel | |
| %31 = OpLoad %int %j | |
| %32 = OpSLessThan %bool %31 %int_2 | |
| %30 = OpLogicalNot %bool %32 | |
| OpSelectionMerge %33 None | |
| OpBranchConditional %30 %34 %33 | |
| %34 = OpLabel | |
| OpBranch %27 | |
| %33 = OpLabel | |
| %36 = OpLoad %int %j | |
| OpSelectionMerge %35 None | |
| OpSwitch %36 %37 0 %38 1 %39 | |
| %38 = OpLabel | |
| OpBranch %28 | |
| %39 = OpLabel | |
| %41 = OpLoad %int %k | |
| OpSelectionMerge %40 None | |
| OpSwitch %41 %42 0 %43 | |
| %43 = OpLabel | |
| OpBranch %28 | |
| %42 = OpLabel | |
| OpBranch %40 | |
| %40 = OpLabel | |
| OpBranch %35 | |
| %37 = OpLabel | |
| OpBranch %35 | |
| %35 = OpLabel | |
| OpBranch %28 | |
| %28 = OpLabel | |
| %44 = OpLoad %int %j | |
| %45 = OpIAdd %int %44 %int_2 | |
| OpStore %j %45 | |
| OpBranch %26 | |
| %27 = OpLabel | |
| OpBranch %12 | |
| %23 = OpLabel | |
| OpBranch %21 | |
| %21 = OpLabel | |
| OpBranch %12 | |
| %12 = OpLabel | |
| %46 = OpLoad %int %i | |
| %47 = OpIAdd %int %46 %int_2 | |
| OpStore %i %47 | |
| OpBranch %10 | |
| %11 = OpLabel | |
| OpReturn | |
| OpFunctionEnd |