blob: 209cb45b75ac6cfd91debcf52b0ea7ab860dc552 [file] [log] [blame]
;; Test where src and dst have the true and false blocks of an if reordered.
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %4 "main" %8 %44
OpExecutionMode %4 OriginUpperLeft
OpSource ESSL 310
OpName %4 "main"
OpName %8 "v"
OpName %44 "color"
OpDecorate %8 RelaxedPrecision
OpDecorate %8 Location 0
OpDecorate %9 RelaxedPrecision
OpDecorate %18 RelaxedPrecision
OpDecorate %19 RelaxedPrecision
OpDecorate %20 RelaxedPrecision
OpDecorate %23 RelaxedPrecision
OpDecorate %24 RelaxedPrecision
OpDecorate %25 RelaxedPrecision
OpDecorate %26 RelaxedPrecision
OpDecorate %27 RelaxedPrecision
OpDecorate %28 RelaxedPrecision
OpDecorate %29 RelaxedPrecision
OpDecorate %30 RelaxedPrecision
OpDecorate %31 RelaxedPrecision
OpDecorate %33 RelaxedPrecision
OpDecorate %34 RelaxedPrecision
OpDecorate %35 RelaxedPrecision
OpDecorate %36 RelaxedPrecision
OpDecorate %37 RelaxedPrecision
OpDecorate %39 RelaxedPrecision
OpDecorate %40 RelaxedPrecision
OpDecorate %41 RelaxedPrecision
OpDecorate %42 RelaxedPrecision
OpDecorate %44 RelaxedPrecision
OpDecorate %44 Location 0
OpDecorate %45 RelaxedPrecision
%2 = OpTypeVoid
%3 = OpTypeFunction %2
%6 = OpTypeFloat 32
%7 = OpTypePointer Input %6
%8 = OpVariable %7 Input
%10 = OpConstant %6 0
%11 = OpTypeBool
%15 = OpTypeVector %6 4
%16 = OpTypePointer Function %15
%21 = OpConstant %6 -0.5
%22 = OpConstant %6 -0.300000012
%38 = OpConstant %6 0.5
%43 = OpTypePointer Output %15
%44 = OpVariable %43 Output
%4 = OpFunction %2 None %3
%5 = OpLabel
%9 = OpLoad %6 %8
%12 = OpFOrdLessThanEqual %11 %9 %10
OpSelectionMerge %14 None
OpBranchConditional %12 %13 %32
%13 = OpLabel
%18 = OpLoad %6 %8
%19 = OpExtInst %6 %1 Log %18
%20 = OpLoad %6 %8
%23 = OpExtInst %6 %1 FClamp %20 %21 %22
%24 = OpFMul %6 %19 %23
%25 = OpLoad %6 %8
%26 = OpExtInst %6 %1 Sin %25
%27 = OpLoad %6 %8
%28 = OpExtInst %6 %1 Cos %27
%29 = OpLoad %6 %8
%30 = OpExtInst %6 %1 Exp %29
%31 = OpCompositeConstruct %15 %24 %26 %28 %30
OpBranch %14
%32 = OpLabel
%33 = OpLoad %6 %8
%34 = OpExtInst %6 %1 Sqrt %33
%35 = OpLoad %6 %8
%36 = OpExtInst %6 %1 FSign %35
%37 = OpLoad %6 %8
%39 = OpExtInst %6 %1 FMax %37 %38
%40 = OpLoad %6 %8
%41 = OpExtInst %6 %1 Floor %40
%42 = OpCompositeConstruct %15 %34 %36 %39 %41
OpBranch %14
%14 = OpLabel
%45 = OpPhi %15 %31 %13 %42 %32
OpStore %44 %45
OpReturn
OpFunctionEnd