| ; SPIR-V | |
| ; Version: 1.3 | |
| ; Generator: Google Tint Compiler; 0 | |
| ; Bound: 50 | |
| ; Schema: 0 | |
| OpCapability Shader | |
| OpMemoryModel Logical GLSL450 | |
| OpEntryPoint Fragment %main "main" %x_1 %value | |
| OpExecutionMode %main OriginUpperLeft | |
| OpName %x_1 "x_1" | |
| OpName %value "value" | |
| OpName %tint_discard "tint_discard" | |
| OpName %f "f" | |
| OpName %x "x" | |
| OpName %tint_discard_func "tint_discard_func" | |
| OpName %main_inner "main_inner" | |
| OpName %x_0 "x" | |
| OpName %y "y" | |
| OpName %main "main" | |
| OpDecorate %x_1 Location 1 | |
| OpDecorate %x_1 Flat | |
| OpDecorate %value Location 2 | |
| %int = OpTypeInt 32 1 | |
| %v3int = OpTypeVector %int 3 | |
| %_ptr_Input_v3int = OpTypePointer Input %v3int | |
| %x_1 = OpVariable %_ptr_Input_v3int Input | |
| %_ptr_Output_int = OpTypePointer Output %int | |
| %7 = OpConstantNull %int | |
| %value = OpVariable %_ptr_Output_int Output %7 | |
| %bool = OpTypeBool | |
| %9 = OpConstantNull %bool | |
| %_ptr_Private_bool = OpTypePointer Private %bool | |
| %tint_discard = OpVariable %_ptr_Private_bool Private %9 | |
| %12 = OpTypeFunction %int %int | |
| %int_10 = OpConstant %int 10 | |
| %true = OpConstantTrue %bool | |
| %void = OpTypeVoid | |
| %21 = OpTypeFunction %void | |
| %25 = OpTypeFunction %int %v3int | |
| %_ptr_Function_int = OpTypePointer Function %int | |
| %f = OpFunction %int None %12 | |
| %x = OpFunctionParameter %int | |
| %15 = OpLabel | |
| %17 = OpIEqual %bool %x %int_10 | |
| OpSelectionMerge %18 None | |
| OpBranchConditional %17 %19 %18 | |
| %19 = OpLabel | |
| OpStore %tint_discard %true | |
| OpReturnValue %7 | |
| %18 = OpLabel | |
| OpReturnValue %x | |
| OpFunctionEnd | |
| %tint_discard_func = OpFunction %void None %21 | |
| %24 = OpLabel | |
| OpKill | |
| OpFunctionEnd | |
| %main_inner = OpFunction %int None %25 | |
| %x_0 = OpFunctionParameter %v3int | |
| %28 = OpLabel | |
| %y = OpVariable %_ptr_Function_int Function %7 | |
| %29 = OpCompositeExtract %int %x_0 0 | |
| OpStore %y %29 | |
| OpBranch %32 | |
| %32 = OpLabel | |
| OpLoopMerge %33 %34 None | |
| OpBranch %35 | |
| %35 = OpLabel | |
| %37 = OpLoad %int %y | |
| %36 = OpFunctionCall %int %f %37 | |
| %38 = OpLoad %bool %tint_discard | |
| OpSelectionMerge %39 None | |
| OpBranchConditional %38 %40 %39 | |
| %40 = OpLabel | |
| %41 = OpFunctionCall %void %tint_discard_func | |
| OpReturnValue %7 | |
| %39 = OpLabel | |
| %42 = OpIEqual %bool %36 %7 | |
| OpSelectionMerge %43 None | |
| OpBranchConditional %42 %44 %43 | |
| %44 = OpLabel | |
| OpBranch %33 | |
| %43 = OpLabel | |
| OpBranch %34 | |
| %34 = OpLabel | |
| OpBranch %32 | |
| %33 = OpLabel | |
| %45 = OpLoad %int %y | |
| OpReturnValue %45 | |
| OpFunctionEnd | |
| %main = OpFunction %void None %21 | |
| %47 = OpLabel | |
| %49 = OpLoad %v3int %x_1 | |
| %48 = OpFunctionCall %int %main_inner %49 | |
| OpStore %value %48 | |
| OpReturn | |
| OpFunctionEnd |