| OpCapability Shader |
| %1 = OpExtInstImport "GLSL.std.450" |
| OpMemoryModel Logical GLSL450 |
| OpEntryPoint Fragment %main "main" %gl_FragCoord %expect |
| OpExecutionMode %main OriginUpperLeft |
| OpSource GLSL 430 |
| OpSourceExtension "GL_KHR_shader_subgroup_ballot" |
| OpSourceExtension "GL_KHR_shader_subgroup_basic" |
| OpSourceExtension "GL_KHR_shader_subgroup_vote" |
| OpName %main "main" |
| OpName %inbounds "inbounds" |
| OpName %gl_FragCoord "gl_FragCoord" |
| OpName %expect "expect" |
| OpDecorate %gl_FragCoord BuiltIn FragCoord |
| OpDecorate %expect Location 0 |
| %void = OpTypeVoid |
| %7 = OpTypeFunction %void |
| %bool = OpTypeBool |
| %_ptr_Function_bool = OpTypePointer Function %bool |
| %float = OpTypeFloat 32 |
| %v4float = OpTypeVector %float 4 |
| %_ptr_Input_v4float = OpTypePointer Input %v4float |
| %gl_FragCoord = OpVariable %_ptr_Input_v4float Input |
| %uint = OpTypeInt 32 0 |
| %uint_0 = OpConstant %uint 0 |
| %_ptr_Input_float = OpTypePointer Input %float |
| %float_128 = OpConstant %float 128 |
| %uint_1 = OpConstant %uint 1 |
| %int = OpTypeInt 32 1 |
| %_ptr_Output_int = OpTypePointer Output %int |
| %expect = OpVariable %_ptr_Output_int Output |
| %int_1 = OpConstant %int 1 |
| %int_n1 = OpConstant %int -1 |
| %main = OpFunction %void None %7 |
| %22 = OpLabel |
| %inbounds = OpVariable %_ptr_Function_bool Function |
| %23 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 |
| %24 = OpLoad %float %23 |
| %25 = OpFOrdLessThan %bool %24 %float_128 |
| %26 = OpLogicalNot %bool %25 |
| OpSelectionMerge %27 None |
| OpBranchConditional %26 %28 %27 |
| %28 = OpLabel |
| %29 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_1 |
| %30 = OpLoad %float %29 |
| %31 = OpFOrdLessThan %bool %30 %float_128 |
| OpBranch %27 |
| %27 = OpLabel |
| %32 = OpPhi %bool %25 %22 %31 %28 |
| OpStore %inbounds %32 |
| %33 = OpLoad %bool %inbounds |
| %34 = OpSelect %int %33 %int_1 %int_n1 |
| OpStore %expect %34 |
| OpReturn |
| OpFunctionEnd |