| ; SPIR-V |
| ; Version: 1.3 |
| ; Generator: Google Tint Compiler; 0 |
| ; Bound: 72 |
| ; Schema: 0 |
| OpCapability Shader |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint GLCompute %main "main" |
| OpExecutionMode %main LocalSize 1 1 1 |
| OpName %v2f "v2f" |
| OpName %v3i "v3i" |
| OpName %v4u "v4u" |
| OpName %v2b "v2b" |
| OpName %foo "foo" |
| OpName %i "i" |
| OpName %main "main" |
| OpName %i_0 "i" |
| %float = OpTypeFloat 32 |
| %v2float = OpTypeVector %float 2 |
| %_ptr_Private_v2float = OpTypePointer Private %v2float |
| %5 = OpConstantNull %v2float |
| %v2f = OpVariable %_ptr_Private_v2float Private %5 |
| %int = OpTypeInt 32 1 |
| %v3int = OpTypeVector %int 3 |
| %_ptr_Private_v3int = OpTypePointer Private %v3int |
| %10 = OpConstantNull %v3int |
| %v3i = OpVariable %_ptr_Private_v3int Private %10 |
| %uint = OpTypeInt 32 0 |
| %v4uint = OpTypeVector %uint 4 |
| %_ptr_Private_v4uint = OpTypePointer Private %v4uint |
| %15 = OpConstantNull %v4uint |
| %v4u = OpVariable %_ptr_Private_v4uint Private %15 |
| %bool = OpTypeBool |
| %v2bool = OpTypeVector %bool 2 |
| %_ptr_Private_v2bool = OpTypePointer Private %v2bool |
| %20 = OpConstantNull %v2bool |
| %v2b = OpVariable %_ptr_Private_v2bool Private %20 |
| %void = OpTypeVoid |
| %21 = OpTypeFunction %void |
| %int_0 = OpConstant %int 0 |
| %_ptr_Function_int = OpTypePointer Function %int |
| %28 = OpConstantNull %int |
| %int_2 = OpConstant %int 2 |
| %_ptr_Private_float = OpTypePointer Private %float |
| %float_1 = OpConstant %float 1 |
| %_ptr_Private_int = OpTypePointer Private %int |
| %int_1 = OpConstant %int 1 |
| %_ptr_Private_uint = OpTypePointer Private %uint |
| %uint_1 = OpConstant %uint 1 |
| %_ptr_Private_bool = OpTypePointer Private %bool |
| %true = OpConstantTrue %bool |
| %foo = OpFunction %void None %21 |
| %24 = OpLabel |
| %i = OpVariable %_ptr_Function_int Function %28 |
| OpStore %i %int_0 |
| OpBranch %29 |
| %29 = OpLabel |
| OpLoopMerge %30 %31 None |
| OpBranch %32 |
| %32 = OpLabel |
| %34 = OpLoad %int %i |
| %36 = OpSLessThan %bool %34 %int_2 |
| %33 = OpLogicalNot %bool %36 |
| OpSelectionMerge %37 None |
| OpBranchConditional %33 %38 %37 |
| %38 = OpLabel |
| OpBranch %30 |
| %37 = OpLabel |
| %39 = OpLoad %int %i |
| %41 = OpAccessChain %_ptr_Private_float %v2f %39 |
| OpStore %41 %float_1 |
| %43 = OpLoad %int %i |
| %45 = OpAccessChain %_ptr_Private_int %v3i %43 |
| OpStore %45 %int_1 |
| %47 = OpLoad %int %i |
| %49 = OpAccessChain %_ptr_Private_uint %v4u %47 |
| OpStore %49 %uint_1 |
| %51 = OpLoad %int %i |
| %53 = OpAccessChain %_ptr_Private_bool %v2b %51 |
| OpStore %53 %true |
| OpBranch %31 |
| %31 = OpLabel |
| %55 = OpLoad %int %i |
| %56 = OpIAdd %int %55 %int_1 |
| OpStore %i %56 |
| OpBranch %29 |
| %30 = OpLabel |
| OpReturn |
| OpFunctionEnd |
| %main = OpFunction %void None %21 |
| %58 = OpLabel |
| %i_0 = OpVariable %_ptr_Function_int Function %28 |
| OpStore %i_0 %int_0 |
| OpBranch %60 |
| %60 = OpLabel |
| OpLoopMerge %61 %62 None |
| OpBranch %63 |
| %63 = OpLabel |
| %65 = OpLoad %int %i_0 |
| %66 = OpSLessThan %bool %65 %int_2 |
| %64 = OpLogicalNot %bool %66 |
| OpSelectionMerge %67 None |
| OpBranchConditional %64 %68 %67 |
| %68 = OpLabel |
| OpBranch %61 |
| %67 = OpLabel |
| %69 = OpFunctionCall %void %foo |
| OpBranch %62 |
| %62 = OpLabel |
| %70 = OpLoad %int %i_0 |
| %71 = OpIAdd %int %70 %int_1 |
| OpStore %i_0 %71 |
| OpBranch %60 |
| %61 = OpLabel |
| OpReturn |
| OpFunctionEnd |