Allow trivial non-constant expressions to use SpvOpSelect.

Previously, we would only use OpSelect when choosing between two
scalar constant values, and in all other cases would convert
ternary expressions to an if-else block. We now also choose
OpSelect for "trivial expressions" (variable references, swizzles,
array accesses, field accesses), and support vectors as well as
scalars.

This has a wide-reaching impact on our test suite, because most
tests end in `return something ? colorGreen : colorRed;`. This
expression will now use OpSelect.

(The HLSL expansion of OpSelect is intriguingly bad, but hopefully
this is not an issue in practice.)

Change-Id: Ia31d42d27b51b801deb17a69c89bff65d949c99d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/706678
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Arman Uguray <armansito@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
index 3c7ca34..549abc25 100644
--- a/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/codegen/SkSLSPIRVCodeGenerator.cpp
@@ -3274,11 +3274,11 @@
 
 SpvId SPIRVCodeGenerator::writeTernaryExpression(const TernaryExpression& t, OutputStream& out) {
     const Type& type = t.type();
-    SpvId test = this->writeExpression(*t.test(), out);
-    if (t.ifTrue()->type().columns() == 1 &&
-        Analysis::IsCompileTimeConstant(*t.ifTrue()) &&
-        Analysis::IsCompileTimeConstant(*t.ifFalse())) {
-        // both true and false are constants, can just use OpSelect
+    if ((type.isScalar() || type.isVector()) &&
+        Analysis::IsTrivialExpression(*t.ifTrue()) &&
+        Analysis::IsTrivialExpression(*t.ifFalse())) {
+        // Both true and false are trivial; we can just use OpSelect.
+        SpvId test = this->vectorize(*t.test(), type.slotCount(), out);
         SpvId result = this->nextId(nullptr);
         SpvId trueId = this->writeExpression(*t.ifTrue(), out);
         SpvId falseId = this->writeExpression(*t.ifFalse(), out);
@@ -3291,6 +3291,7 @@
 
     // was originally using OpPhi to choose the result, but for some reason that is crashing on
     // Adreno. Switched to storing the result in a temp variable as glslang does.
+    SpvId test = this->writeExpression(*t.test(), out);
     SpvId var = this->nextId(nullptr);
     this->writeInstruction(SpvOpVariable, this->getPointerType(type, SpvStorageClassFunction),
                            var, SpvStorageClassFunction, fVariableBuffer);
diff --git a/tests/sksl/blend/BlendColor.asm.frag b/tests/sksl/blend/BlendColor.asm.frag
index c08e7d0..8e56597 100644
--- a/tests/sksl/blend/BlendColor.asm.frag
+++ b/tests/sksl/blend/BlendColor.asm.frag
@@ -69,48 +69,51 @@
 OpDecorate %l RelaxedPrecision
 OpDecorate %71 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
 OpDecorate %r RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 OpDecorate %_2_mn RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
 OpDecorate %_3_mx RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
 OpDecorate %_4_lum RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %_5_result RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
+OpDecorate %_6_minComp RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
-OpDecorate %_6_minComp RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 OpDecorate %_7_maxComp RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %153 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
-OpDecorate %155 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
 OpDecorate %163 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
@@ -136,13 +139,8 @@
 OpDecorate %185 RelaxedPrecision
 OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
-OpDecorate %191 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %206 RelaxedPrecision
+OpDecorate %197 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 %float = OpTypeFloat 32
 %_ptr_Private_float = OpTypePointer Private %float
 %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private
@@ -166,15 +164,16 @@
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%v3bool = OpTypeVector %bool 3
 %float_1 = OpConstant %float 1
-%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0
+%111 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%118 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %void = OpTypeVoid
-%194 = OpTypeFunction %void
-%196 = OpConstantComposite %v2float %float_0 %float_0
+%189 = OpTypeFunction %void
+%191 = OpConstantComposite %v2float %float_0 %float_0
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -210,13 +209,11 @@
 %sda = OpVariable %_ptr_Function_v3float Function
 %dsa = OpVariable %_ptr_Function_v3float Function
 %l = OpVariable %_ptr_Function_v3float Function
-%74 = OpVariable %_ptr_Function_v3float Function
 %r = OpVariable %_ptr_Function_v3float Function
-%83 = OpVariable %_ptr_Function_v3float Function
 %_2_mn = OpVariable %_ptr_Function_float Function
 %_3_mx = OpVariable %_ptr_Function_float Function
-%103 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_v3float Function
+%98 = OpVariable %_ptr_Function_v3float Function
+%104 = OpVariable %_ptr_Function_v3float Function
 %_4_lum = OpVariable %_ptr_Function_float Function
 %_5_result = OpVariable %_ptr_Function_v3float Function
 %_6_minComp = OpVariable %_ptr_Function_float Function
@@ -242,171 +239,155 @@
 %71 = OpLoad %v2float %47
 %72 = OpCompositeExtract %float %71 0
 %73 = OpFUnordNotEqual %bool %72 %float_0
-OpSelectionMerge %77 None
-OpBranchConditional %73 %75 %76
-%75 = OpLabel
-OpStore %74 %69
-OpBranch %77
-%76 = OpLabel
-OpStore %74 %63
-OpBranch %77
-%77 = OpLabel
-%78 = OpLoad %v3float %74
-OpStore %l %78
-%80 = OpLoad %v2float %47
-%81 = OpCompositeExtract %float %80 0
-%82 = OpFUnordNotEqual %bool %81 %float_0
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-OpStore %83 %63
-OpBranch %86
-%85 = OpLabel
-OpStore %83 %69
-OpBranch %86
+%75 = OpCompositeConstruct %v3bool %73 %73 %73
+%76 = OpSelect %v3float %75 %69 %63
+OpStore %l %76
+%78 = OpLoad %v2float %47
+%79 = OpCompositeExtract %float %78 0
+%80 = OpFUnordNotEqual %bool %79 %float_0
+%81 = OpCompositeConstruct %v3bool %80 %80 %80
+%82 = OpSelect %v3float %81 %63 %69
+OpStore %r %82
+%83 = OpLoad %v2float %47
+%84 = OpCompositeExtract %float %83 1
+%85 = OpFUnordNotEqual %bool %84 %float_0
+OpSelectionMerge %87 None
+OpBranchConditional %85 %86 %87
 %86 = OpLabel
-%87 = OpLoad %v3float %83
-OpStore %r %87
-%88 = OpLoad %v2float %47
-%89 = OpCompositeExtract %float %88 1
-%90 = OpFUnordNotEqual %bool %89 %float_0
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
-%91 = OpLabel
-%96 = OpCompositeExtract %float %78 0
-%97 = OpCompositeExtract %float %78 1
-%95 = OpExtInst %float %1 FMin %96 %97
-%98 = OpCompositeExtract %float %78 2
-%94 = OpExtInst %float %1 FMin %95 %98
-OpStore %_2_mn %94
-%101 = OpExtInst %float %1 FMax %96 %97
-%100 = OpExtInst %float %1 FMax %101 %98
-OpStore %_3_mx %100
-%102 = OpFOrdGreaterThan %bool %100 %94
-OpSelectionMerge %106 None
-OpBranchConditional %102 %104 %105
-%104 = OpLabel
-%107 = OpCompositeConstruct %v3float %94 %94 %94
-%108 = OpFSub %v3float %78 %107
-OpStore %109 %87
-%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109
-%111 = OpVectorTimesScalar %v3float %108 %110
-%112 = OpFSub %float %100 %94
-%114 = OpFDiv %float %float_1 %112
-%115 = OpVectorTimesScalar %v3float %111 %114
-OpStore %103 %115
-OpBranch %106
-%105 = OpLabel
-OpStore %103 %116
-OpBranch %106
-%106 = OpLabel
-%117 = OpLoad %v3float %103
-OpStore %l %117
+%91 = OpCompositeExtract %float %76 0
+%92 = OpCompositeExtract %float %76 1
+%90 = OpExtInst %float %1 FMin %91 %92
+%93 = OpCompositeExtract %float %76 2
+%89 = OpExtInst %float %1 FMin %90 %93
+OpStore %_2_mn %89
+%96 = OpExtInst %float %1 FMax %91 %92
+%95 = OpExtInst %float %1 FMax %96 %93
+OpStore %_3_mx %95
+%97 = OpFOrdGreaterThan %bool %95 %89
+OpSelectionMerge %101 None
+OpBranchConditional %97 %99 %100
+%99 = OpLabel
+%102 = OpCompositeConstruct %v3float %89 %89 %89
+%103 = OpFSub %v3float %76 %102
+OpStore %104 %82
+%105 = OpFunctionCall %float %blend_color_saturation_Qhh3 %104
+%106 = OpVectorTimesScalar %v3float %103 %105
+%107 = OpFSub %float %95 %89
+%109 = OpFDiv %float %float_1 %107
+%110 = OpVectorTimesScalar %v3float %106 %109
+OpStore %98 %110
+OpBranch %101
+%100 = OpLabel
+OpStore %98 %111
+OpBranch %101
+%101 = OpLabel
+%112 = OpLoad %v3float %98
+OpStore %l %112
 OpStore %r %69
-OpBranch %92
-%92 = OpLabel
-%124 = OpLoad %v3float %r
-%119 = OpDot %float %123 %124
-OpStore %_4_lum %119
-%127 = OpLoad %v3float %l
-%126 = OpDot %float %123 %127
-%128 = OpFSub %float %119 %126
-%129 = OpLoad %v3float %l
-%130 = OpCompositeConstruct %v3float %128 %128 %128
-%131 = OpFAdd %v3float %130 %129
-OpStore %_5_result %131
-%135 = OpCompositeExtract %float %131 0
-%136 = OpCompositeExtract %float %131 1
-%134 = OpExtInst %float %1 FMin %135 %136
-%137 = OpCompositeExtract %float %131 2
-%133 = OpExtInst %float %1 FMin %134 %137
-OpStore %_6_minComp %133
-%140 = OpExtInst %float %1 FMax %135 %136
-%139 = OpExtInst %float %1 FMax %140 %137
-OpStore %_7_maxComp %139
-%141 = OpFOrdLessThan %bool %133 %float_0
-OpSelectionMerge %143 None
-OpBranchConditional %141 %142 %143
+OpBranch %87
+%87 = OpLabel
+%119 = OpLoad %v3float %r
+%114 = OpDot %float %118 %119
+OpStore %_4_lum %114
+%122 = OpLoad %v3float %l
+%121 = OpDot %float %118 %122
+%123 = OpFSub %float %114 %121
+%124 = OpLoad %v3float %l
+%125 = OpCompositeConstruct %v3float %123 %123 %123
+%126 = OpFAdd %v3float %125 %124
+OpStore %_5_result %126
+%130 = OpCompositeExtract %float %126 0
+%131 = OpCompositeExtract %float %126 1
+%129 = OpExtInst %float %1 FMin %130 %131
+%132 = OpCompositeExtract %float %126 2
+%128 = OpExtInst %float %1 FMin %129 %132
+OpStore %_6_minComp %128
+%135 = OpExtInst %float %1 FMax %130 %131
+%134 = OpExtInst %float %1 FMax %135 %132
+OpStore %_7_maxComp %134
+%136 = OpFOrdLessThan %bool %128 %float_0
+OpSelectionMerge %138 None
+OpBranchConditional %136 %137 %138
+%137 = OpLabel
+%139 = OpFUnordNotEqual %bool %114 %128
+OpBranch %138
+%138 = OpLabel
+%140 = OpPhi %bool %false %87 %139 %137
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+%143 = OpCompositeConstruct %v3float %114 %114 %114
+%144 = OpFSub %v3float %126 %143
+%145 = OpFSub %float %114 %128
+%146 = OpLoad %float %_kGuardedDivideEpsilon
+%147 = OpFAdd %float %145 %146
+%148 = OpFDiv %float %114 %147
+%149 = OpVectorTimesScalar %v3float %144 %148
+%150 = OpFAdd %v3float %143 %149
+OpStore %_5_result %150
+OpBranch %142
 %142 = OpLabel
-%144 = OpFUnordNotEqual %bool %119 %133
-OpBranch %143
-%143 = OpLabel
-%145 = OpPhi %bool %false %92 %144 %142
-OpSelectionMerge %147 None
-OpBranchConditional %145 %146 %147
-%146 = OpLabel
-%148 = OpCompositeConstruct %v3float %119 %119 %119
-%149 = OpFSub %v3float %131 %148
-%150 = OpFSub %float %119 %133
-%151 = OpLoad %float %_kGuardedDivideEpsilon
-%152 = OpFAdd %float %150 %151
-%153 = OpFDiv %float %119 %152
-%154 = OpVectorTimesScalar %v3float %149 %153
-%155 = OpFAdd %v3float %148 %154
-OpStore %_5_result %155
-OpBranch %147
-%147 = OpLabel
-%156 = OpFOrdGreaterThan %bool %139 %57
-OpSelectionMerge %158 None
-OpBranchConditional %156 %157 %158
+%151 = OpFOrdGreaterThan %bool %134 %57
+OpSelectionMerge %153 None
+OpBranchConditional %151 %152 %153
+%152 = OpLabel
+%154 = OpFUnordNotEqual %bool %134 %114
+OpBranch %153
+%153 = OpLabel
+%155 = OpPhi %bool %false %142 %154 %152
+OpSelectionMerge %157 None
+OpBranchConditional %155 %156 %157
+%156 = OpLabel
+%158 = OpLoad %v3float %_5_result
+%159 = OpCompositeConstruct %v3float %114 %114 %114
+%160 = OpFSub %v3float %158 %159
+%161 = OpFSub %float %57 %114
+%162 = OpVectorTimesScalar %v3float %160 %161
+%163 = OpFSub %float %134 %114
+%164 = OpLoad %float %_kGuardedDivideEpsilon
+%165 = OpFAdd %float %163 %164
+%166 = OpFDiv %float %float_1 %165
+%167 = OpVectorTimesScalar %v3float %162 %166
+%168 = OpFAdd %v3float %159 %167
+OpStore %_5_result %168
+OpBranch %157
 %157 = OpLabel
-%159 = OpFUnordNotEqual %bool %139 %119
-OpBranch %158
-%158 = OpLabel
-%160 = OpPhi %bool %false %147 %159 %157
-OpSelectionMerge %162 None
-OpBranchConditional %160 %161 %162
-%161 = OpLabel
-%163 = OpLoad %v3float %_5_result
-%164 = OpCompositeConstruct %v3float %119 %119 %119
-%165 = OpFSub %v3float %163 %164
-%166 = OpFSub %float %57 %119
-%167 = OpVectorTimesScalar %v3float %165 %166
-%168 = OpFSub %float %139 %119
-%169 = OpLoad %float %_kGuardedDivideEpsilon
-%170 = OpFAdd %float %168 %169
-%171 = OpFDiv %float %float_1 %170
-%172 = OpVectorTimesScalar %v3float %167 %171
-%173 = OpFAdd %v3float %164 %172
-OpStore %_5_result %173
-OpBranch %162
-%162 = OpLabel
-%174 = OpLoad %v3float %_5_result
-%175 = OpLoad %v4float %49
-%176 = OpVectorShuffle %v3float %175 %175 0 1 2
-%177 = OpFAdd %v3float %174 %176
-%178 = OpFSub %v3float %177 %69
-%179 = OpLoad %v4float %48
-%180 = OpVectorShuffle %v3float %179 %179 0 1 2
-%181 = OpFAdd %v3float %178 %180
-%182 = OpFSub %v3float %181 %63
-%183 = OpCompositeExtract %float %182 0
-%184 = OpCompositeExtract %float %182 1
-%185 = OpCompositeExtract %float %182 2
-%186 = OpLoad %v4float %48
-%187 = OpCompositeExtract %float %186 3
-%188 = OpLoad %v4float %49
-%189 = OpCompositeExtract %float %188 3
-%190 = OpFAdd %float %187 %189
-%191 = OpFSub %float %190 %57
-%192 = OpCompositeConstruct %v4float %183 %184 %185 %191
-OpReturnValue %192
+%169 = OpLoad %v3float %_5_result
+%170 = OpLoad %v4float %49
+%171 = OpVectorShuffle %v3float %170 %170 0 1 2
+%172 = OpFAdd %v3float %169 %171
+%173 = OpFSub %v3float %172 %69
+%174 = OpLoad %v4float %48
+%175 = OpVectorShuffle %v3float %174 %174 0 1 2
+%176 = OpFAdd %v3float %173 %175
+%177 = OpFSub %v3float %176 %63
+%178 = OpCompositeExtract %float %177 0
+%179 = OpCompositeExtract %float %177 1
+%180 = OpCompositeExtract %float %177 2
+%181 = OpLoad %v4float %48
+%182 = OpCompositeExtract %float %181 3
+%183 = OpLoad %v4float %49
+%184 = OpCompositeExtract %float %183 3
+%185 = OpFAdd %float %182 %184
+%186 = OpFSub %float %185 %57
+%187 = OpCompositeConstruct %v4float %178 %179 %180 %186
+OpReturnValue %187
 OpFunctionEnd
-%main = OpFunction %void None %194
-%195 = OpLabel
-%197 = OpVariable %_ptr_Function_v2float Function
-%203 = OpVariable %_ptr_Function_v4float Function
-%207 = OpVariable %_ptr_Function_v4float Function
+%main = OpFunction %void None %189
+%190 = OpLabel
+%192 = OpVariable %_ptr_Function_v2float Function
+%198 = OpVariable %_ptr_Function_v4float Function
+%202 = OpVariable %_ptr_Function_v4float Function
 %10 = OpSelect %float %false %float_9_99999994en09 %float_0
 OpStore %_kGuardedDivideEpsilon %10
-OpStore %197 %196
-%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
-%202 = OpLoad %v4float %198
-OpStore %203 %202
-%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%206 = OpLoad %v4float %204
-OpStore %207 %206
-%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207
-OpStore %sk_FragColor %208
+OpStore %192 %191
+%193 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%197 = OpLoad %v4float %193
+OpStore %198 %197
+%199 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
+%201 = OpLoad %v4float %199
+OpStore %202 %201
+%203 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %192 %198 %202
+OpStore %sk_FragColor %203
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/blend/BlendColor.hlsl b/tests/sksl/blend/BlendColor.hlsl
index bdc90ad..db45111 100644
--- a/tests/sksl/blend/BlendColor.hlsl
+++ b/tests/sksl/blend/BlendColor.hlsl
@@ -27,83 +27,72 @@
     float3 sda = _63;
     float3 _69 = _49.xyz * _48.w;
     float3 dsa = _69;
-    float3 _74 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _74 = _69;
-    }
-    else
-    {
-        _74 = _63;
-    }
-    float3 l = _74;
-    float3 _83 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _83 = _63;
-    }
-    else
-    {
-        _83 = _69;
-    }
-    float3 r = _83;
+    bool3 _75 = (_47.x != 0.0f).xxx;
+    float3 _76 = float3(_75.x ? _69.x : _63.x, _75.y ? _69.y : _63.y, _75.z ? _69.z : _63.z);
+    float3 l = _76;
+    bool3 _81 = (_47.x != 0.0f).xxx;
+    float3 _82 = float3(_81.x ? _63.x : _69.x, _81.y ? _63.y : _69.y, _81.z ? _63.z : _69.z);
+    float3 r = _82;
     if (_47.y != 0.0f)
     {
-        float _94 = min(min(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _94;
-        float _100 = max(max(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _100;
-        float3 _103 = 0.0f.xxx;
-        if (_100 > _94)
+        float _91 = _76.x;
+        float _92 = _76.y;
+        float _93 = _76.z;
+        float _89 = min(min(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _89;
+        float _95 = max(max(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _95;
+        float3 _98 = 0.0f.xxx;
+        if (_95 > _89)
         {
-            float3 _109 = _83;
-            _103 = ((_74 - _94.xxx) * blend_color_saturation_Qhh3(_109)) * (1.0f / (_100 - _94));
+            float3 _104 = _82;
+            _98 = ((_76 - _89.xxx) * blend_color_saturation_Qhh3(_104)) * (1.0f / (_95 - _89));
         }
         else
         {
-            _103 = 0.0f.xxx;
+            _98 = 0.0f.xxx;
         }
-        l = _103;
+        l = _98;
         r = _69;
     }
-    float _119 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
-    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _119;
-    float3 _131 = (_119 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
-    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _131;
-    float _135 = _131.x;
-    float _136 = _131.y;
-    float _137 = _131.z;
-    float _133 = min(min(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _133;
-    float _139 = max(max(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _139;
-    bool _145 = false;
-    if (_133 < 0.0f)
+    float _114 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
+    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _114;
+    float3 _126 = (_114 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
+    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _126;
+    float _130 = _126.x;
+    float _131 = _126.y;
+    float _132 = _126.z;
+    float _128 = min(min(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _128;
+    float _134 = max(max(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _134;
+    bool _140 = false;
+    if (_128 < 0.0f)
     {
-        _145 = _119 != _133;
+        _140 = _114 != _128;
     }
     else
     {
-        _145 = false;
+        _140 = false;
     }
-    if (_145)
+    if (_140)
     {
-        float3 _148 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _148 + ((_131 - _148) * (_119 / ((_119 - _133) + _kGuardedDivideEpsilon)));
+        float3 _143 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _143 + ((_126 - _143) * (_114 / ((_114 - _128) + _kGuardedDivideEpsilon)));
     }
-    bool _160 = false;
-    if (_139 > _57)
+    bool _155 = false;
+    if (_134 > _57)
     {
-        _160 = _139 != _119;
+        _155 = _134 != _114;
     }
     else
     {
-        _160 = false;
+        _155 = false;
     }
-    if (_160)
+    if (_155)
     {
-        float3 _164 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _164 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _164) * (_57 - _119)) * (1.0f / ((_139 - _119) + _kGuardedDivideEpsilon)));
+        float3 _159 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _159 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _159) * (_57 - _114)) * (1.0f / ((_134 - _114) + _kGuardedDivideEpsilon)));
     }
     return float4((((_RESERVED_IDENTIFIER_FIXUP_5_result + _49.xyz) - _69) + _48.xyz) - _63, (_48.w + _49.w) - _57);
 }
@@ -111,10 +100,10 @@
 void frag_main()
 {
     _kGuardedDivideEpsilon = false ? 9.9999999392252902907785028219223e-09f : 0.0f;
-    float2 _197 = 0.0f.xx;
-    float4 _203 = _18_src;
-    float4 _207 = _18_dst;
-    sk_FragColor = blend_hslc_h4h2h4h4(_197, _203, _207);
+    float2 _192 = 0.0f.xx;
+    float4 _198 = _18_src;
+    float4 _202 = _18_dst;
+    sk_FragColor = blend_hslc_h4h2h4h4(_192, _198, _202);
 }
 
 SPIRV_Cross_Output main()
diff --git a/tests/sksl/blend/BlendHue.asm.frag b/tests/sksl/blend/BlendHue.asm.frag
index ab7653e..563db19 100644
--- a/tests/sksl/blend/BlendHue.asm.frag
+++ b/tests/sksl/blend/BlendHue.asm.frag
@@ -69,48 +69,51 @@
 OpDecorate %l RelaxedPrecision
 OpDecorate %71 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
 OpDecorate %r RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 OpDecorate %_2_mn RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
 OpDecorate %_3_mx RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
 OpDecorate %_4_lum RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %_5_result RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
+OpDecorate %_6_minComp RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
-OpDecorate %_6_minComp RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 OpDecorate %_7_maxComp RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %153 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
-OpDecorate %155 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
 OpDecorate %163 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
@@ -136,13 +139,8 @@
 OpDecorate %185 RelaxedPrecision
 OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
-OpDecorate %191 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %206 RelaxedPrecision
+OpDecorate %197 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 %float = OpTypeFloat 32
 %_ptr_Private_float = OpTypePointer Private %float
 %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private
@@ -166,15 +164,16 @@
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%v3bool = OpTypeVector %bool 3
 %float_1 = OpConstant %float 1
-%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0
+%111 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%118 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %void = OpTypeVoid
-%194 = OpTypeFunction %void
-%196 = OpConstantComposite %v2float %float_0 %float_1
+%189 = OpTypeFunction %void
+%191 = OpConstantComposite %v2float %float_0 %float_1
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -210,13 +209,11 @@
 %sda = OpVariable %_ptr_Function_v3float Function
 %dsa = OpVariable %_ptr_Function_v3float Function
 %l = OpVariable %_ptr_Function_v3float Function
-%74 = OpVariable %_ptr_Function_v3float Function
 %r = OpVariable %_ptr_Function_v3float Function
-%83 = OpVariable %_ptr_Function_v3float Function
 %_2_mn = OpVariable %_ptr_Function_float Function
 %_3_mx = OpVariable %_ptr_Function_float Function
-%103 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_v3float Function
+%98 = OpVariable %_ptr_Function_v3float Function
+%104 = OpVariable %_ptr_Function_v3float Function
 %_4_lum = OpVariable %_ptr_Function_float Function
 %_5_result = OpVariable %_ptr_Function_v3float Function
 %_6_minComp = OpVariable %_ptr_Function_float Function
@@ -242,171 +239,155 @@
 %71 = OpLoad %v2float %47
 %72 = OpCompositeExtract %float %71 0
 %73 = OpFUnordNotEqual %bool %72 %float_0
-OpSelectionMerge %77 None
-OpBranchConditional %73 %75 %76
-%75 = OpLabel
-OpStore %74 %69
-OpBranch %77
-%76 = OpLabel
-OpStore %74 %63
-OpBranch %77
-%77 = OpLabel
-%78 = OpLoad %v3float %74
-OpStore %l %78
-%80 = OpLoad %v2float %47
-%81 = OpCompositeExtract %float %80 0
-%82 = OpFUnordNotEqual %bool %81 %float_0
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-OpStore %83 %63
-OpBranch %86
-%85 = OpLabel
-OpStore %83 %69
-OpBranch %86
+%75 = OpCompositeConstruct %v3bool %73 %73 %73
+%76 = OpSelect %v3float %75 %69 %63
+OpStore %l %76
+%78 = OpLoad %v2float %47
+%79 = OpCompositeExtract %float %78 0
+%80 = OpFUnordNotEqual %bool %79 %float_0
+%81 = OpCompositeConstruct %v3bool %80 %80 %80
+%82 = OpSelect %v3float %81 %63 %69
+OpStore %r %82
+%83 = OpLoad %v2float %47
+%84 = OpCompositeExtract %float %83 1
+%85 = OpFUnordNotEqual %bool %84 %float_0
+OpSelectionMerge %87 None
+OpBranchConditional %85 %86 %87
 %86 = OpLabel
-%87 = OpLoad %v3float %83
-OpStore %r %87
-%88 = OpLoad %v2float %47
-%89 = OpCompositeExtract %float %88 1
-%90 = OpFUnordNotEqual %bool %89 %float_0
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
-%91 = OpLabel
-%96 = OpCompositeExtract %float %78 0
-%97 = OpCompositeExtract %float %78 1
-%95 = OpExtInst %float %1 FMin %96 %97
-%98 = OpCompositeExtract %float %78 2
-%94 = OpExtInst %float %1 FMin %95 %98
-OpStore %_2_mn %94
-%101 = OpExtInst %float %1 FMax %96 %97
-%100 = OpExtInst %float %1 FMax %101 %98
-OpStore %_3_mx %100
-%102 = OpFOrdGreaterThan %bool %100 %94
-OpSelectionMerge %106 None
-OpBranchConditional %102 %104 %105
-%104 = OpLabel
-%107 = OpCompositeConstruct %v3float %94 %94 %94
-%108 = OpFSub %v3float %78 %107
-OpStore %109 %87
-%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109
-%111 = OpVectorTimesScalar %v3float %108 %110
-%112 = OpFSub %float %100 %94
-%114 = OpFDiv %float %float_1 %112
-%115 = OpVectorTimesScalar %v3float %111 %114
-OpStore %103 %115
-OpBranch %106
-%105 = OpLabel
-OpStore %103 %116
-OpBranch %106
-%106 = OpLabel
-%117 = OpLoad %v3float %103
-OpStore %l %117
+%91 = OpCompositeExtract %float %76 0
+%92 = OpCompositeExtract %float %76 1
+%90 = OpExtInst %float %1 FMin %91 %92
+%93 = OpCompositeExtract %float %76 2
+%89 = OpExtInst %float %1 FMin %90 %93
+OpStore %_2_mn %89
+%96 = OpExtInst %float %1 FMax %91 %92
+%95 = OpExtInst %float %1 FMax %96 %93
+OpStore %_3_mx %95
+%97 = OpFOrdGreaterThan %bool %95 %89
+OpSelectionMerge %101 None
+OpBranchConditional %97 %99 %100
+%99 = OpLabel
+%102 = OpCompositeConstruct %v3float %89 %89 %89
+%103 = OpFSub %v3float %76 %102
+OpStore %104 %82
+%105 = OpFunctionCall %float %blend_color_saturation_Qhh3 %104
+%106 = OpVectorTimesScalar %v3float %103 %105
+%107 = OpFSub %float %95 %89
+%109 = OpFDiv %float %float_1 %107
+%110 = OpVectorTimesScalar %v3float %106 %109
+OpStore %98 %110
+OpBranch %101
+%100 = OpLabel
+OpStore %98 %111
+OpBranch %101
+%101 = OpLabel
+%112 = OpLoad %v3float %98
+OpStore %l %112
 OpStore %r %69
-OpBranch %92
-%92 = OpLabel
-%124 = OpLoad %v3float %r
-%119 = OpDot %float %123 %124
-OpStore %_4_lum %119
-%127 = OpLoad %v3float %l
-%126 = OpDot %float %123 %127
-%128 = OpFSub %float %119 %126
-%129 = OpLoad %v3float %l
-%130 = OpCompositeConstruct %v3float %128 %128 %128
-%131 = OpFAdd %v3float %130 %129
-OpStore %_5_result %131
-%135 = OpCompositeExtract %float %131 0
-%136 = OpCompositeExtract %float %131 1
-%134 = OpExtInst %float %1 FMin %135 %136
-%137 = OpCompositeExtract %float %131 2
-%133 = OpExtInst %float %1 FMin %134 %137
-OpStore %_6_minComp %133
-%140 = OpExtInst %float %1 FMax %135 %136
-%139 = OpExtInst %float %1 FMax %140 %137
-OpStore %_7_maxComp %139
-%141 = OpFOrdLessThan %bool %133 %float_0
-OpSelectionMerge %143 None
-OpBranchConditional %141 %142 %143
+OpBranch %87
+%87 = OpLabel
+%119 = OpLoad %v3float %r
+%114 = OpDot %float %118 %119
+OpStore %_4_lum %114
+%122 = OpLoad %v3float %l
+%121 = OpDot %float %118 %122
+%123 = OpFSub %float %114 %121
+%124 = OpLoad %v3float %l
+%125 = OpCompositeConstruct %v3float %123 %123 %123
+%126 = OpFAdd %v3float %125 %124
+OpStore %_5_result %126
+%130 = OpCompositeExtract %float %126 0
+%131 = OpCompositeExtract %float %126 1
+%129 = OpExtInst %float %1 FMin %130 %131
+%132 = OpCompositeExtract %float %126 2
+%128 = OpExtInst %float %1 FMin %129 %132
+OpStore %_6_minComp %128
+%135 = OpExtInst %float %1 FMax %130 %131
+%134 = OpExtInst %float %1 FMax %135 %132
+OpStore %_7_maxComp %134
+%136 = OpFOrdLessThan %bool %128 %float_0
+OpSelectionMerge %138 None
+OpBranchConditional %136 %137 %138
+%137 = OpLabel
+%139 = OpFUnordNotEqual %bool %114 %128
+OpBranch %138
+%138 = OpLabel
+%140 = OpPhi %bool %false %87 %139 %137
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+%143 = OpCompositeConstruct %v3float %114 %114 %114
+%144 = OpFSub %v3float %126 %143
+%145 = OpFSub %float %114 %128
+%146 = OpLoad %float %_kGuardedDivideEpsilon
+%147 = OpFAdd %float %145 %146
+%148 = OpFDiv %float %114 %147
+%149 = OpVectorTimesScalar %v3float %144 %148
+%150 = OpFAdd %v3float %143 %149
+OpStore %_5_result %150
+OpBranch %142
 %142 = OpLabel
-%144 = OpFUnordNotEqual %bool %119 %133
-OpBranch %143
-%143 = OpLabel
-%145 = OpPhi %bool %false %92 %144 %142
-OpSelectionMerge %147 None
-OpBranchConditional %145 %146 %147
-%146 = OpLabel
-%148 = OpCompositeConstruct %v3float %119 %119 %119
-%149 = OpFSub %v3float %131 %148
-%150 = OpFSub %float %119 %133
-%151 = OpLoad %float %_kGuardedDivideEpsilon
-%152 = OpFAdd %float %150 %151
-%153 = OpFDiv %float %119 %152
-%154 = OpVectorTimesScalar %v3float %149 %153
-%155 = OpFAdd %v3float %148 %154
-OpStore %_5_result %155
-OpBranch %147
-%147 = OpLabel
-%156 = OpFOrdGreaterThan %bool %139 %57
-OpSelectionMerge %158 None
-OpBranchConditional %156 %157 %158
+%151 = OpFOrdGreaterThan %bool %134 %57
+OpSelectionMerge %153 None
+OpBranchConditional %151 %152 %153
+%152 = OpLabel
+%154 = OpFUnordNotEqual %bool %134 %114
+OpBranch %153
+%153 = OpLabel
+%155 = OpPhi %bool %false %142 %154 %152
+OpSelectionMerge %157 None
+OpBranchConditional %155 %156 %157
+%156 = OpLabel
+%158 = OpLoad %v3float %_5_result
+%159 = OpCompositeConstruct %v3float %114 %114 %114
+%160 = OpFSub %v3float %158 %159
+%161 = OpFSub %float %57 %114
+%162 = OpVectorTimesScalar %v3float %160 %161
+%163 = OpFSub %float %134 %114
+%164 = OpLoad %float %_kGuardedDivideEpsilon
+%165 = OpFAdd %float %163 %164
+%166 = OpFDiv %float %float_1 %165
+%167 = OpVectorTimesScalar %v3float %162 %166
+%168 = OpFAdd %v3float %159 %167
+OpStore %_5_result %168
+OpBranch %157
 %157 = OpLabel
-%159 = OpFUnordNotEqual %bool %139 %119
-OpBranch %158
-%158 = OpLabel
-%160 = OpPhi %bool %false %147 %159 %157
-OpSelectionMerge %162 None
-OpBranchConditional %160 %161 %162
-%161 = OpLabel
-%163 = OpLoad %v3float %_5_result
-%164 = OpCompositeConstruct %v3float %119 %119 %119
-%165 = OpFSub %v3float %163 %164
-%166 = OpFSub %float %57 %119
-%167 = OpVectorTimesScalar %v3float %165 %166
-%168 = OpFSub %float %139 %119
-%169 = OpLoad %float %_kGuardedDivideEpsilon
-%170 = OpFAdd %float %168 %169
-%171 = OpFDiv %float %float_1 %170
-%172 = OpVectorTimesScalar %v3float %167 %171
-%173 = OpFAdd %v3float %164 %172
-OpStore %_5_result %173
-OpBranch %162
-%162 = OpLabel
-%174 = OpLoad %v3float %_5_result
-%175 = OpLoad %v4float %49
-%176 = OpVectorShuffle %v3float %175 %175 0 1 2
-%177 = OpFAdd %v3float %174 %176
-%178 = OpFSub %v3float %177 %69
-%179 = OpLoad %v4float %48
-%180 = OpVectorShuffle %v3float %179 %179 0 1 2
-%181 = OpFAdd %v3float %178 %180
-%182 = OpFSub %v3float %181 %63
-%183 = OpCompositeExtract %float %182 0
-%184 = OpCompositeExtract %float %182 1
-%185 = OpCompositeExtract %float %182 2
-%186 = OpLoad %v4float %48
-%187 = OpCompositeExtract %float %186 3
-%188 = OpLoad %v4float %49
-%189 = OpCompositeExtract %float %188 3
-%190 = OpFAdd %float %187 %189
-%191 = OpFSub %float %190 %57
-%192 = OpCompositeConstruct %v4float %183 %184 %185 %191
-OpReturnValue %192
+%169 = OpLoad %v3float %_5_result
+%170 = OpLoad %v4float %49
+%171 = OpVectorShuffle %v3float %170 %170 0 1 2
+%172 = OpFAdd %v3float %169 %171
+%173 = OpFSub %v3float %172 %69
+%174 = OpLoad %v4float %48
+%175 = OpVectorShuffle %v3float %174 %174 0 1 2
+%176 = OpFAdd %v3float %173 %175
+%177 = OpFSub %v3float %176 %63
+%178 = OpCompositeExtract %float %177 0
+%179 = OpCompositeExtract %float %177 1
+%180 = OpCompositeExtract %float %177 2
+%181 = OpLoad %v4float %48
+%182 = OpCompositeExtract %float %181 3
+%183 = OpLoad %v4float %49
+%184 = OpCompositeExtract %float %183 3
+%185 = OpFAdd %float %182 %184
+%186 = OpFSub %float %185 %57
+%187 = OpCompositeConstruct %v4float %178 %179 %180 %186
+OpReturnValue %187
 OpFunctionEnd
-%main = OpFunction %void None %194
-%195 = OpLabel
-%197 = OpVariable %_ptr_Function_v2float Function
-%203 = OpVariable %_ptr_Function_v4float Function
-%207 = OpVariable %_ptr_Function_v4float Function
+%main = OpFunction %void None %189
+%190 = OpLabel
+%192 = OpVariable %_ptr_Function_v2float Function
+%198 = OpVariable %_ptr_Function_v4float Function
+%202 = OpVariable %_ptr_Function_v4float Function
 %10 = OpSelect %float %false %float_9_99999994en09 %float_0
 OpStore %_kGuardedDivideEpsilon %10
-OpStore %197 %196
-%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
-%202 = OpLoad %v4float %198
-OpStore %203 %202
-%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%206 = OpLoad %v4float %204
-OpStore %207 %206
-%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207
-OpStore %sk_FragColor %208
+OpStore %192 %191
+%193 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%197 = OpLoad %v4float %193
+OpStore %198 %197
+%199 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
+%201 = OpLoad %v4float %199
+OpStore %202 %201
+%203 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %192 %198 %202
+OpStore %sk_FragColor %203
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/blend/BlendHue.hlsl b/tests/sksl/blend/BlendHue.hlsl
index 67c4afd..2756db5 100644
--- a/tests/sksl/blend/BlendHue.hlsl
+++ b/tests/sksl/blend/BlendHue.hlsl
@@ -27,83 +27,72 @@
     float3 sda = _63;
     float3 _69 = _49.xyz * _48.w;
     float3 dsa = _69;
-    float3 _74 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _74 = _69;
-    }
-    else
-    {
-        _74 = _63;
-    }
-    float3 l = _74;
-    float3 _83 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _83 = _63;
-    }
-    else
-    {
-        _83 = _69;
-    }
-    float3 r = _83;
+    bool3 _75 = (_47.x != 0.0f).xxx;
+    float3 _76 = float3(_75.x ? _69.x : _63.x, _75.y ? _69.y : _63.y, _75.z ? _69.z : _63.z);
+    float3 l = _76;
+    bool3 _81 = (_47.x != 0.0f).xxx;
+    float3 _82 = float3(_81.x ? _63.x : _69.x, _81.y ? _63.y : _69.y, _81.z ? _63.z : _69.z);
+    float3 r = _82;
     if (_47.y != 0.0f)
     {
-        float _94 = min(min(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _94;
-        float _100 = max(max(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _100;
-        float3 _103 = 0.0f.xxx;
-        if (_100 > _94)
+        float _91 = _76.x;
+        float _92 = _76.y;
+        float _93 = _76.z;
+        float _89 = min(min(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _89;
+        float _95 = max(max(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _95;
+        float3 _98 = 0.0f.xxx;
+        if (_95 > _89)
         {
-            float3 _109 = _83;
-            _103 = ((_74 - _94.xxx) * blend_color_saturation_Qhh3(_109)) * (1.0f / (_100 - _94));
+            float3 _104 = _82;
+            _98 = ((_76 - _89.xxx) * blend_color_saturation_Qhh3(_104)) * (1.0f / (_95 - _89));
         }
         else
         {
-            _103 = 0.0f.xxx;
+            _98 = 0.0f.xxx;
         }
-        l = _103;
+        l = _98;
         r = _69;
     }
-    float _119 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
-    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _119;
-    float3 _131 = (_119 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
-    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _131;
-    float _135 = _131.x;
-    float _136 = _131.y;
-    float _137 = _131.z;
-    float _133 = min(min(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _133;
-    float _139 = max(max(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _139;
-    bool _145 = false;
-    if (_133 < 0.0f)
+    float _114 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
+    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _114;
+    float3 _126 = (_114 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
+    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _126;
+    float _130 = _126.x;
+    float _131 = _126.y;
+    float _132 = _126.z;
+    float _128 = min(min(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _128;
+    float _134 = max(max(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _134;
+    bool _140 = false;
+    if (_128 < 0.0f)
     {
-        _145 = _119 != _133;
+        _140 = _114 != _128;
     }
     else
     {
-        _145 = false;
+        _140 = false;
     }
-    if (_145)
+    if (_140)
     {
-        float3 _148 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _148 + ((_131 - _148) * (_119 / ((_119 - _133) + _kGuardedDivideEpsilon)));
+        float3 _143 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _143 + ((_126 - _143) * (_114 / ((_114 - _128) + _kGuardedDivideEpsilon)));
     }
-    bool _160 = false;
-    if (_139 > _57)
+    bool _155 = false;
+    if (_134 > _57)
     {
-        _160 = _139 != _119;
+        _155 = _134 != _114;
     }
     else
     {
-        _160 = false;
+        _155 = false;
     }
-    if (_160)
+    if (_155)
     {
-        float3 _164 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _164 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _164) * (_57 - _119)) * (1.0f / ((_139 - _119) + _kGuardedDivideEpsilon)));
+        float3 _159 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _159 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _159) * (_57 - _114)) * (1.0f / ((_134 - _114) + _kGuardedDivideEpsilon)));
     }
     return float4((((_RESERVED_IDENTIFIER_FIXUP_5_result + _49.xyz) - _69) + _48.xyz) - _63, (_48.w + _49.w) - _57);
 }
@@ -111,10 +100,10 @@
 void frag_main()
 {
     _kGuardedDivideEpsilon = false ? 9.9999999392252902907785028219223e-09f : 0.0f;
-    float2 _197 = float2(0.0f, 1.0f);
-    float4 _203 = _18_src;
-    float4 _207 = _18_dst;
-    sk_FragColor = blend_hslc_h4h2h4h4(_197, _203, _207);
+    float2 _192 = float2(0.0f, 1.0f);
+    float4 _198 = _18_src;
+    float4 _202 = _18_dst;
+    sk_FragColor = blend_hslc_h4h2h4h4(_192, _198, _202);
 }
 
 SPIRV_Cross_Output main()
diff --git a/tests/sksl/blend/BlendLuminosity.asm.frag b/tests/sksl/blend/BlendLuminosity.asm.frag
index f87fd2c..73bfe74 100644
--- a/tests/sksl/blend/BlendLuminosity.asm.frag
+++ b/tests/sksl/blend/BlendLuminosity.asm.frag
@@ -69,48 +69,51 @@
 OpDecorate %l RelaxedPrecision
 OpDecorate %71 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
 OpDecorate %r RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 OpDecorate %_2_mn RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
 OpDecorate %_3_mx RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
 OpDecorate %_4_lum RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %_5_result RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
+OpDecorate %_6_minComp RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
-OpDecorate %_6_minComp RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 OpDecorate %_7_maxComp RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %153 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
-OpDecorate %155 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
 OpDecorate %163 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
@@ -136,13 +139,8 @@
 OpDecorate %185 RelaxedPrecision
 OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
-OpDecorate %191 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %206 RelaxedPrecision
+OpDecorate %197 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 %float = OpTypeFloat 32
 %_ptr_Private_float = OpTypePointer Private %float
 %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private
@@ -166,15 +164,16 @@
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%v3bool = OpTypeVector %bool 3
 %float_1 = OpConstant %float 1
-%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0
+%111 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%118 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %void = OpTypeVoid
-%194 = OpTypeFunction %void
-%196 = OpConstantComposite %v2float %float_1 %float_0
+%189 = OpTypeFunction %void
+%191 = OpConstantComposite %v2float %float_1 %float_0
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -210,13 +209,11 @@
 %sda = OpVariable %_ptr_Function_v3float Function
 %dsa = OpVariable %_ptr_Function_v3float Function
 %l = OpVariable %_ptr_Function_v3float Function
-%74 = OpVariable %_ptr_Function_v3float Function
 %r = OpVariable %_ptr_Function_v3float Function
-%83 = OpVariable %_ptr_Function_v3float Function
 %_2_mn = OpVariable %_ptr_Function_float Function
 %_3_mx = OpVariable %_ptr_Function_float Function
-%103 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_v3float Function
+%98 = OpVariable %_ptr_Function_v3float Function
+%104 = OpVariable %_ptr_Function_v3float Function
 %_4_lum = OpVariable %_ptr_Function_float Function
 %_5_result = OpVariable %_ptr_Function_v3float Function
 %_6_minComp = OpVariable %_ptr_Function_float Function
@@ -242,171 +239,155 @@
 %71 = OpLoad %v2float %47
 %72 = OpCompositeExtract %float %71 0
 %73 = OpFUnordNotEqual %bool %72 %float_0
-OpSelectionMerge %77 None
-OpBranchConditional %73 %75 %76
-%75 = OpLabel
-OpStore %74 %69
-OpBranch %77
-%76 = OpLabel
-OpStore %74 %63
-OpBranch %77
-%77 = OpLabel
-%78 = OpLoad %v3float %74
-OpStore %l %78
-%80 = OpLoad %v2float %47
-%81 = OpCompositeExtract %float %80 0
-%82 = OpFUnordNotEqual %bool %81 %float_0
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-OpStore %83 %63
-OpBranch %86
-%85 = OpLabel
-OpStore %83 %69
-OpBranch %86
+%75 = OpCompositeConstruct %v3bool %73 %73 %73
+%76 = OpSelect %v3float %75 %69 %63
+OpStore %l %76
+%78 = OpLoad %v2float %47
+%79 = OpCompositeExtract %float %78 0
+%80 = OpFUnordNotEqual %bool %79 %float_0
+%81 = OpCompositeConstruct %v3bool %80 %80 %80
+%82 = OpSelect %v3float %81 %63 %69
+OpStore %r %82
+%83 = OpLoad %v2float %47
+%84 = OpCompositeExtract %float %83 1
+%85 = OpFUnordNotEqual %bool %84 %float_0
+OpSelectionMerge %87 None
+OpBranchConditional %85 %86 %87
 %86 = OpLabel
-%87 = OpLoad %v3float %83
-OpStore %r %87
-%88 = OpLoad %v2float %47
-%89 = OpCompositeExtract %float %88 1
-%90 = OpFUnordNotEqual %bool %89 %float_0
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
-%91 = OpLabel
-%96 = OpCompositeExtract %float %78 0
-%97 = OpCompositeExtract %float %78 1
-%95 = OpExtInst %float %1 FMin %96 %97
-%98 = OpCompositeExtract %float %78 2
-%94 = OpExtInst %float %1 FMin %95 %98
-OpStore %_2_mn %94
-%101 = OpExtInst %float %1 FMax %96 %97
-%100 = OpExtInst %float %1 FMax %101 %98
-OpStore %_3_mx %100
-%102 = OpFOrdGreaterThan %bool %100 %94
-OpSelectionMerge %106 None
-OpBranchConditional %102 %104 %105
-%104 = OpLabel
-%107 = OpCompositeConstruct %v3float %94 %94 %94
-%108 = OpFSub %v3float %78 %107
-OpStore %109 %87
-%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109
-%111 = OpVectorTimesScalar %v3float %108 %110
-%112 = OpFSub %float %100 %94
-%114 = OpFDiv %float %float_1 %112
-%115 = OpVectorTimesScalar %v3float %111 %114
-OpStore %103 %115
-OpBranch %106
-%105 = OpLabel
-OpStore %103 %116
-OpBranch %106
-%106 = OpLabel
-%117 = OpLoad %v3float %103
-OpStore %l %117
+%91 = OpCompositeExtract %float %76 0
+%92 = OpCompositeExtract %float %76 1
+%90 = OpExtInst %float %1 FMin %91 %92
+%93 = OpCompositeExtract %float %76 2
+%89 = OpExtInst %float %1 FMin %90 %93
+OpStore %_2_mn %89
+%96 = OpExtInst %float %1 FMax %91 %92
+%95 = OpExtInst %float %1 FMax %96 %93
+OpStore %_3_mx %95
+%97 = OpFOrdGreaterThan %bool %95 %89
+OpSelectionMerge %101 None
+OpBranchConditional %97 %99 %100
+%99 = OpLabel
+%102 = OpCompositeConstruct %v3float %89 %89 %89
+%103 = OpFSub %v3float %76 %102
+OpStore %104 %82
+%105 = OpFunctionCall %float %blend_color_saturation_Qhh3 %104
+%106 = OpVectorTimesScalar %v3float %103 %105
+%107 = OpFSub %float %95 %89
+%109 = OpFDiv %float %float_1 %107
+%110 = OpVectorTimesScalar %v3float %106 %109
+OpStore %98 %110
+OpBranch %101
+%100 = OpLabel
+OpStore %98 %111
+OpBranch %101
+%101 = OpLabel
+%112 = OpLoad %v3float %98
+OpStore %l %112
 OpStore %r %69
-OpBranch %92
-%92 = OpLabel
-%124 = OpLoad %v3float %r
-%119 = OpDot %float %123 %124
-OpStore %_4_lum %119
-%127 = OpLoad %v3float %l
-%126 = OpDot %float %123 %127
-%128 = OpFSub %float %119 %126
-%129 = OpLoad %v3float %l
-%130 = OpCompositeConstruct %v3float %128 %128 %128
-%131 = OpFAdd %v3float %130 %129
-OpStore %_5_result %131
-%135 = OpCompositeExtract %float %131 0
-%136 = OpCompositeExtract %float %131 1
-%134 = OpExtInst %float %1 FMin %135 %136
-%137 = OpCompositeExtract %float %131 2
-%133 = OpExtInst %float %1 FMin %134 %137
-OpStore %_6_minComp %133
-%140 = OpExtInst %float %1 FMax %135 %136
-%139 = OpExtInst %float %1 FMax %140 %137
-OpStore %_7_maxComp %139
-%141 = OpFOrdLessThan %bool %133 %float_0
-OpSelectionMerge %143 None
-OpBranchConditional %141 %142 %143
+OpBranch %87
+%87 = OpLabel
+%119 = OpLoad %v3float %r
+%114 = OpDot %float %118 %119
+OpStore %_4_lum %114
+%122 = OpLoad %v3float %l
+%121 = OpDot %float %118 %122
+%123 = OpFSub %float %114 %121
+%124 = OpLoad %v3float %l
+%125 = OpCompositeConstruct %v3float %123 %123 %123
+%126 = OpFAdd %v3float %125 %124
+OpStore %_5_result %126
+%130 = OpCompositeExtract %float %126 0
+%131 = OpCompositeExtract %float %126 1
+%129 = OpExtInst %float %1 FMin %130 %131
+%132 = OpCompositeExtract %float %126 2
+%128 = OpExtInst %float %1 FMin %129 %132
+OpStore %_6_minComp %128
+%135 = OpExtInst %float %1 FMax %130 %131
+%134 = OpExtInst %float %1 FMax %135 %132
+OpStore %_7_maxComp %134
+%136 = OpFOrdLessThan %bool %128 %float_0
+OpSelectionMerge %138 None
+OpBranchConditional %136 %137 %138
+%137 = OpLabel
+%139 = OpFUnordNotEqual %bool %114 %128
+OpBranch %138
+%138 = OpLabel
+%140 = OpPhi %bool %false %87 %139 %137
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+%143 = OpCompositeConstruct %v3float %114 %114 %114
+%144 = OpFSub %v3float %126 %143
+%145 = OpFSub %float %114 %128
+%146 = OpLoad %float %_kGuardedDivideEpsilon
+%147 = OpFAdd %float %145 %146
+%148 = OpFDiv %float %114 %147
+%149 = OpVectorTimesScalar %v3float %144 %148
+%150 = OpFAdd %v3float %143 %149
+OpStore %_5_result %150
+OpBranch %142
 %142 = OpLabel
-%144 = OpFUnordNotEqual %bool %119 %133
-OpBranch %143
-%143 = OpLabel
-%145 = OpPhi %bool %false %92 %144 %142
-OpSelectionMerge %147 None
-OpBranchConditional %145 %146 %147
-%146 = OpLabel
-%148 = OpCompositeConstruct %v3float %119 %119 %119
-%149 = OpFSub %v3float %131 %148
-%150 = OpFSub %float %119 %133
-%151 = OpLoad %float %_kGuardedDivideEpsilon
-%152 = OpFAdd %float %150 %151
-%153 = OpFDiv %float %119 %152
-%154 = OpVectorTimesScalar %v3float %149 %153
-%155 = OpFAdd %v3float %148 %154
-OpStore %_5_result %155
-OpBranch %147
-%147 = OpLabel
-%156 = OpFOrdGreaterThan %bool %139 %57
-OpSelectionMerge %158 None
-OpBranchConditional %156 %157 %158
+%151 = OpFOrdGreaterThan %bool %134 %57
+OpSelectionMerge %153 None
+OpBranchConditional %151 %152 %153
+%152 = OpLabel
+%154 = OpFUnordNotEqual %bool %134 %114
+OpBranch %153
+%153 = OpLabel
+%155 = OpPhi %bool %false %142 %154 %152
+OpSelectionMerge %157 None
+OpBranchConditional %155 %156 %157
+%156 = OpLabel
+%158 = OpLoad %v3float %_5_result
+%159 = OpCompositeConstruct %v3float %114 %114 %114
+%160 = OpFSub %v3float %158 %159
+%161 = OpFSub %float %57 %114
+%162 = OpVectorTimesScalar %v3float %160 %161
+%163 = OpFSub %float %134 %114
+%164 = OpLoad %float %_kGuardedDivideEpsilon
+%165 = OpFAdd %float %163 %164
+%166 = OpFDiv %float %float_1 %165
+%167 = OpVectorTimesScalar %v3float %162 %166
+%168 = OpFAdd %v3float %159 %167
+OpStore %_5_result %168
+OpBranch %157
 %157 = OpLabel
-%159 = OpFUnordNotEqual %bool %139 %119
-OpBranch %158
-%158 = OpLabel
-%160 = OpPhi %bool %false %147 %159 %157
-OpSelectionMerge %162 None
-OpBranchConditional %160 %161 %162
-%161 = OpLabel
-%163 = OpLoad %v3float %_5_result
-%164 = OpCompositeConstruct %v3float %119 %119 %119
-%165 = OpFSub %v3float %163 %164
-%166 = OpFSub %float %57 %119
-%167 = OpVectorTimesScalar %v3float %165 %166
-%168 = OpFSub %float %139 %119
-%169 = OpLoad %float %_kGuardedDivideEpsilon
-%170 = OpFAdd %float %168 %169
-%171 = OpFDiv %float %float_1 %170
-%172 = OpVectorTimesScalar %v3float %167 %171
-%173 = OpFAdd %v3float %164 %172
-OpStore %_5_result %173
-OpBranch %162
-%162 = OpLabel
-%174 = OpLoad %v3float %_5_result
-%175 = OpLoad %v4float %49
-%176 = OpVectorShuffle %v3float %175 %175 0 1 2
-%177 = OpFAdd %v3float %174 %176
-%178 = OpFSub %v3float %177 %69
-%179 = OpLoad %v4float %48
-%180 = OpVectorShuffle %v3float %179 %179 0 1 2
-%181 = OpFAdd %v3float %178 %180
-%182 = OpFSub %v3float %181 %63
-%183 = OpCompositeExtract %float %182 0
-%184 = OpCompositeExtract %float %182 1
-%185 = OpCompositeExtract %float %182 2
-%186 = OpLoad %v4float %48
-%187 = OpCompositeExtract %float %186 3
-%188 = OpLoad %v4float %49
-%189 = OpCompositeExtract %float %188 3
-%190 = OpFAdd %float %187 %189
-%191 = OpFSub %float %190 %57
-%192 = OpCompositeConstruct %v4float %183 %184 %185 %191
-OpReturnValue %192
+%169 = OpLoad %v3float %_5_result
+%170 = OpLoad %v4float %49
+%171 = OpVectorShuffle %v3float %170 %170 0 1 2
+%172 = OpFAdd %v3float %169 %171
+%173 = OpFSub %v3float %172 %69
+%174 = OpLoad %v4float %48
+%175 = OpVectorShuffle %v3float %174 %174 0 1 2
+%176 = OpFAdd %v3float %173 %175
+%177 = OpFSub %v3float %176 %63
+%178 = OpCompositeExtract %float %177 0
+%179 = OpCompositeExtract %float %177 1
+%180 = OpCompositeExtract %float %177 2
+%181 = OpLoad %v4float %48
+%182 = OpCompositeExtract %float %181 3
+%183 = OpLoad %v4float %49
+%184 = OpCompositeExtract %float %183 3
+%185 = OpFAdd %float %182 %184
+%186 = OpFSub %float %185 %57
+%187 = OpCompositeConstruct %v4float %178 %179 %180 %186
+OpReturnValue %187
 OpFunctionEnd
-%main = OpFunction %void None %194
-%195 = OpLabel
-%197 = OpVariable %_ptr_Function_v2float Function
-%203 = OpVariable %_ptr_Function_v4float Function
-%207 = OpVariable %_ptr_Function_v4float Function
+%main = OpFunction %void None %189
+%190 = OpLabel
+%192 = OpVariable %_ptr_Function_v2float Function
+%198 = OpVariable %_ptr_Function_v4float Function
+%202 = OpVariable %_ptr_Function_v4float Function
 %10 = OpSelect %float %false %float_9_99999994en09 %float_0
 OpStore %_kGuardedDivideEpsilon %10
-OpStore %197 %196
-%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
-%202 = OpLoad %v4float %198
-OpStore %203 %202
-%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%206 = OpLoad %v4float %204
-OpStore %207 %206
-%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207
-OpStore %sk_FragColor %208
+OpStore %192 %191
+%193 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%197 = OpLoad %v4float %193
+OpStore %198 %197
+%199 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
+%201 = OpLoad %v4float %199
+OpStore %202 %201
+%203 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %192 %198 %202
+OpStore %sk_FragColor %203
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/blend/BlendLuminosity.hlsl b/tests/sksl/blend/BlendLuminosity.hlsl
index f275e8e..0519c98 100644
--- a/tests/sksl/blend/BlendLuminosity.hlsl
+++ b/tests/sksl/blend/BlendLuminosity.hlsl
@@ -27,83 +27,72 @@
     float3 sda = _63;
     float3 _69 = _49.xyz * _48.w;
     float3 dsa = _69;
-    float3 _74 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _74 = _69;
-    }
-    else
-    {
-        _74 = _63;
-    }
-    float3 l = _74;
-    float3 _83 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _83 = _63;
-    }
-    else
-    {
-        _83 = _69;
-    }
-    float3 r = _83;
+    bool3 _75 = (_47.x != 0.0f).xxx;
+    float3 _76 = float3(_75.x ? _69.x : _63.x, _75.y ? _69.y : _63.y, _75.z ? _69.z : _63.z);
+    float3 l = _76;
+    bool3 _81 = (_47.x != 0.0f).xxx;
+    float3 _82 = float3(_81.x ? _63.x : _69.x, _81.y ? _63.y : _69.y, _81.z ? _63.z : _69.z);
+    float3 r = _82;
     if (_47.y != 0.0f)
     {
-        float _94 = min(min(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _94;
-        float _100 = max(max(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _100;
-        float3 _103 = 0.0f.xxx;
-        if (_100 > _94)
+        float _91 = _76.x;
+        float _92 = _76.y;
+        float _93 = _76.z;
+        float _89 = min(min(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _89;
+        float _95 = max(max(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _95;
+        float3 _98 = 0.0f.xxx;
+        if (_95 > _89)
         {
-            float3 _109 = _83;
-            _103 = ((_74 - _94.xxx) * blend_color_saturation_Qhh3(_109)) * (1.0f / (_100 - _94));
+            float3 _104 = _82;
+            _98 = ((_76 - _89.xxx) * blend_color_saturation_Qhh3(_104)) * (1.0f / (_95 - _89));
         }
         else
         {
-            _103 = 0.0f.xxx;
+            _98 = 0.0f.xxx;
         }
-        l = _103;
+        l = _98;
         r = _69;
     }
-    float _119 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
-    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _119;
-    float3 _131 = (_119 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
-    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _131;
-    float _135 = _131.x;
-    float _136 = _131.y;
-    float _137 = _131.z;
-    float _133 = min(min(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _133;
-    float _139 = max(max(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _139;
-    bool _145 = false;
-    if (_133 < 0.0f)
+    float _114 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
+    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _114;
+    float3 _126 = (_114 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
+    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _126;
+    float _130 = _126.x;
+    float _131 = _126.y;
+    float _132 = _126.z;
+    float _128 = min(min(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _128;
+    float _134 = max(max(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _134;
+    bool _140 = false;
+    if (_128 < 0.0f)
     {
-        _145 = _119 != _133;
+        _140 = _114 != _128;
     }
     else
     {
-        _145 = false;
+        _140 = false;
     }
-    if (_145)
+    if (_140)
     {
-        float3 _148 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _148 + ((_131 - _148) * (_119 / ((_119 - _133) + _kGuardedDivideEpsilon)));
+        float3 _143 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _143 + ((_126 - _143) * (_114 / ((_114 - _128) + _kGuardedDivideEpsilon)));
     }
-    bool _160 = false;
-    if (_139 > _57)
+    bool _155 = false;
+    if (_134 > _57)
     {
-        _160 = _139 != _119;
+        _155 = _134 != _114;
     }
     else
     {
-        _160 = false;
+        _155 = false;
     }
-    if (_160)
+    if (_155)
     {
-        float3 _164 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _164 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _164) * (_57 - _119)) * (1.0f / ((_139 - _119) + _kGuardedDivideEpsilon)));
+        float3 _159 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _159 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _159) * (_57 - _114)) * (1.0f / ((_134 - _114) + _kGuardedDivideEpsilon)));
     }
     return float4((((_RESERVED_IDENTIFIER_FIXUP_5_result + _49.xyz) - _69) + _48.xyz) - _63, (_48.w + _49.w) - _57);
 }
@@ -111,10 +100,10 @@
 void frag_main()
 {
     _kGuardedDivideEpsilon = false ? 9.9999999392252902907785028219223e-09f : 0.0f;
-    float2 _197 = float2(1.0f, 0.0f);
-    float4 _203 = _18_src;
-    float4 _207 = _18_dst;
-    sk_FragColor = blend_hslc_h4h2h4h4(_197, _203, _207);
+    float2 _192 = float2(1.0f, 0.0f);
+    float4 _198 = _18_src;
+    float4 _202 = _18_dst;
+    sk_FragColor = blend_hslc_h4h2h4h4(_192, _198, _202);
 }
 
 SPIRV_Cross_Output main()
diff --git a/tests/sksl/blend/BlendSaturation.asm.frag b/tests/sksl/blend/BlendSaturation.asm.frag
index 5eef91c..ead7309 100644
--- a/tests/sksl/blend/BlendSaturation.asm.frag
+++ b/tests/sksl/blend/BlendSaturation.asm.frag
@@ -69,48 +69,51 @@
 OpDecorate %l RelaxedPrecision
 OpDecorate %71 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
 OpDecorate %r RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 OpDecorate %_2_mn RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
 OpDecorate %_3_mx RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
 OpDecorate %_4_lum RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 OpDecorate %_5_result RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
+OpDecorate %_6_minComp RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
-OpDecorate %_6_minComp RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 OpDecorate %_7_maxComp RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %153 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
-OpDecorate %155 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
 OpDecorate %163 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
 OpDecorate %165 RelaxedPrecision
@@ -136,13 +139,8 @@
 OpDecorate %185 RelaxedPrecision
 OpDecorate %186 RelaxedPrecision
 OpDecorate %187 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
-OpDecorate %189 RelaxedPrecision
-OpDecorate %190 RelaxedPrecision
-OpDecorate %191 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
-OpDecorate %206 RelaxedPrecision
+OpDecorate %197 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 %float = OpTypeFloat 32
 %_ptr_Private_float = OpTypePointer Private %float
 %_kGuardedDivideEpsilon = OpVariable %_ptr_Private_float Private
@@ -166,15 +164,16 @@
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %46 = OpTypeFunction %v4float %_ptr_Function_v2float %_ptr_Function_v4float %_ptr_Function_v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%v3bool = OpTypeVector %bool 3
 %float_1 = OpConstant %float 1
-%116 = OpConstantComposite %v3float %float_0 %float_0 %float_0
+%111 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %float_0_300000012 = OpConstant %float 0.300000012
 %float_0_589999974 = OpConstant %float 0.589999974
 %float_0_109999999 = OpConstant %float 0.109999999
-%123 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
+%118 = OpConstantComposite %v3float %float_0_300000012 %float_0_589999974 %float_0_109999999
 %void = OpTypeVoid
-%194 = OpTypeFunction %void
-%196 = OpConstantComposite %v2float %float_1 %float_1
+%189 = OpTypeFunction %void
+%191 = OpConstantComposite %v2float %float_1 %float_1
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -210,13 +209,11 @@
 %sda = OpVariable %_ptr_Function_v3float Function
 %dsa = OpVariable %_ptr_Function_v3float Function
 %l = OpVariable %_ptr_Function_v3float Function
-%74 = OpVariable %_ptr_Function_v3float Function
 %r = OpVariable %_ptr_Function_v3float Function
-%83 = OpVariable %_ptr_Function_v3float Function
 %_2_mn = OpVariable %_ptr_Function_float Function
 %_3_mx = OpVariable %_ptr_Function_float Function
-%103 = OpVariable %_ptr_Function_v3float Function
-%109 = OpVariable %_ptr_Function_v3float Function
+%98 = OpVariable %_ptr_Function_v3float Function
+%104 = OpVariable %_ptr_Function_v3float Function
 %_4_lum = OpVariable %_ptr_Function_float Function
 %_5_result = OpVariable %_ptr_Function_v3float Function
 %_6_minComp = OpVariable %_ptr_Function_float Function
@@ -242,171 +239,155 @@
 %71 = OpLoad %v2float %47
 %72 = OpCompositeExtract %float %71 0
 %73 = OpFUnordNotEqual %bool %72 %float_0
-OpSelectionMerge %77 None
-OpBranchConditional %73 %75 %76
-%75 = OpLabel
-OpStore %74 %69
-OpBranch %77
-%76 = OpLabel
-OpStore %74 %63
-OpBranch %77
-%77 = OpLabel
-%78 = OpLoad %v3float %74
-OpStore %l %78
-%80 = OpLoad %v2float %47
-%81 = OpCompositeExtract %float %80 0
-%82 = OpFUnordNotEqual %bool %81 %float_0
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-OpStore %83 %63
-OpBranch %86
-%85 = OpLabel
-OpStore %83 %69
-OpBranch %86
+%75 = OpCompositeConstruct %v3bool %73 %73 %73
+%76 = OpSelect %v3float %75 %69 %63
+OpStore %l %76
+%78 = OpLoad %v2float %47
+%79 = OpCompositeExtract %float %78 0
+%80 = OpFUnordNotEqual %bool %79 %float_0
+%81 = OpCompositeConstruct %v3bool %80 %80 %80
+%82 = OpSelect %v3float %81 %63 %69
+OpStore %r %82
+%83 = OpLoad %v2float %47
+%84 = OpCompositeExtract %float %83 1
+%85 = OpFUnordNotEqual %bool %84 %float_0
+OpSelectionMerge %87 None
+OpBranchConditional %85 %86 %87
 %86 = OpLabel
-%87 = OpLoad %v3float %83
-OpStore %r %87
-%88 = OpLoad %v2float %47
-%89 = OpCompositeExtract %float %88 1
-%90 = OpFUnordNotEqual %bool %89 %float_0
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
-%91 = OpLabel
-%96 = OpCompositeExtract %float %78 0
-%97 = OpCompositeExtract %float %78 1
-%95 = OpExtInst %float %1 FMin %96 %97
-%98 = OpCompositeExtract %float %78 2
-%94 = OpExtInst %float %1 FMin %95 %98
-OpStore %_2_mn %94
-%101 = OpExtInst %float %1 FMax %96 %97
-%100 = OpExtInst %float %1 FMax %101 %98
-OpStore %_3_mx %100
-%102 = OpFOrdGreaterThan %bool %100 %94
-OpSelectionMerge %106 None
-OpBranchConditional %102 %104 %105
-%104 = OpLabel
-%107 = OpCompositeConstruct %v3float %94 %94 %94
-%108 = OpFSub %v3float %78 %107
-OpStore %109 %87
-%110 = OpFunctionCall %float %blend_color_saturation_Qhh3 %109
-%111 = OpVectorTimesScalar %v3float %108 %110
-%112 = OpFSub %float %100 %94
-%114 = OpFDiv %float %float_1 %112
-%115 = OpVectorTimesScalar %v3float %111 %114
-OpStore %103 %115
-OpBranch %106
-%105 = OpLabel
-OpStore %103 %116
-OpBranch %106
-%106 = OpLabel
-%117 = OpLoad %v3float %103
-OpStore %l %117
+%91 = OpCompositeExtract %float %76 0
+%92 = OpCompositeExtract %float %76 1
+%90 = OpExtInst %float %1 FMin %91 %92
+%93 = OpCompositeExtract %float %76 2
+%89 = OpExtInst %float %1 FMin %90 %93
+OpStore %_2_mn %89
+%96 = OpExtInst %float %1 FMax %91 %92
+%95 = OpExtInst %float %1 FMax %96 %93
+OpStore %_3_mx %95
+%97 = OpFOrdGreaterThan %bool %95 %89
+OpSelectionMerge %101 None
+OpBranchConditional %97 %99 %100
+%99 = OpLabel
+%102 = OpCompositeConstruct %v3float %89 %89 %89
+%103 = OpFSub %v3float %76 %102
+OpStore %104 %82
+%105 = OpFunctionCall %float %blend_color_saturation_Qhh3 %104
+%106 = OpVectorTimesScalar %v3float %103 %105
+%107 = OpFSub %float %95 %89
+%109 = OpFDiv %float %float_1 %107
+%110 = OpVectorTimesScalar %v3float %106 %109
+OpStore %98 %110
+OpBranch %101
+%100 = OpLabel
+OpStore %98 %111
+OpBranch %101
+%101 = OpLabel
+%112 = OpLoad %v3float %98
+OpStore %l %112
 OpStore %r %69
-OpBranch %92
-%92 = OpLabel
-%124 = OpLoad %v3float %r
-%119 = OpDot %float %123 %124
-OpStore %_4_lum %119
-%127 = OpLoad %v3float %l
-%126 = OpDot %float %123 %127
-%128 = OpFSub %float %119 %126
-%129 = OpLoad %v3float %l
-%130 = OpCompositeConstruct %v3float %128 %128 %128
-%131 = OpFAdd %v3float %130 %129
-OpStore %_5_result %131
-%135 = OpCompositeExtract %float %131 0
-%136 = OpCompositeExtract %float %131 1
-%134 = OpExtInst %float %1 FMin %135 %136
-%137 = OpCompositeExtract %float %131 2
-%133 = OpExtInst %float %1 FMin %134 %137
-OpStore %_6_minComp %133
-%140 = OpExtInst %float %1 FMax %135 %136
-%139 = OpExtInst %float %1 FMax %140 %137
-OpStore %_7_maxComp %139
-%141 = OpFOrdLessThan %bool %133 %float_0
-OpSelectionMerge %143 None
-OpBranchConditional %141 %142 %143
+OpBranch %87
+%87 = OpLabel
+%119 = OpLoad %v3float %r
+%114 = OpDot %float %118 %119
+OpStore %_4_lum %114
+%122 = OpLoad %v3float %l
+%121 = OpDot %float %118 %122
+%123 = OpFSub %float %114 %121
+%124 = OpLoad %v3float %l
+%125 = OpCompositeConstruct %v3float %123 %123 %123
+%126 = OpFAdd %v3float %125 %124
+OpStore %_5_result %126
+%130 = OpCompositeExtract %float %126 0
+%131 = OpCompositeExtract %float %126 1
+%129 = OpExtInst %float %1 FMin %130 %131
+%132 = OpCompositeExtract %float %126 2
+%128 = OpExtInst %float %1 FMin %129 %132
+OpStore %_6_minComp %128
+%135 = OpExtInst %float %1 FMax %130 %131
+%134 = OpExtInst %float %1 FMax %135 %132
+OpStore %_7_maxComp %134
+%136 = OpFOrdLessThan %bool %128 %float_0
+OpSelectionMerge %138 None
+OpBranchConditional %136 %137 %138
+%137 = OpLabel
+%139 = OpFUnordNotEqual %bool %114 %128
+OpBranch %138
+%138 = OpLabel
+%140 = OpPhi %bool %false %87 %139 %137
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+%143 = OpCompositeConstruct %v3float %114 %114 %114
+%144 = OpFSub %v3float %126 %143
+%145 = OpFSub %float %114 %128
+%146 = OpLoad %float %_kGuardedDivideEpsilon
+%147 = OpFAdd %float %145 %146
+%148 = OpFDiv %float %114 %147
+%149 = OpVectorTimesScalar %v3float %144 %148
+%150 = OpFAdd %v3float %143 %149
+OpStore %_5_result %150
+OpBranch %142
 %142 = OpLabel
-%144 = OpFUnordNotEqual %bool %119 %133
-OpBranch %143
-%143 = OpLabel
-%145 = OpPhi %bool %false %92 %144 %142
-OpSelectionMerge %147 None
-OpBranchConditional %145 %146 %147
-%146 = OpLabel
-%148 = OpCompositeConstruct %v3float %119 %119 %119
-%149 = OpFSub %v3float %131 %148
-%150 = OpFSub %float %119 %133
-%151 = OpLoad %float %_kGuardedDivideEpsilon
-%152 = OpFAdd %float %150 %151
-%153 = OpFDiv %float %119 %152
-%154 = OpVectorTimesScalar %v3float %149 %153
-%155 = OpFAdd %v3float %148 %154
-OpStore %_5_result %155
-OpBranch %147
-%147 = OpLabel
-%156 = OpFOrdGreaterThan %bool %139 %57
-OpSelectionMerge %158 None
-OpBranchConditional %156 %157 %158
+%151 = OpFOrdGreaterThan %bool %134 %57
+OpSelectionMerge %153 None
+OpBranchConditional %151 %152 %153
+%152 = OpLabel
+%154 = OpFUnordNotEqual %bool %134 %114
+OpBranch %153
+%153 = OpLabel
+%155 = OpPhi %bool %false %142 %154 %152
+OpSelectionMerge %157 None
+OpBranchConditional %155 %156 %157
+%156 = OpLabel
+%158 = OpLoad %v3float %_5_result
+%159 = OpCompositeConstruct %v3float %114 %114 %114
+%160 = OpFSub %v3float %158 %159
+%161 = OpFSub %float %57 %114
+%162 = OpVectorTimesScalar %v3float %160 %161
+%163 = OpFSub %float %134 %114
+%164 = OpLoad %float %_kGuardedDivideEpsilon
+%165 = OpFAdd %float %163 %164
+%166 = OpFDiv %float %float_1 %165
+%167 = OpVectorTimesScalar %v3float %162 %166
+%168 = OpFAdd %v3float %159 %167
+OpStore %_5_result %168
+OpBranch %157
 %157 = OpLabel
-%159 = OpFUnordNotEqual %bool %139 %119
-OpBranch %158
-%158 = OpLabel
-%160 = OpPhi %bool %false %147 %159 %157
-OpSelectionMerge %162 None
-OpBranchConditional %160 %161 %162
-%161 = OpLabel
-%163 = OpLoad %v3float %_5_result
-%164 = OpCompositeConstruct %v3float %119 %119 %119
-%165 = OpFSub %v3float %163 %164
-%166 = OpFSub %float %57 %119
-%167 = OpVectorTimesScalar %v3float %165 %166
-%168 = OpFSub %float %139 %119
-%169 = OpLoad %float %_kGuardedDivideEpsilon
-%170 = OpFAdd %float %168 %169
-%171 = OpFDiv %float %float_1 %170
-%172 = OpVectorTimesScalar %v3float %167 %171
-%173 = OpFAdd %v3float %164 %172
-OpStore %_5_result %173
-OpBranch %162
-%162 = OpLabel
-%174 = OpLoad %v3float %_5_result
-%175 = OpLoad %v4float %49
-%176 = OpVectorShuffle %v3float %175 %175 0 1 2
-%177 = OpFAdd %v3float %174 %176
-%178 = OpFSub %v3float %177 %69
-%179 = OpLoad %v4float %48
-%180 = OpVectorShuffle %v3float %179 %179 0 1 2
-%181 = OpFAdd %v3float %178 %180
-%182 = OpFSub %v3float %181 %63
-%183 = OpCompositeExtract %float %182 0
-%184 = OpCompositeExtract %float %182 1
-%185 = OpCompositeExtract %float %182 2
-%186 = OpLoad %v4float %48
-%187 = OpCompositeExtract %float %186 3
-%188 = OpLoad %v4float %49
-%189 = OpCompositeExtract %float %188 3
-%190 = OpFAdd %float %187 %189
-%191 = OpFSub %float %190 %57
-%192 = OpCompositeConstruct %v4float %183 %184 %185 %191
-OpReturnValue %192
+%169 = OpLoad %v3float %_5_result
+%170 = OpLoad %v4float %49
+%171 = OpVectorShuffle %v3float %170 %170 0 1 2
+%172 = OpFAdd %v3float %169 %171
+%173 = OpFSub %v3float %172 %69
+%174 = OpLoad %v4float %48
+%175 = OpVectorShuffle %v3float %174 %174 0 1 2
+%176 = OpFAdd %v3float %173 %175
+%177 = OpFSub %v3float %176 %63
+%178 = OpCompositeExtract %float %177 0
+%179 = OpCompositeExtract %float %177 1
+%180 = OpCompositeExtract %float %177 2
+%181 = OpLoad %v4float %48
+%182 = OpCompositeExtract %float %181 3
+%183 = OpLoad %v4float %49
+%184 = OpCompositeExtract %float %183 3
+%185 = OpFAdd %float %182 %184
+%186 = OpFSub %float %185 %57
+%187 = OpCompositeConstruct %v4float %178 %179 %180 %186
+OpReturnValue %187
 OpFunctionEnd
-%main = OpFunction %void None %194
-%195 = OpLabel
-%197 = OpVariable %_ptr_Function_v2float Function
-%203 = OpVariable %_ptr_Function_v4float Function
-%207 = OpVariable %_ptr_Function_v4float Function
+%main = OpFunction %void None %189
+%190 = OpLabel
+%192 = OpVariable %_ptr_Function_v2float Function
+%198 = OpVariable %_ptr_Function_v4float Function
+%202 = OpVariable %_ptr_Function_v4float Function
 %10 = OpSelect %float %false %float_9_99999994en09 %float_0
 OpStore %_kGuardedDivideEpsilon %10
-OpStore %197 %196
-%198 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
-%202 = OpLoad %v4float %198
-OpStore %203 %202
-%204 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%206 = OpLoad %v4float %204
-OpStore %207 %206
-%208 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %197 %203 %207
-OpStore %sk_FragColor %208
+OpStore %192 %191
+%193 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%197 = OpLoad %v4float %193
+OpStore %198 %197
+%199 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
+%201 = OpLoad %v4float %199
+OpStore %202 %201
+%203 = OpFunctionCall %v4float %blend_hslc_h4h2h4h4 %192 %198 %202
+OpStore %sk_FragColor %203
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/blend/BlendSaturation.hlsl b/tests/sksl/blend/BlendSaturation.hlsl
index 6cdaeae..7104ee8 100644
--- a/tests/sksl/blend/BlendSaturation.hlsl
+++ b/tests/sksl/blend/BlendSaturation.hlsl
@@ -27,83 +27,72 @@
     float3 sda = _63;
     float3 _69 = _49.xyz * _48.w;
     float3 dsa = _69;
-    float3 _74 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _74 = _69;
-    }
-    else
-    {
-        _74 = _63;
-    }
-    float3 l = _74;
-    float3 _83 = 0.0f.xxx;
-    if (_47.x != 0.0f)
-    {
-        _83 = _63;
-    }
-    else
-    {
-        _83 = _69;
-    }
-    float3 r = _83;
+    bool3 _75 = (_47.x != 0.0f).xxx;
+    float3 _76 = float3(_75.x ? _69.x : _63.x, _75.y ? _69.y : _63.y, _75.z ? _69.z : _63.z);
+    float3 l = _76;
+    bool3 _81 = (_47.x != 0.0f).xxx;
+    float3 _82 = float3(_81.x ? _63.x : _69.x, _81.y ? _63.y : _69.y, _81.z ? _63.z : _69.z);
+    float3 r = _82;
     if (_47.y != 0.0f)
     {
-        float _94 = min(min(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _94;
-        float _100 = max(max(_74.x, _74.y), _74.z);
-        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _100;
-        float3 _103 = 0.0f.xxx;
-        if (_100 > _94)
+        float _91 = _76.x;
+        float _92 = _76.y;
+        float _93 = _76.z;
+        float _89 = min(min(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_2_mn = _89;
+        float _95 = max(max(_91, _92), _93);
+        float _RESERVED_IDENTIFIER_FIXUP_3_mx = _95;
+        float3 _98 = 0.0f.xxx;
+        if (_95 > _89)
         {
-            float3 _109 = _83;
-            _103 = ((_74 - _94.xxx) * blend_color_saturation_Qhh3(_109)) * (1.0f / (_100 - _94));
+            float3 _104 = _82;
+            _98 = ((_76 - _89.xxx) * blend_color_saturation_Qhh3(_104)) * (1.0f / (_95 - _89));
         }
         else
         {
-            _103 = 0.0f.xxx;
+            _98 = 0.0f.xxx;
         }
-        l = _103;
+        l = _98;
         r = _69;
     }
-    float _119 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
-    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _119;
-    float3 _131 = (_119 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
-    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _131;
-    float _135 = _131.x;
-    float _136 = _131.y;
-    float _137 = _131.z;
-    float _133 = min(min(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _133;
-    float _139 = max(max(_135, _136), _137);
-    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _139;
-    bool _145 = false;
-    if (_133 < 0.0f)
+    float _114 = dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), r);
+    float _RESERVED_IDENTIFIER_FIXUP_4_lum = _114;
+    float3 _126 = (_114 - dot(float3(0.300000011920928955078125f, 0.589999973773956298828125f, 0.10999999940395355224609375f), l)).xxx + l;
+    float3 _RESERVED_IDENTIFIER_FIXUP_5_result = _126;
+    float _130 = _126.x;
+    float _131 = _126.y;
+    float _132 = _126.z;
+    float _128 = min(min(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_6_minComp = _128;
+    float _134 = max(max(_130, _131), _132);
+    float _RESERVED_IDENTIFIER_FIXUP_7_maxComp = _134;
+    bool _140 = false;
+    if (_128 < 0.0f)
     {
-        _145 = _119 != _133;
+        _140 = _114 != _128;
     }
     else
     {
-        _145 = false;
+        _140 = false;
     }
-    if (_145)
+    if (_140)
     {
-        float3 _148 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _148 + ((_131 - _148) * (_119 / ((_119 - _133) + _kGuardedDivideEpsilon)));
+        float3 _143 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _143 + ((_126 - _143) * (_114 / ((_114 - _128) + _kGuardedDivideEpsilon)));
     }
-    bool _160 = false;
-    if (_139 > _57)
+    bool _155 = false;
+    if (_134 > _57)
     {
-        _160 = _139 != _119;
+        _155 = _134 != _114;
     }
     else
     {
-        _160 = false;
+        _155 = false;
     }
-    if (_160)
+    if (_155)
     {
-        float3 _164 = _119.xxx;
-        _RESERVED_IDENTIFIER_FIXUP_5_result = _164 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _164) * (_57 - _119)) * (1.0f / ((_139 - _119) + _kGuardedDivideEpsilon)));
+        float3 _159 = _114.xxx;
+        _RESERVED_IDENTIFIER_FIXUP_5_result = _159 + (((_RESERVED_IDENTIFIER_FIXUP_5_result - _159) * (_57 - _114)) * (1.0f / ((_134 - _114) + _kGuardedDivideEpsilon)));
     }
     return float4((((_RESERVED_IDENTIFIER_FIXUP_5_result + _49.xyz) - _69) + _48.xyz) - _63, (_48.w + _49.w) - _57);
 }
@@ -111,10 +100,10 @@
 void frag_main()
 {
     _kGuardedDivideEpsilon = false ? 9.9999999392252902907785028219223e-09f : 0.0f;
-    float2 _197 = 1.0f.xx;
-    float4 _203 = _18_src;
-    float4 _207 = _18_dst;
-    sk_FragColor = blend_hslc_h4h2h4h4(_197, _203, _207);
+    float2 _192 = 1.0f.xx;
+    float4 _198 = _18_src;
+    float4 _202 = _18_dst;
+    sk_FragColor = blend_hslc_h4h2h4h4(_192, _198, _202);
 }
 
 SPIRV_Cross_Output main()
diff --git a/tests/sksl/intrinsics/AbsFloat.asm.frag b/tests/sksl/intrinsics/AbsFloat.asm.frag
index f8dc829..04ab98b 100644
--- a/tests/sksl/intrinsics/AbsFloat.asm.frag
+++ b/tests/sksl/intrinsics/AbsFloat.asm.frag
@@ -24,9 +24,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %100 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -74,7 +73,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%94 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %31
 %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %34
@@ -148,19 +146,11 @@
 OpBranch %92
 %92 = OpLabel
 %93 = OpPhi %bool %false %85 %true %91
-OpSelectionMerge %97 None
-OpBranchConditional %93 %95 %96
-%95 = OpLabel
-%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%100 = OpLoad %v4float %98
-OpStore %94 %100
-OpBranch %97
-%96 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%103 = OpLoad %v4float %101
-OpStore %94 %103
-OpBranch %97
-%97 = OpLabel
-%104 = OpLoad %v4float %94
-OpReturnValue %104
+%94 = OpCompositeConstruct %v4bool %93 %93 %93 %93
+%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%98 = OpLoad %v4float %96
+%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%101 = OpLoad %v4float %99
+%95 = OpSelect %v4float %94 %98 %101
+OpReturnValue %95
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/AbsFloat.hlsl b/tests/sksl/intrinsics/AbsFloat.hlsl
index 5de06af..9f223c1 100644
--- a/tests/sksl/intrinsics/AbsFloat.hlsl
+++ b/tests/sksl/intrinsics/AbsFloat.hlsl
@@ -82,16 +82,8 @@
     {
         _93 = false;
     }
-    float4 _94 = 0.0f.xxxx;
-    if (_93)
-    {
-        _94 = _10_colorGreen;
-    }
-    else
-    {
-        _94 = _10_colorRed;
-    }
-    return _94;
+    bool4 _94 = _93.xxxx;
+    return float4(_94.x ? _10_colorGreen.x : _10_colorRed.x, _94.y ? _10_colorGreen.y : _10_colorRed.y, _94.z ? _10_colorGreen.z : _10_colorRed.z, _94.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/AbsInt.asm.frag b/tests/sksl/intrinsics/AbsInt.asm.frag
index 4ce1878..d14cd9d 100644
--- a/tests/sksl/intrinsics/AbsInt.asm.frag
+++ b/tests/sksl/intrinsics/AbsInt.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %86 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -79,7 +78,6 @@
 %true = OpConstantTrue %bool
 %103 = OpConstantComposite %v2int %int_1 %int_0
 %110 = OpConstantComposite %v3int %int_1 %int_0 %int_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -92,7 +90,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4int Function
-%118 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %33
 %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %36
@@ -188,19 +185,11 @@
 OpBranch %116
 %116 = OpLabel
 %117 = OpPhi %bool %false %109 %true %115
-OpSelectionMerge %122 None
-OpBranchConditional %117 %120 %121
-%120 = OpLabel
-%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%124 = OpLoad %v4float %123
-OpStore %118 %124
-OpBranch %122
-%121 = OpLabel
-%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%126 = OpLoad %v4float %125
-OpStore %118 %126
-OpBranch %122
-%122 = OpLabel
-%127 = OpLoad %v4float %118
-OpReturnValue %127
+%118 = OpCompositeConstruct %v4bool %117 %117 %117 %117
+%120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%121 = OpLoad %v4float %120
+%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%123 = OpLoad %v4float %122
+%119 = OpSelect %v4float %118 %121 %123
+OpReturnValue %119
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/AbsInt.hlsl b/tests/sksl/intrinsics/AbsInt.hlsl
index 5ec6c91..d762706 100644
--- a/tests/sksl/intrinsics/AbsInt.hlsl
+++ b/tests/sksl/intrinsics/AbsInt.hlsl
@@ -82,16 +82,8 @@
     {
         _117 = false;
     }
-    float4 _118 = 0.0f.xxxx;
-    if (_117)
-    {
-        _118 = _10_colorGreen;
-    }
-    else
-    {
-        _118 = _10_colorRed;
-    }
-    return _118;
+    bool4 _118 = _117.xxxx;
+    return float4(_118.x ? _10_colorGreen.x : _10_colorRed.x, _118.y ? _10_colorGreen.y : _10_colorRed.y, _118.z ? _10_colorGreen.z : _10_colorRed.z, _118.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Acos.asm.frag b/tests/sksl/intrinsics/Acos.asm.frag
index dc3e9ed..3b08c04 100644
--- a/tests/sksl/intrinsics/Acos.asm.frag
+++ b/tests/sksl/intrinsics/Acos.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Acos.hlsl b/tests/sksl/intrinsics/Acos.hlsl
index b6a773a..ef224a5 100644
--- a/tests/sksl/intrinsics/Acos.hlsl
+++ b/tests/sksl/intrinsics/Acos.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Acosh.asm.frag b/tests/sksl/intrinsics/Acosh.asm.frag
index 07887d8..408f81d 100644
--- a/tests/sksl/intrinsics/Acosh.asm.frag
+++ b/tests/sksl/intrinsics/Acosh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %97 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %95 = OpConstantComposite %v3float %float_0 %float_0 %float_1
 %float_2 = OpConstant %float 2
 %105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -99,7 +97,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%111 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -193,19 +190,11 @@
 OpBranch %103
 %103 = OpLabel
 %110 = OpPhi %bool %false %93 %109 %102
-OpSelectionMerge %115 None
-OpBranchConditional %110 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%111 = OpCompositeConstruct %v4bool %110 %110 %110 %110
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%115 = OpLoad %v4float %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %118 = OpLoad %v4float %116
-OpStore %111 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%121 = OpLoad %v4float %119
-OpStore %111 %121
-OpBranch %115
-%115 = OpLabel
-%122 = OpLoad %v4float %111
-OpReturnValue %122
+%112 = OpSelect %v4float %111 %115 %118
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/All.asm.frag b/tests/sksl/intrinsics/All.asm.frag
index 244de7e..14adeae 100644
--- a/tests/sksl/intrinsics/All.asm.frag
+++ b/tests/sksl/intrinsics/All.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %50 RelaxedPrecision
 OpDecorate %52 RelaxedPrecision
 OpDecorate %54 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,7 +62,6 @@
 %false = OpConstantFalse %bool
 %v2bool = OpTypeVector %bool 2
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -78,7 +76,6 @@
 %25 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4bool Function
 %expected = OpVariable %_ptr_Function_v4bool Function
-%90 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %33 = OpLoad %v4float %29
 %34 = OpVectorShuffle %v4float %33 %33 0 0 2 3
@@ -150,19 +147,11 @@
 OpBranch %86
 %86 = OpLabel
 %89 = OpPhi %bool %false %81 %88 %85
-OpSelectionMerge %94 None
-OpBranchConditional %89 %92 %93
-%92 = OpLabel
-%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%97 = OpLoad %v4float %95
-OpStore %90 %97
-OpBranch %94
-%93 = OpLabel
-%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%99 = OpLoad %v4float %98
-OpStore %90 %99
-OpBranch %94
-%94 = OpLabel
-%100 = OpLoad %v4float %90
-OpReturnValue %100
+%90 = OpCompositeConstruct %v4bool %89 %89 %89 %89
+%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%94 = OpLoad %v4float %92
+%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%96 = OpLoad %v4float %95
+%91 = OpSelect %v4float %90 %94 %96
+OpReturnValue %91
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/All.hlsl b/tests/sksl/intrinsics/All.hlsl
index 3e31b26..632e13c 100644
--- a/tests/sksl/intrinsics/All.hlsl
+++ b/tests/sksl/intrinsics/All.hlsl
@@ -64,16 +64,8 @@
     {
         _89 = false;
     }
-    float4 _90 = 0.0f.xxxx;
-    if (_89)
-    {
-        _90 = _10_colorGreen;
-    }
-    else
-    {
-        _90 = _10_colorRed;
-    }
-    return _90;
+    bool4 _90 = _89.xxxx;
+    return float4(_90.x ? _10_colorGreen.x : _10_colorRed.x, _90.y ? _10_colorGreen.y : _10_colorRed.y, _90.z ? _10_colorGreen.z : _10_colorRed.z, _90.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Any.asm.frag b/tests/sksl/intrinsics/Any.asm.frag
index 20f0658..369e47f 100644
--- a/tests/sksl/intrinsics/Any.asm.frag
+++ b/tests/sksl/intrinsics/Any.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %50 RelaxedPrecision
 OpDecorate %52 RelaxedPrecision
 OpDecorate %54 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,7 +62,6 @@
 %false = OpConstantFalse %bool
 %v2bool = OpTypeVector %bool 2
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -78,7 +76,6 @@
 %25 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4bool Function
 %expected = OpVariable %_ptr_Function_v4bool Function
-%89 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpVectorShuffle %v4float %33 %33 0 0 1 2
@@ -149,19 +146,11 @@
 OpBranch %86
 %86 = OpLabel
 %88 = OpPhi %bool %false %82 %87 %85
-OpSelectionMerge %93 None
-OpBranchConditional %88 %91 %92
-%91 = OpLabel
-%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%95 = OpLoad %v4float %94
-OpStore %89 %95
-OpBranch %93
-%92 = OpLabel
-%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%98 = OpLoad %v4float %96
-OpStore %89 %98
-OpBranch %93
-%93 = OpLabel
-%99 = OpLoad %v4float %89
-OpReturnValue %99
+%89 = OpCompositeConstruct %v4bool %88 %88 %88 %88
+%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%92 = OpLoad %v4float %91
+%93 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%95 = OpLoad %v4float %93
+%90 = OpSelect %v4float %89 %92 %95
+OpReturnValue %90
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Any.hlsl b/tests/sksl/intrinsics/Any.hlsl
index 010c78f..687809e 100644
--- a/tests/sksl/intrinsics/Any.hlsl
+++ b/tests/sksl/intrinsics/Any.hlsl
@@ -64,16 +64,8 @@
     {
         _88 = false;
     }
-    float4 _89 = 0.0f.xxxx;
-    if (_88)
-    {
-        _89 = _10_colorGreen;
-    }
-    else
-    {
-        _89 = _10_colorRed;
-    }
-    return _89;
+    bool4 _89 = _88.xxxx;
+    return float4(_89.x ? _10_colorGreen.x : _10_colorRed.x, _89.y ? _10_colorGreen.y : _10_colorRed.y, _89.z ? _10_colorGreen.z : _10_colorRed.z, _89.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Asin.asm.frag b/tests/sksl/intrinsics/Asin.asm.frag
index 11b97dd..bfafea0 100644
--- a/tests/sksl/intrinsics/Asin.asm.frag
+++ b/tests/sksl/intrinsics/Asin.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Asin.hlsl b/tests/sksl/intrinsics/Asin.hlsl
index d2c89f8..5c418cc 100644
--- a/tests/sksl/intrinsics/Asin.hlsl
+++ b/tests/sksl/intrinsics/Asin.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Asinh.asm.frag b/tests/sksl/intrinsics/Asinh.asm.frag
index 9b9f1c1..15d4f0f 100644
--- a/tests/sksl/intrinsics/Asinh.asm.frag
+++ b/tests/sksl/intrinsics/Asinh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %97 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %95 = OpConstantComposite %v3float %float_0 %float_0 %float_1
 %float_n1 = OpConstant %float -1
 %105 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_n1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -99,7 +97,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%111 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -193,19 +190,11 @@
 OpBranch %103
 %103 = OpLabel
 %110 = OpPhi %bool %false %93 %109 %102
-OpSelectionMerge %115 None
-OpBranchConditional %110 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%111 = OpCompositeConstruct %v4bool %110 %110 %110 %110
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%115 = OpLoad %v4float %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %118 = OpLoad %v4float %116
-OpStore %111 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%121 = OpLoad %v4float %119
-OpStore %111 %121
-OpBranch %115
-%115 = OpLabel
-%122 = OpLoad %v4float %111
-OpReturnValue %122
+%112 = OpSelect %v4float %111 %115 %118
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Atan.asm.frag b/tests/sksl/intrinsics/Atan.asm.frag
index f4db366..f7e257b 100644
--- a/tests/sksl/intrinsics/Atan.asm.frag
+++ b/tests/sksl/intrinsics/Atan.asm.frag
@@ -69,9 +69,8 @@
 OpDecorate %176 RelaxedPrecision
 OpDecorate %177 RelaxedPrecision
 OpDecorate %184 RelaxedPrecision
+OpDecorate %192 RelaxedPrecision
 OpDecorate %195 RelaxedPrecision
-OpDecorate %198 RelaxedPrecision
-OpDecorate %199 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -104,7 +103,6 @@
 %127 = OpConstantComposite %v2float %float_1 %float_1
 %140 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %152 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -118,7 +116,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%188 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -311,19 +308,11 @@
 OpBranch %182
 %182 = OpLabel
 %187 = OpPhi %bool %false %174 %186 %181
-OpSelectionMerge %192 None
-OpBranchConditional %187 %190 %191
-%190 = OpLabel
-%193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%188 = OpCompositeConstruct %v4bool %187 %187 %187 %187
+%190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%192 = OpLoad %v4float %190
+%193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %195 = OpLoad %v4float %193
-OpStore %188 %195
-OpBranch %192
-%191 = OpLabel
-%196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%198 = OpLoad %v4float %196
-OpStore %188 %198
-OpBranch %192
-%192 = OpLabel
-%199 = OpLoad %v4float %188
-OpReturnValue %199
+%189 = OpSelect %v4float %188 %192 %195
+OpReturnValue %189
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Atan.hlsl b/tests/sksl/intrinsics/Atan.hlsl
index 380448c..14f236f 100644
--- a/tests/sksl/intrinsics/Atan.hlsl
+++ b/tests/sksl/intrinsics/Atan.hlsl
@@ -157,16 +157,8 @@
     {
         _187 = false;
     }
-    float4 _188 = 0.0f.xxxx;
-    if (_187)
-    {
-        _188 = _10_colorGreen;
-    }
-    else
-    {
-        _188 = _10_colorRed;
-    }
-    return _188;
+    bool4 _188 = _187.xxxx;
+    return float4(_188.x ? _10_colorGreen.x : _10_colorRed.x, _188.y ? _10_colorGreen.y : _10_colorRed.y, _188.z ? _10_colorGreen.z : _10_colorRed.z, _188.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Atanh.asm.frag b/tests/sksl/intrinsics/Atanh.asm.frag
index f4dcbe1..8f19120 100644
--- a/tests/sksl/intrinsics/Atanh.asm.frag
+++ b/tests/sksl/intrinsics/Atanh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %99 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
 OpDecorate %109 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
 OpDecorate %120 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -87,7 +86,6 @@
 %97 = OpConstantComposite %v3float %float_0 %float_0_25 %float_0_5
 %float_1 = OpConstant %float 1
 %107 = OpConstantComposite %v4float %float_0 %float_0_25 %float_0_5 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -101,7 +99,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%113 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -195,19 +192,11 @@
 OpBranch %105
 %105 = OpLabel
 %112 = OpPhi %bool %false %95 %111 %104
-OpSelectionMerge %117 None
-OpBranchConditional %112 %115 %116
-%115 = OpLabel
-%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpCompositeConstruct %v4bool %112 %112 %112 %112
+%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%117 = OpLoad %v4float %115
+%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %120 = OpLoad %v4float %118
-OpStore %113 %120
-OpBranch %117
-%116 = OpLabel
-%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%123 = OpLoad %v4float %121
-OpStore %113 %123
-OpBranch %117
-%117 = OpLabel
-%124 = OpLoad %v4float %113
-OpReturnValue %124
+%114 = OpSelect %v4float %113 %117 %120
+OpReturnValue %114
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Ceil.asm.frag b/tests/sksl/intrinsics/Ceil.asm.frag
index 95ad03e..bcf4934 100644
--- a/tests/sksl/intrinsics/Ceil.asm.frag
+++ b/tests/sksl/intrinsics/Ceil.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %68 RelaxedPrecision
 OpDecorate %80 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -91,7 +90,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%94 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %31
 %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %34
@@ -165,19 +163,11 @@
 OpBranch %92
 %92 = OpLabel
 %93 = OpPhi %bool %false %85 %true %91
-OpSelectionMerge %97 None
-OpBranchConditional %93 %95 %96
-%95 = OpLabel
-%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%100 = OpLoad %v4float %98
-OpStore %94 %100
-OpBranch %97
-%96 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%103 = OpLoad %v4float %101
-OpStore %94 %103
-OpBranch %97
-%97 = OpLabel
-%104 = OpLoad %v4float %94
-OpReturnValue %104
+%94 = OpCompositeConstruct %v4bool %93 %93 %93 %93
+%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%98 = OpLoad %v4float %96
+%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%101 = OpLoad %v4float %99
+%95 = OpSelect %v4float %94 %98 %101
+OpReturnValue %95
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Ceil.hlsl b/tests/sksl/intrinsics/Ceil.hlsl
index 2a6f3ce..0aedc66 100644
--- a/tests/sksl/intrinsics/Ceil.hlsl
+++ b/tests/sksl/intrinsics/Ceil.hlsl
@@ -82,16 +82,8 @@
     {
         _93 = false;
     }
-    float4 _94 = 0.0f.xxxx;
-    if (_93)
-    {
-        _94 = _10_colorGreen;
-    }
-    else
-    {
-        _94 = _10_colorRed;
-    }
-    return _94;
+    bool4 _94 = _93.xxxx;
+    return float4(_94.x ? _10_colorGreen.x : _10_colorRed.x, _94.y ? _10_colorGreen.y : _10_colorRed.y, _94.z ? _10_colorGreen.z : _10_colorRed.z, _94.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/ClampFloat.asm.frag b/tests/sksl/intrinsics/ClampFloat.asm.frag
index f894cc0..02be424 100644
--- a/tests/sksl/intrinsics/ClampFloat.asm.frag
+++ b/tests/sksl/intrinsics/ClampFloat.asm.frag
@@ -50,9 +50,8 @@
 OpDecorate %142 RelaxedPrecision
 OpDecorate %154 RelaxedPrecision
 OpDecorate %161 RelaxedPrecision
-OpDecorate %174 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
-OpDecorate %178 RelaxedPrecision
+OpDecorate %172 RelaxedPrecision
+OpDecorate %175 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -120,7 +119,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%168 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %31
 OpStore %expectedB %35
 %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -273,19 +271,11 @@
 OpBranch %166
 %166 = OpLabel
 %167 = OpPhi %bool %false %159 %true %165
-OpSelectionMerge %171 None
-OpBranchConditional %167 %169 %170
-%169 = OpLabel
-%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%174 = OpLoad %v4float %172
-OpStore %168 %174
-OpBranch %171
-%170 = OpLabel
-%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%177 = OpLoad %v4float %175
-OpStore %168 %177
-OpBranch %171
-%171 = OpLabel
-%178 = OpLoad %v4float %168
-OpReturnValue %178
+%168 = OpCompositeConstruct %v4bool %167 %167 %167 %167
+%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%172 = OpLoad %v4float %170
+%173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%175 = OpLoad %v4float %173
+%169 = OpSelect %v4float %168 %172 %175
+OpReturnValue %169
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/ClampFloat.hlsl b/tests/sksl/intrinsics/ClampFloat.hlsl
index 356b721..b0aea42 100644
--- a/tests/sksl/intrinsics/ClampFloat.hlsl
+++ b/tests/sksl/intrinsics/ClampFloat.hlsl
@@ -158,16 +158,8 @@
     {
         _167 = false;
     }
-    float4 _168 = 0.0f.xxxx;
-    if (_167)
-    {
-        _168 = _10_colorGreen;
-    }
-    else
-    {
-        _168 = _10_colorRed;
-    }
-    return _168;
+    bool4 _168 = _167.xxxx;
+    return float4(_168.x ? _10_colorGreen.x : _10_colorRed.x, _168.y ? _10_colorGreen.y : _10_colorRed.y, _168.z ? _10_colorGreen.z : _10_colorRed.z, _168.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/ClampInt.asm.frag b/tests/sksl/intrinsics/ClampInt.asm.frag
index 239fed7..15e8a40 100644
--- a/tests/sksl/intrinsics/ClampInt.asm.frag
+++ b/tests/sksl/intrinsics/ClampInt.asm.frag
@@ -33,9 +33,8 @@
 OpDecorate %38 RelaxedPrecision
 OpDecorate %40 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
 OpDecorate %174 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
-OpDecorate %178 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -91,7 +90,6 @@
 %int_300 = OpConstant %int 300
 %144 = OpConstantComposite %v4int %int_100 %int_200 %int_50 %int_300
 %159 = OpConstantComposite %v3int %int_n100 %int_0 %int_50
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -108,7 +106,6 @@
 %intValues = OpVariable %_ptr_Function_v4int Function
 %expectedA = OpVariable %_ptr_Function_v4int Function
 %expectedB = OpVariable %_ptr_Function_v4int Function
-%167 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %30
 %35 = OpVectorTimesScalar %v4float %33 %float_100
@@ -257,19 +254,11 @@
 OpBranch %165
 %165 = OpLabel
 %166 = OpPhi %bool %false %158 %true %164
-OpSelectionMerge %171 None
-OpBranchConditional %166 %169 %170
-%169 = OpLabel
-%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%167 = OpCompositeConstruct %v4bool %166 %166 %166 %166
+%169 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%171 = OpLoad %v4float %169
+%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %174 = OpLoad %v4float %172
-OpStore %167 %174
-OpBranch %171
-%170 = OpLabel
-%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%177 = OpLoad %v4float %175
-OpStore %167 %177
-OpBranch %171
-%171 = OpLabel
-%178 = OpLoad %v4float %167
-OpReturnValue %178
+%168 = OpSelect %v4float %167 %171 %174
+OpReturnValue %168
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/ClampInt.hlsl b/tests/sksl/intrinsics/ClampInt.hlsl
index a771d42..c80ad94 100644
--- a/tests/sksl/intrinsics/ClampInt.hlsl
+++ b/tests/sksl/intrinsics/ClampInt.hlsl
@@ -162,16 +162,8 @@
     {
         _166 = false;
     }
-    float4 _167 = 0.0f.xxxx;
-    if (_166)
-    {
-        _167 = _10_colorGreen;
-    }
-    else
-    {
-        _167 = _10_colorRed;
-    }
-    return _167;
+    bool4 _167 = _166.xxxx;
+    return float4(_167.x ? _10_colorGreen.x : _10_colorRed.x, _167.y ? _10_colorGreen.y : _10_colorRed.y, _167.z ? _10_colorGreen.z : _10_colorRed.z, _167.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/ClampUInt.asm.frag b/tests/sksl/intrinsics/ClampUInt.asm.frag
index f7d61f2..36892b8 100644
--- a/tests/sksl/intrinsics/ClampUInt.asm.frag
+++ b/tests/sksl/intrinsics/ClampUInt.asm.frag
@@ -34,9 +34,8 @@
 OpDecorate %42 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
 OpDecorate %46 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
 OpDecorate %179 RelaxedPrecision
-OpDecorate %182 RelaxedPrecision
-OpDecorate %183 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -96,7 +95,6 @@
 %uint_500 = OpConstant %uint 500
 %149 = OpConstantComposite %v4uint %uint_300 %uint_400 %uint_250 %uint_500
 %164 = OpConstantComposite %v3uint %uint_100 %uint_200 %uint_250
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -113,7 +111,6 @@
 %uintValues = OpVariable %_ptr_Function_v4uint Function
 %expectedA = OpVariable %_ptr_Function_v4uint Function
 %expectedB = OpVariable %_ptr_Function_v4uint Function
-%172 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %34 = OpLoad %v4float %30
 %36 = OpVectorTimesScalar %v4float %34 %float_100
@@ -263,19 +260,11 @@
 OpBranch %170
 %170 = OpLabel
 %171 = OpPhi %bool %false %163 %true %169
-OpSelectionMerge %176 None
-OpBranchConditional %171 %174 %175
-%174 = OpLabel
-%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%172 = OpCompositeConstruct %v4bool %171 %171 %171 %171
+%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%176 = OpLoad %v4float %174
+%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %179 = OpLoad %v4float %177
-OpStore %172 %179
-OpBranch %176
-%175 = OpLabel
-%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%182 = OpLoad %v4float %180
-OpStore %172 %182
-OpBranch %176
-%176 = OpLabel
-%183 = OpLoad %v4float %172
-OpReturnValue %183
+%173 = OpSelect %v4float %172 %176 %179
+OpReturnValue %173
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/ClampUInt.hlsl b/tests/sksl/intrinsics/ClampUInt.hlsl
index 5cdf90b..73b9e81 100644
--- a/tests/sksl/intrinsics/ClampUInt.hlsl
+++ b/tests/sksl/intrinsics/ClampUInt.hlsl
@@ -162,16 +162,8 @@
     {
         _171 = false;
     }
-    float4 _172 = 0.0f.xxxx;
-    if (_171)
-    {
-        _172 = _10_colorGreen;
-    }
-    else
-    {
-        _172 = _10_colorRed;
-    }
-    return _172;
+    bool4 _172 = _171.xxxx;
+    return float4(_172.x ? _10_colorGreen.x : _10_colorRed.x, _172.y ? _10_colorGreen.y : _10_colorRed.y, _172.z ? _10_colorGreen.z : _10_colorRed.z, _172.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Cos.asm.frag b/tests/sksl/intrinsics/Cos.asm.frag
index ce47536..58403b9 100644
--- a/tests/sksl/intrinsics/Cos.asm.frag
+++ b/tests/sksl/intrinsics/Cos.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %98 RelaxedPrecision
 OpDecorate %99 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %87 = OpConstantComposite %v2float %float_1 %float_1
 %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -99,7 +97,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%111 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -193,19 +190,11 @@
 OpBranch %104
 %104 = OpLabel
 %110 = OpPhi %bool %false %95 %109 %103
-OpSelectionMerge %115 None
-OpBranchConditional %110 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%111 = OpCompositeConstruct %v4bool %110 %110 %110 %110
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%115 = OpLoad %v4float %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %118 = OpLoad %v4float %116
-OpStore %111 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%121 = OpLoad %v4float %119
-OpStore %111 %121
-OpBranch %115
-%115 = OpLabel
-%122 = OpLoad %v4float %111
-OpReturnValue %122
+%112 = OpSelect %v4float %111 %115 %118
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Cos.hlsl b/tests/sksl/intrinsics/Cos.hlsl
index dd74512..fa263c8 100644
--- a/tests/sksl/intrinsics/Cos.hlsl
+++ b/tests/sksl/intrinsics/Cos.hlsl
@@ -82,16 +82,8 @@
     {
         _110 = false;
     }
-    float4 _111 = 0.0f.xxxx;
-    if (_110)
-    {
-        _111 = _10_colorGreen;
-    }
-    else
-    {
-        _111 = _10_colorRed;
-    }
-    return _111;
+    bool4 _111 = _110.xxxx;
+    return float4(_111.x ? _10_colorGreen.x : _10_colorRed.x, _111.y ? _10_colorGreen.y : _10_colorRed.y, _111.z ? _10_colorGreen.z : _10_colorRed.z, _111.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Cosh.asm.frag b/tests/sksl/intrinsics/Cosh.asm.frag
index 579f500..17bdd63 100644
--- a/tests/sksl/intrinsics/Cosh.asm.frag
+++ b/tests/sksl/intrinsics/Cosh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %98 RelaxedPrecision
 OpDecorate %99 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %87 = OpConstantComposite %v2float %float_1 %float_1
 %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -99,7 +97,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%111 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -193,19 +190,11 @@
 OpBranch %104
 %104 = OpLabel
 %110 = OpPhi %bool %false %95 %109 %103
-OpSelectionMerge %115 None
-OpBranchConditional %110 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%111 = OpCompositeConstruct %v4bool %110 %110 %110 %110
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%115 = OpLoad %v4float %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %118 = OpLoad %v4float %116
-OpStore %111 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%121 = OpLoad %v4float %119
-OpStore %111 %121
-OpBranch %115
-%115 = OpLabel
-%122 = OpLoad %v4float %111
-OpReturnValue %122
+%112 = OpSelect %v4float %111 %115 %118
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Cosh.hlsl b/tests/sksl/intrinsics/Cosh.hlsl
index 69c9582..92aa8f3 100644
--- a/tests/sksl/intrinsics/Cosh.hlsl
+++ b/tests/sksl/intrinsics/Cosh.hlsl
@@ -82,16 +82,8 @@
     {
         _110 = false;
     }
-    float4 _111 = 0.0f.xxxx;
-    if (_110)
-    {
-        _111 = _10_colorGreen;
-    }
-    else
-    {
-        _111 = _10_colorRed;
-    }
-    return _111;
+    bool4 _111 = _110.xxxx;
+    return float4(_111.x ? _10_colorGreen.x : _10_colorRed.x, _111.y ? _10_colorGreen.y : _10_colorRed.y, _111.z ? _10_colorGreen.z : _10_colorRed.z, _111.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Cross.asm.frag b/tests/sksl/intrinsics/Cross.asm.frag
index bf6b24a..fedfe25 100644
--- a/tests/sksl/intrinsics/Cross.asm.frag
+++ b/tests/sksl/intrinsics/Cross.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %67 RelaxedPrecision
 OpDecorate %69 RelaxedPrecision
-OpDecorate %71 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -60,7 +59,7 @@
 %int_2 = OpConstant %int 2
 %float_n12 = OpConstant %float -12
 %58 = OpConstantComposite %v3float %float_6 %float_n12 %float_6
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
@@ -73,7 +72,6 @@
 %main = OpFunction %v4float None %25
 %26 = OpFunctionParameter %_ptr_Function_v2float
 %27 = OpLabel
-%62 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_0
 %34 = OpAccessChain %_ptr_Uniform_v3float %30 %int_0
 %36 = OpLoad %v3float %34
@@ -98,19 +96,11 @@
 OpBranch %48
 %48 = OpLabel
 %61 = OpPhi %bool %false %27 %60 %47
-OpSelectionMerge %66 None
-OpBranchConditional %61 %64 %65
-%64 = OpLabel
-%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%69 = OpLoad %v4float %67
-OpStore %62 %69
-OpBranch %66
-%65 = OpLabel
-%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%71 = OpLoad %v4float %70
-OpStore %62 %71
-OpBranch %66
-%66 = OpLabel
-%72 = OpLoad %v4float %62
-OpReturnValue %72
+%63 = OpCompositeConstruct %v4bool %61 %61 %61 %61
+%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%67 = OpLoad %v4float %65
+%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%69 = OpLoad %v4float %68
+%64 = OpSelect %v4float %63 %67 %69
+OpReturnValue %64
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Cross.hlsl b/tests/sksl/intrinsics/Cross.hlsl
index 56b2e23..58e7bc5 100644
--- a/tests/sksl/intrinsics/Cross.hlsl
+++ b/tests/sksl/intrinsics/Cross.hlsl
@@ -26,16 +26,8 @@
     {
         _61 = false;
     }
-    float4 _62 = 0.0f.xxxx;
-    if (_61)
-    {
-        _62 = _10_colorGreen;
-    }
-    else
-    {
-        _62 = _10_colorRed;
-    }
-    return _62;
+    bool4 _63 = _61.xxxx;
+    return float4(_63.x ? _10_colorGreen.x : _10_colorRed.x, _63.y ? _10_colorGreen.y : _10_colorRed.y, _63.z ? _10_colorGreen.z : _10_colorRed.z, _63.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/DFdx.asm.frag b/tests/sksl/intrinsics/DFdx.asm.frag
index eb5bdb7..c45d2af 100644
--- a/tests/sksl/intrinsics/DFdx.asm.frag
+++ b/tests/sksl/intrinsics/DFdx.asm.frag
@@ -39,9 +39,8 @@
 OpDecorate %56 RelaxedPrecision
 OpDecorate %63 RelaxedPrecision
 OpDecorate %65 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,7 +85,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%99 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %28
 %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %35 = OpLoad %v4float %31
@@ -165,19 +163,11 @@
 OpBranch %91
 %91 = OpLabel
 %98 = OpPhi %bool %false %82 %97 %90
-OpSelectionMerge %102 None
-OpBranchConditional %98 %100 %101
-%100 = OpLabel
-%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%105 = OpLoad %v4float %103
-OpStore %99 %105
-OpBranch %102
-%101 = OpLabel
-%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%108 = OpLoad %v4float %106
-OpStore %99 %108
-OpBranch %102
-%102 = OpLabel
-%109 = OpLoad %v4float %99
-OpReturnValue %109
+%99 = OpCompositeConstruct %v4bool %98 %98 %98 %98
+%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%103 = OpLoad %v4float %101
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%106 = OpLoad %v4float %104
+%100 = OpSelect %v4float %99 %103 %106
+OpReturnValue %100
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/DFdx.hlsl b/tests/sksl/intrinsics/DFdx.hlsl
index 3e6169b..311656b 100644
--- a/tests/sksl/intrinsics/DFdx.hlsl
+++ b/tests/sksl/intrinsics/DFdx.hlsl
@@ -76,16 +76,8 @@
     {
         _98 = false;
     }
-    float4 _99 = 0.0f.xxxx;
-    if (_98)
-    {
-        _99 = _10_colorGreen;
-    }
-    else
-    {
-        _99 = _10_colorRed;
-    }
-    return _99;
+    bool4 _99 = _98.xxxx;
+    return float4(_99.x ? _10_colorGreen.x : _10_colorRed.x, _99.y ? _10_colorGreen.y : _10_colorRed.y, _99.z ? _10_colorGreen.z : _10_colorRed.z, _99.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/DFdy.asm.frag b/tests/sksl/intrinsics/DFdy.asm.frag
index 94feb71..59137b7 100644
--- a/tests/sksl/intrinsics/DFdy.asm.frag
+++ b/tests/sksl/intrinsics/DFdy.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %71 RelaxedPrecision
 OpDecorate %80 RelaxedPrecision
 OpDecorate %84 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
-OpDecorate %140 RelaxedPrecision
+OpDecorate %134 RelaxedPrecision
+OpDecorate %137 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%130 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %29
 %32 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %36 = OpLoad %v4float %32
@@ -197,19 +195,11 @@
 OpBranch %118
 %118 = OpLabel
 %129 = OpPhi %bool %false %103 %128 %117
-OpSelectionMerge %133 None
-OpBranchConditional %129 %131 %132
-%131 = OpLabel
-%134 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%136 = OpLoad %v4float %134
-OpStore %130 %136
-OpBranch %133
-%132 = OpLabel
-%137 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2
-%139 = OpLoad %v4float %137
-OpStore %130 %139
-OpBranch %133
-%133 = OpLabel
-%140 = OpLoad %v4float %130
-OpReturnValue %140
+%130 = OpCompositeConstruct %v4bool %129 %129 %129 %129
+%132 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%134 = OpLoad %v4float %132
+%135 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2
+%137 = OpLoad %v4float %135
+%131 = OpSelect %v4float %130 %134 %137
+OpReturnValue %131
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/DFdy.hlsl b/tests/sksl/intrinsics/DFdy.hlsl
index ac3ad73..0757a1e 100644
--- a/tests/sksl/intrinsics/DFdy.hlsl
+++ b/tests/sksl/intrinsics/DFdy.hlsl
@@ -77,16 +77,8 @@
     {
         _129 = false;
     }
-    float4 _130 = 0.0f.xxxx;
-    if (_129)
-    {
-        _130 = _11_colorGreen;
-    }
-    else
-    {
-        _130 = _11_colorRed;
-    }
-    return _130;
+    bool4 _130 = _129.xxxx;
+    return float4(_130.x ? _11_colorGreen.x : _11_colorRed.x, _130.y ? _11_colorGreen.y : _11_colorRed.y, _130.z ? _11_colorGreen.z : _11_colorRed.z, _130.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag b/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag
index 642d577..b4d3ee3 100644
--- a/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag
+++ b/tests/sksl/intrinsics/DFdyNoRTFlip.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %65 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -82,7 +81,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%99 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %28
 %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %35 = OpLoad %v4float %31
@@ -161,19 +159,11 @@
 OpBranch %91
 %91 = OpLabel
 %98 = OpPhi %bool %false %80 %97 %90
-OpSelectionMerge %102 None
-OpBranchConditional %98 %100 %101
-%100 = OpLabel
-%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%105 = OpLoad %v4float %103
-OpStore %99 %105
-OpBranch %102
-%101 = OpLabel
-%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%108 = OpLoad %v4float %106
-OpStore %99 %108
-OpBranch %102
-%102 = OpLabel
-%109 = OpLoad %v4float %99
-OpReturnValue %109
+%99 = OpCompositeConstruct %v4bool %98 %98 %98 %98
+%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%103 = OpLoad %v4float %101
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%106 = OpLoad %v4float %104
+%100 = OpSelect %v4float %99 %103 %106
+OpReturnValue %100
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/DFdyNoRTFlip.hlsl b/tests/sksl/intrinsics/DFdyNoRTFlip.hlsl
index 05ad24b..5a4ff2b 100644
--- a/tests/sksl/intrinsics/DFdyNoRTFlip.hlsl
+++ b/tests/sksl/intrinsics/DFdyNoRTFlip.hlsl
@@ -76,16 +76,8 @@
     {
         _98 = false;
     }
-    float4 _99 = 0.0f.xxxx;
-    if (_98)
-    {
-        _99 = _10_colorGreen;
-    }
-    else
-    {
-        _99 = _10_colorRed;
-    }
-    return _99;
+    bool4 _99 = _98.xxxx;
+    return float4(_99.x ? _10_colorGreen.x : _10_colorRed.x, _99.y ? _10_colorGreen.y : _10_colorRed.y, _99.z ? _10_colorGreen.z : _10_colorRed.z, _99.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Degrees.asm.frag b/tests/sksl/intrinsics/Degrees.asm.frag
index cf33295..50bfce2 100644
--- a/tests/sksl/intrinsics/Degrees.asm.frag
+++ b/tests/sksl/intrinsics/Degrees.asm.frag
@@ -23,9 +23,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %87 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -61,7 +60,6 @@
 %78 = OpConstantComposite %v4float %float_n71_6197281 %float_0 %float_42_9718361 %float_128_915512
 %80 = OpConstantComposite %v4float %float_0_0500000007 %float_0_0500000007 %float_0_0500000007 %float_0_0500000007
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -75,7 +73,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%83 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpCompositeExtract %float %33 0
@@ -124,19 +121,11 @@
 OpBranch %70
 %70 = OpLabel
 %82 = OpPhi %bool %false %54 %71 %69
-OpSelectionMerge %87 None
-OpBranchConditional %82 %85 %86
-%85 = OpLabel
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%83 = OpCompositeConstruct %v4bool %82 %82 %82 %82
+%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%87 = OpLoad %v4float %85
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %90 = OpLoad %v4float %88
-OpStore %83 %90
-OpBranch %87
-%86 = OpLabel
-%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %91
-OpStore %83 %93
-OpBranch %87
-%87 = OpLabel
-%94 = OpLoad %v4float %83
-OpReturnValue %94
+%84 = OpSelect %v4float %83 %87 %90
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Degrees.hlsl b/tests/sksl/intrinsics/Degrees.hlsl
index c38d1a1..0b25d8f 100644
--- a/tests/sksl/intrinsics/Degrees.hlsl
+++ b/tests/sksl/intrinsics/Degrees.hlsl
@@ -45,16 +45,8 @@
     {
         _82 = false;
     }
-    float4 _83 = 0.0f.xxxx;
-    if (_82)
-    {
-        _83 = _10_colorGreen;
-    }
-    else
-    {
-        _83 = _10_colorRed;
-    }
-    return _83;
+    bool4 _83 = _82.xxxx;
+    return float4(_83.x ? _10_colorGreen.x : _10_colorRed.x, _83.y ? _10_colorGreen.y : _10_colorRed.y, _83.z ? _10_colorGreen.z : _10_colorRed.z, _83.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Determinant.asm.frag b/tests/sksl/intrinsics/Determinant.asm.frag
index 6850a5e..2fd0880 100644
--- a/tests/sksl/intrinsics/Determinant.asm.frag
+++ b/tests/sksl/intrinsics/Determinant.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %43 RelaxedPrecision
-OpDecorate %46 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -50,7 +49,7 @@
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %float_n2 = OpConstant %float -2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
@@ -65,24 +64,15 @@
 %main = OpFunction %v4float None %24
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
-%35 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %32 = OpLoad %mat2v2float %28
 %27 = OpExtInst %float %1 Determinant %32
 %34 = OpFOrdEqual %bool %27 %float_n2
-OpSelectionMerge %39 None
-OpBranchConditional %34 %37 %38
-%37 = OpLabel
-%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%43 = OpLoad %v4float %40
-OpStore %35 %43
-OpBranch %39
-%38 = OpLabel
-%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%46 = OpLoad %v4float %44
-OpStore %35 %46
-OpBranch %39
-%39 = OpLabel
-%47 = OpLoad %v4float %35
-OpReturnValue %47
+%36 = OpCompositeConstruct %v4bool %34 %34 %34 %34
+%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%41 = OpLoad %v4float %38
+%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%44 = OpLoad %v4float %42
+%37 = OpSelect %v4float %36 %41 %44
+OpReturnValue %37
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Determinant.hlsl b/tests/sksl/intrinsics/Determinant.hlsl
index 2f7be95..01afb89 100644
--- a/tests/sksl/intrinsics/Determinant.hlsl
+++ b/tests/sksl/intrinsics/Determinant.hlsl
@@ -15,16 +15,8 @@
 
 float4 main(float2 _25)
 {
-    float4 _35 = 0.0f.xxxx;
-    if (determinant(_10_testMatrix2x2) == (-2.0f))
-    {
-        _35 = _10_colorGreen;
-    }
-    else
-    {
-        _35 = _10_colorRed;
-    }
-    return _35;
+    bool4 _36 = (determinant(_10_testMatrix2x2) == (-2.0f)).xxxx;
+    return float4(_36.x ? _10_colorGreen.x : _10_colorRed.x, _36.y ? _10_colorGreen.y : _10_colorRed.y, _36.z ? _10_colorGreen.z : _10_colorRed.z, _36.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Distance.asm.frag b/tests/sksl/intrinsics/Distance.asm.frag
index aff1dcf..e1f9442 100644
--- a/tests/sksl/intrinsics/Distance.asm.frag
+++ b/tests/sksl/intrinsics/Distance.asm.frag
@@ -47,9 +47,8 @@
 OpDecorate %70 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
 OpDecorate %74 RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -79,6 +78,7 @@
 %int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
 %true = OpConstantTrue %bool
+%v4bool = OpTypeVector %bool 4
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -93,7 +93,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%90 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %31
 %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %34
@@ -167,19 +166,11 @@
 OpBranch %88
 %88 = OpLabel
 %89 = OpPhi %bool %false %85 %true %87
-OpSelectionMerge %93 None
-OpBranchConditional %89 %91 %92
-%91 = OpLabel
-%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%96 = OpLoad %v4float %94
-OpStore %90 %96
-OpBranch %93
-%92 = OpLabel
-%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%99 = OpLoad %v4float %97
-OpStore %90 %99
-OpBranch %93
-%93 = OpLabel
-%100 = OpLoad %v4float %90
-OpReturnValue %100
+%91 = OpCompositeConstruct %v4bool %89 %89 %89 %89
+%93 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%95 = OpLoad %v4float %93
+%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%98 = OpLoad %v4float %96
+%92 = OpSelect %v4float %91 %95 %98
+OpReturnValue %92
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Distance.hlsl b/tests/sksl/intrinsics/Distance.hlsl
index e1af17e..8816930 100644
--- a/tests/sksl/intrinsics/Distance.hlsl
+++ b/tests/sksl/intrinsics/Distance.hlsl
@@ -80,16 +80,8 @@
     {
         _89 = false;
     }
-    float4 _90 = 0.0f.xxxx;
-    if (_89)
-    {
-        _90 = _10_colorGreen;
-    }
-    else
-    {
-        _90 = _10_colorRed;
-    }
-    return _90;
+    bool4 _91 = _89.xxxx;
+    return float4(_91.x ? _10_colorGreen.x : _10_colorRed.x, _91.y ? _10_colorGreen.y : _10_colorRed.y, _91.z ? _10_colorGreen.z : _10_colorRed.z, _91.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Dot.asm.frag b/tests/sksl/intrinsics/Dot.asm.frag
index 12db6ff..3305268 100644
--- a/tests/sksl/intrinsics/Dot.asm.frag
+++ b/tests/sksl/intrinsics/Dot.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,6 +62,7 @@
 %false = OpConstantFalse %bool
 %v3float = OpTypeVector %float 3
 %true = OpConstantTrue %bool
+%v4bool = OpTypeVector %bool 4
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %16
 %17 = OpLabel
@@ -78,7 +78,6 @@
 %inputA = OpVariable %_ptr_Function_v4float Function
 %inputB = OpVariable %_ptr_Function_v4float Function
 %expected = OpVariable %_ptr_Function_v4float Function
-%85 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat4v4float %10 %int_0
 %33 = OpAccessChain %_ptr_Uniform_v4float %29 %int_0
 %35 = OpLoad %v4float %33
@@ -144,19 +143,11 @@
 OpBranch %83
 %83 = OpLabel
 %84 = OpPhi %bool %false %80 %true %82
-OpSelectionMerge %88 None
-OpBranchConditional %84 %86 %87
-%86 = OpLabel
-%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%90 = OpLoad %v4float %89
-OpStore %85 %90
-OpBranch %88
-%87 = OpLabel
-%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %91
-OpStore %85 %93
-OpBranch %88
-%88 = OpLabel
-%94 = OpLoad %v4float %85
-OpReturnValue %94
+%86 = OpCompositeConstruct %v4bool %84 %84 %84 %84
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%89 = OpLoad %v4float %88
+%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%92 = OpLoad %v4float %90
+%87 = OpSelect %v4float %86 %89 %92
+OpReturnValue %87
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Dot.hlsl b/tests/sksl/intrinsics/Dot.hlsl
index ee93d27..7932a2f 100644
--- a/tests/sksl/intrinsics/Dot.hlsl
+++ b/tests/sksl/intrinsics/Dot.hlsl
@@ -81,16 +81,8 @@
     {
         _84 = false;
     }
-    float4 _85 = 0.0f.xxxx;
-    if (_84)
-    {
-        _85 = _10_colorGreen;
-    }
-    else
-    {
-        _85 = _10_colorRed;
-    }
-    return _85;
+    bool4 _86 = _84.xxxx;
+    return float4(_86.x ? _10_colorGreen.x : _10_colorRed.x, _86.y ? _10_colorGreen.y : _10_colorRed.y, _86.z ? _10_colorGreen.z : _10_colorRed.z, _86.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Exp.asm.frag b/tests/sksl/intrinsics/Exp.asm.frag
index 0913dbc..43a63e7 100644
--- a/tests/sksl/intrinsics/Exp.asm.frag
+++ b/tests/sksl/intrinsics/Exp.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %98 RelaxedPrecision
 OpDecorate %99 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %87 = OpConstantComposite %v2float %float_1 %float_1
 %96 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %105 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -99,7 +97,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%111 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -193,19 +190,11 @@
 OpBranch %104
 %104 = OpLabel
 %110 = OpPhi %bool %false %95 %109 %103
-OpSelectionMerge %115 None
-OpBranchConditional %110 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%111 = OpCompositeConstruct %v4bool %110 %110 %110 %110
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%115 = OpLoad %v4float %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %118 = OpLoad %v4float %116
-OpStore %111 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%121 = OpLoad %v4float %119
-OpStore %111 %121
-OpBranch %115
-%115 = OpLabel
-%122 = OpLoad %v4float %111
-OpReturnValue %122
+%112 = OpSelect %v4float %111 %115 %118
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Exp.hlsl b/tests/sksl/intrinsics/Exp.hlsl
index b6deea2..c1c8119 100644
--- a/tests/sksl/intrinsics/Exp.hlsl
+++ b/tests/sksl/intrinsics/Exp.hlsl
@@ -82,16 +82,8 @@
     {
         _110 = false;
     }
-    float4 _111 = 0.0f.xxxx;
-    if (_110)
-    {
-        _111 = _10_colorGreen;
-    }
-    else
-    {
-        _111 = _10_colorRed;
-    }
-    return _111;
+    bool4 _111 = _110.xxxx;
+    return float4(_111.x ? _10_colorGreen.x : _10_colorRed.x, _111.y ? _10_colorGreen.y : _10_colorRed.y, _111.z ? _10_colorGreen.z : _10_colorRed.z, _111.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Exp2.asm.frag b/tests/sksl/intrinsics/Exp2.asm.frag
index 02568ab..b85bff2 100644
--- a/tests/sksl/intrinsics/Exp2.asm.frag
+++ b/tests/sksl/intrinsics/Exp2.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %100 RelaxedPrecision
 OpDecorate %101 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -88,7 +87,6 @@
 %98 = OpConstantComposite %v3float %float_1 %float_2 %float_4
 %float_8 = OpConstant %float 8
 %108 = OpConstantComposite %v4float %float_1 %float_2 %float_4 %float_8
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -102,7 +100,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%114 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -196,19 +193,11 @@
 OpBranch %106
 %106 = OpLabel
 %113 = OpPhi %bool %false %96 %112 %105
-OpSelectionMerge %118 None
-OpBranchConditional %113 %116 %117
-%116 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%114 = OpCompositeConstruct %v4bool %113 %113 %113 %113
+%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%118 = OpLoad %v4float %116
+%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %121 = OpLoad %v4float %119
-OpStore %114 %121
-OpBranch %118
-%117 = OpLabel
-%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%124 = OpLoad %v4float %122
-OpStore %114 %124
-OpBranch %118
-%118 = OpLabel
-%125 = OpLoad %v4float %114
-OpReturnValue %125
+%115 = OpSelect %v4float %114 %118 %121
+OpReturnValue %115
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Exp2.hlsl b/tests/sksl/intrinsics/Exp2.hlsl
index f577435..38be93f 100644
--- a/tests/sksl/intrinsics/Exp2.hlsl
+++ b/tests/sksl/intrinsics/Exp2.hlsl
@@ -82,16 +82,8 @@
     {
         _113 = false;
     }
-    float4 _114 = 0.0f.xxxx;
-    if (_113)
-    {
-        _114 = _10_colorGreen;
-    }
-    else
-    {
-        _114 = _10_colorRed;
-    }
-    return _114;
+    bool4 _114 = _113.xxxx;
+    return float4(_114.x ? _10_colorGreen.x : _10_colorRed.x, _114.y ? _10_colorGreen.y : _10_colorRed.y, _114.z ? _10_colorGreen.z : _10_colorRed.z, _114.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/FaceForward.asm.frag b/tests/sksl/intrinsics/FaceForward.asm.frag
index 15d4c98..c822be0 100644
--- a/tests/sksl/intrinsics/FaceForward.asm.frag
+++ b/tests/sksl/intrinsics/FaceForward.asm.frag
@@ -63,9 +63,8 @@
 OpDecorate %99 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
+OpDecorate %129 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -122,7 +121,6 @@
 %25 = OpLabel
 %expectedPos = OpVariable %_ptr_Function_v4float Function
 %expectedNeg = OpVariable %_ptr_Function_v4float Function
-%125 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedPos %32
 OpStore %expectedNeg %38
 %41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -219,19 +217,11 @@
 OpBranch %123
 %123 = OpLabel
 %124 = OpPhi %bool %false %116 %true %122
-OpSelectionMerge %128 None
-OpBranchConditional %124 %126 %127
-%126 = OpLabel
-%129 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%131 = OpLoad %v4float %129
-OpStore %125 %131
-OpBranch %128
-%127 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
-%134 = OpLoad %v4float %132
-OpStore %125 %134
-OpBranch %128
-%128 = OpLabel
-%135 = OpLoad %v4float %125
-OpReturnValue %135
+%125 = OpCompositeConstruct %v4bool %124 %124 %124 %124
+%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%129 = OpLoad %v4float %127
+%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%132 = OpLoad %v4float %130
+%126 = OpSelect %v4float %125 %129 %132
+OpReturnValue %126
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/FaceForward.hlsl b/tests/sksl/intrinsics/FaceForward.hlsl
index 9c71cf3..d8bdaa3 100644
--- a/tests/sksl/intrinsics/FaceForward.hlsl
+++ b/tests/sksl/intrinsics/FaceForward.hlsl
@@ -90,16 +90,8 @@
     {
         _124 = false;
     }
-    float4 _125 = 0.0f.xxxx;
-    if (_124)
-    {
-        _125 = _10_colorGreen;
-    }
-    else
-    {
-        _125 = _10_colorRed;
-    }
-    return _125;
+    bool4 _125 = _124.xxxx;
+    return float4(_125.x ? _10_colorGreen.x : _10_colorRed.x, _125.y ? _10_colorGreen.y : _10_colorRed.y, _125.z ? _10_colorGreen.z : _10_colorRed.z, _125.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
index 06d1e50..b4703b2 100644
--- a/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
+++ b/tests/sksl/intrinsics/FloatBitsToInt.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %88 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -84,7 +83,6 @@
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
-%81 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -126,19 +124,11 @@
 OpBranch %72
 %72 = OpLabel
 %80 = OpPhi %bool %false %60 %79 %71
-OpSelectionMerge %84 None
-OpBranchConditional %80 %82 %83
-%82 = OpLabel
-%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%88 = OpLoad %v4float %85
-OpStore %81 %88
-OpBranch %84
-%83 = OpLabel
-%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%91 = OpLoad %v4float %89
-OpStore %81 %91
-OpBranch %84
-%84 = OpLabel
-%92 = OpLoad %v4float %81
-OpReturnValue %92
+%81 = OpCompositeConstruct %v4bool %80 %80 %80 %80
+%83 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%86 = OpLoad %v4float %83
+%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%89 = OpLoad %v4float %87
+%82 = OpSelect %v4float %81 %86 %89
+OpReturnValue %82
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/FloatBitsToInt.hlsl b/tests/sksl/intrinsics/FloatBitsToInt.hlsl
index 979dcb6..5bf7fc9 100644
--- a/tests/sksl/intrinsics/FloatBitsToInt.hlsl
+++ b/tests/sksl/intrinsics/FloatBitsToInt.hlsl
@@ -47,16 +47,8 @@
     {
         _80 = false;
     }
-    float4 _81 = 0.0f.xxxx;
-    if (_80)
-    {
-        _81 = _10_colorGreen;
-    }
-    else
-    {
-        _81 = _10_colorRed;
-    }
-    return _81;
+    bool4 _81 = _80.xxxx;
+    return float4(_81.x ? _10_colorGreen.x : _10_colorRed.x, _81.y ? _10_colorGreen.y : _10_colorRed.y, _81.z ? _10_colorGreen.z : _10_colorRed.z, _81.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
index 8c47038..3809ab9 100644
--- a/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
+++ b/tests/sksl/intrinsics/FloatBitsToUint.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %90 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
-%82 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -127,19 +125,11 @@
 OpBranch %73
 %73 = OpLabel
 %81 = OpPhi %bool %false %61 %80 %72
-OpSelectionMerge %85 None
-OpBranchConditional %81 %83 %84
-%83 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%89 = OpLoad %v4float %86
-OpStore %82 %89
-OpBranch %85
-%84 = OpLabel
-%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%92 = OpLoad %v4float %90
-OpStore %82 %92
-OpBranch %85
-%85 = OpLabel
-%93 = OpLoad %v4float %82
-OpReturnValue %93
+%82 = OpCompositeConstruct %v4bool %81 %81 %81 %81
+%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%87 = OpLoad %v4float %84
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%90 = OpLoad %v4float %88
+%83 = OpSelect %v4float %82 %87 %90
+OpReturnValue %83
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/FloatBitsToUint.hlsl b/tests/sksl/intrinsics/FloatBitsToUint.hlsl
index 9bffadc..1df12cb 100644
--- a/tests/sksl/intrinsics/FloatBitsToUint.hlsl
+++ b/tests/sksl/intrinsics/FloatBitsToUint.hlsl
@@ -47,16 +47,8 @@
     {
         _81 = false;
     }
-    float4 _82 = 0.0f.xxxx;
-    if (_81)
-    {
-        _82 = _10_colorGreen;
-    }
-    else
-    {
-        _82 = _10_colorRed;
-    }
-    return _82;
+    bool4 _82 = _81.xxxx;
+    return float4(_82.x ? _10_colorGreen.x : _10_colorRed.x, _82.y ? _10_colorGreen.y : _10_colorRed.y, _82.z ? _10_colorGreen.z : _10_colorRed.z, _82.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Floor.asm.frag b/tests/sksl/intrinsics/Floor.asm.frag
index ef1e3c5..0e8685f 100644
--- a/tests/sksl/intrinsics/Floor.asm.frag
+++ b/tests/sksl/intrinsics/Floor.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %67 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
 OpDecorate %86 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%93 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %30
 %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %37 = OpLoad %v4float %33
@@ -164,19 +162,11 @@
 OpBranch %91
 %91 = OpLabel
 %92 = OpPhi %bool %false %84 %true %90
-OpSelectionMerge %96 None
-OpBranchConditional %92 %94 %95
-%94 = OpLabel
-%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%99 = OpLoad %v4float %97
-OpStore %93 %99
-OpBranch %96
-%95 = OpLabel
-%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%102 = OpLoad %v4float %100
-OpStore %93 %102
-OpBranch %96
-%96 = OpLabel
-%103 = OpLoad %v4float %93
-OpReturnValue %103
+%93 = OpCompositeConstruct %v4bool %92 %92 %92 %92
+%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%97 = OpLoad %v4float %95
+%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%100 = OpLoad %v4float %98
+%94 = OpSelect %v4float %93 %97 %100
+OpReturnValue %94
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Floor.hlsl b/tests/sksl/intrinsics/Floor.hlsl
index 54dac70..3ca08a3 100644
--- a/tests/sksl/intrinsics/Floor.hlsl
+++ b/tests/sksl/intrinsics/Floor.hlsl
@@ -82,16 +82,8 @@
     {
         _92 = false;
     }
-    float4 _93 = 0.0f.xxxx;
-    if (_92)
-    {
-        _93 = _10_colorGreen;
-    }
-    else
-    {
-        _93 = _10_colorRed;
-    }
-    return _93;
+    bool4 _93 = _92.xxxx;
+    return float4(_93.x ? _10_colorGreen.x : _10_colorRed.x, _93.y ? _10_colorGreen.y : _10_colorRed.y, _93.z ? _10_colorGreen.z : _10_colorRed.z, _93.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Fma.asm.frag b/tests/sksl/intrinsics/Fma.asm.frag
index f7b77d2..adad8ef 100644
--- a/tests/sksl/intrinsics/Fma.asm.frag
+++ b/tests/sksl/intrinsics/Fma.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %four RelaxedPrecision
 OpDecorate %five RelaxedPrecision
 OpDecorate %63 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
 OpDecorate %74 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -66,7 +65,7 @@
 %false = OpConstantFalse %bool
 %float_5 = OpConstant %float 5
 %float_17 = OpConstant %float 17
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %18
 %19 = OpLabel
@@ -84,7 +83,6 @@
 %three = OpVariable %_ptr_Function_float Function
 %four = OpVariable %_ptr_Function_float Function
 %five = OpVariable %_ptr_Function_float Function
-%67 = OpVariable %_ptr_Function_v4float Function
 %31 = OpAccessChain %_ptr_Uniform__arr_float_int_5 %10 %int_2
 %35 = OpAccessChain %_ptr_Uniform_float %31 %int_0
 %37 = OpLoad %float %35
@@ -115,19 +113,11 @@
 OpBranch %62
 %62 = OpLabel
 %66 = OpPhi %bool %false %28 %65 %61
-OpSelectionMerge %71 None
-OpBranchConditional %66 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%74 = OpLoad %v4float %72
-OpStore %67 %74
-OpBranch %71
-%70 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%76 = OpLoad %v4float %75
-OpStore %67 %76
-OpBranch %71
-%71 = OpLabel
-%77 = OpLoad %v4float %67
-OpReturnValue %77
+%68 = OpCompositeConstruct %v4bool %66 %66 %66 %66
+%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%72 = OpLoad %v4float %70
+%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%74 = OpLoad %v4float %73
+%69 = OpSelect %v4float %68 %72 %74
+OpReturnValue %69
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Fma.hlsl b/tests/sksl/intrinsics/Fma.hlsl
index d1a84b8..f249910 100644
--- a/tests/sksl/intrinsics/Fma.hlsl
+++ b/tests/sksl/intrinsics/Fma.hlsl
@@ -29,16 +29,8 @@
     {
         _66 = false;
     }
-    float4 _67 = 0.0f.xxxx;
-    if (_66)
-    {
-        _67 = _10_colorGreen;
-    }
-    else
-    {
-        _67 = _10_colorRed;
-    }
-    return _67;
+    bool4 _68 = _66.xxxx;
+    return float4(_68.x ? _10_colorGreen.x : _10_colorRed.x, _68.y ? _10_colorGreen.y : _10_colorRed.y, _68.z ? _10_colorGreen.z : _10_colorRed.z, _68.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Fract.asm.frag b/tests/sksl/intrinsics/Fract.asm.frag
index 0e55858..caef80a 100644
--- a/tests/sksl/intrinsics/Fract.asm.frag
+++ b/tests/sksl/intrinsics/Fract.asm.frag
@@ -23,9 +23,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %74 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -56,7 +55,6 @@
 %float_0_25 = OpConstant %float 0.25
 %65 = OpConstantComposite %v4float %float_0_75 %float_0 %float_0_75 %float_0_25
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -70,7 +68,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%70 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -111,19 +108,11 @@
 OpBranch %60
 %60 = OpLabel
 %69 = OpPhi %bool %false %48 %68 %59
-OpSelectionMerge %74 None
-OpBranchConditional %69 %72 %73
-%72 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%70 = OpCompositeConstruct %v4bool %69 %69 %69 %69
+%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%74 = OpLoad %v4float %72
+%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %77 = OpLoad %v4float %75
-OpStore %70 %77
-OpBranch %74
-%73 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%80 = OpLoad %v4float %78
-OpStore %70 %80
-OpBranch %74
-%74 = OpLabel
-%81 = OpLoad %v4float %70
-OpReturnValue %81
+%71 = OpSelect %v4float %70 %74 %77
+OpReturnValue %71
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Fract.hlsl b/tests/sksl/intrinsics/Fract.hlsl
index da03e34..2a9d9ad 100644
--- a/tests/sksl/intrinsics/Fract.hlsl
+++ b/tests/sksl/intrinsics/Fract.hlsl
@@ -45,16 +45,8 @@
     {
         _69 = false;
     }
-    float4 _70 = 0.0f.xxxx;
-    if (_69)
-    {
-        _70 = _10_colorGreen;
-    }
-    else
-    {
-        _70 = _10_colorRed;
-    }
-    return _70;
+    bool4 _70 = _69.xxxx;
+    return float4(_70.x ? _10_colorGreen.x : _10_colorRed.x, _70.y ? _10_colorGreen.y : _10_colorRed.y, _70.z ? _10_colorGreen.z : _10_colorRed.z, _70.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Frexp.asm.frag b/tests/sksl/intrinsics/Frexp.asm.frag
index 21f4d74..308defa 100644
--- a/tests/sksl/intrinsics/Frexp.asm.frag
+++ b/tests/sksl/intrinsics/Frexp.asm.frag
@@ -29,9 +29,8 @@
 OpDecorate %33 RelaxedPrecision
 OpDecorate %35 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
+OpDecorate %123 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %68 = OpVariable %_ptr_Function_v2int Function
 %89 = OpVariable %_ptr_Function_v3int Function
 %108 = OpVariable %_ptr_Function_v4int Function
-%120 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpVectorShuffle %v4float %32 %32 1 1 1 1
@@ -180,19 +178,11 @@
 OpStore %117 %116
 %119 = OpLoad %v4bool %ok
 %118 = OpAll %bool %119
-OpSelectionMerge %123 None
-OpBranchConditional %118 %121 %122
-%121 = OpLabel
-%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%120 = OpCompositeConstruct %v4bool %118 %118 %118 %118
+%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%123 = OpLoad %v4float %122
+%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %125 = OpLoad %v4float %124
-OpStore %120 %125
-OpBranch %123
-%122 = OpLabel
-%126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%127 = OpLoad %v4float %126
-OpStore %120 %127
-OpBranch %123
-%123 = OpLabel
-%128 = OpLoad %v4float %120
-OpReturnValue %128
+%121 = OpSelect %v4float %120 %123 %125
+OpReturnValue %121
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Frexp.hlsl b/tests/sksl/intrinsics/Frexp.hlsl
index 11be8a4..3bb2598 100644
--- a/tests/sksl/intrinsics/Frexp.hlsl
+++ b/tests/sksl/intrinsics/Frexp.hlsl
@@ -79,16 +79,8 @@
         _116 = false;
     }
     ok.w = _116;
-    float4 _120 = 0.0f.xxxx;
-    if (all(ok))
-    {
-        _120 = _10_colorGreen;
-    }
-    else
-    {
-        _120 = _10_colorRed;
-    }
-    return _120;
+    bool4 _120 = all(ok).xxxx;
+    return float4(_120.x ? _10_colorGreen.x : _10_colorRed.x, _120.y ? _10_colorGreen.y : _10_colorRed.y, _120.z ? _10_colorGreen.z : _10_colorRed.z, _120.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Fwidth.asm.frag b/tests/sksl/intrinsics/Fwidth.asm.frag
index 46946f7..e454e77 100644
--- a/tests/sksl/intrinsics/Fwidth.asm.frag
+++ b/tests/sksl/intrinsics/Fwidth.asm.frag
@@ -39,9 +39,8 @@
 OpDecorate %56 RelaxedPrecision
 OpDecorate %63 RelaxedPrecision
 OpDecorate %65 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
-OpDecorate %130 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %127 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -87,7 +86,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%120 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %28
 %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %35 = OpLoad %v4float %31
@@ -192,19 +190,11 @@
 OpBranch %113
 %113 = OpLabel
 %119 = OpPhi %bool %false %102 %118 %112
-OpSelectionMerge %123 None
-OpBranchConditional %119 %121 %122
-%121 = OpLabel
-%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%126 = OpLoad %v4float %124
-OpStore %120 %126
-OpBranch %123
-%122 = OpLabel
-%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%129 = OpLoad %v4float %127
-OpStore %120 %129
-OpBranch %123
-%123 = OpLabel
-%130 = OpLoad %v4float %120
-OpReturnValue %130
+%120 = OpCompositeConstruct %v4bool %119 %119 %119 %119
+%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%124 = OpLoad %v4float %122
+%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%127 = OpLoad %v4float %125
+%121 = OpSelect %v4float %120 %124 %127
+OpReturnValue %121
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Fwidth.hlsl b/tests/sksl/intrinsics/Fwidth.hlsl
index 3f140fd..439cca6 100644
--- a/tests/sksl/intrinsics/Fwidth.hlsl
+++ b/tests/sksl/intrinsics/Fwidth.hlsl
@@ -96,16 +96,8 @@
     {
         _119 = false;
     }
-    float4 _120 = 0.0f.xxxx;
-    if (_119)
-    {
-        _120 = _10_colorGreen;
-    }
-    else
-    {
-        _120 = _10_colorRed;
-    }
-    return _120;
+    bool4 _120 = _119.xxxx;
+    return float4(_120.x ? _10_colorGreen.x : _10_colorRed.x, _120.y ? _10_colorGreen.y : _10_colorRed.y, _120.z ? _10_colorGreen.z : _10_colorRed.z, _120.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
index 7c05021..5deeb05 100644
--- a/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
+++ b/tests/sksl/intrinsics/IntBitsToFloat.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %26 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4int Function
-%83 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -130,19 +128,11 @@
 OpBranch %77
 %77 = OpLabel
 %82 = OpPhi %bool %false %66 %81 %76
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%90 = OpLoad %v4float %87
-OpStore %83 %90
-OpBranch %86
-%85 = OpLabel
-%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %91
-OpStore %83 %93
-OpBranch %86
-%86 = OpLabel
-%94 = OpLoad %v4float %83
-OpReturnValue %94
+%83 = OpCompositeConstruct %v4bool %82 %82 %82 %82
+%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%88 = OpLoad %v4float %85
+%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%91 = OpLoad %v4float %89
+%84 = OpSelect %v4float %83 %88 %91
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/IntBitsToFloat.hlsl b/tests/sksl/intrinsics/IntBitsToFloat.hlsl
index cf7bf0b..4a6720c 100644
--- a/tests/sksl/intrinsics/IntBitsToFloat.hlsl
+++ b/tests/sksl/intrinsics/IntBitsToFloat.hlsl
@@ -50,16 +50,8 @@
     {
         _82 = false;
     }
-    float4 _83 = 0.0f.xxxx;
-    if (_82)
-    {
-        _83 = _10_colorGreen;
-    }
-    else
-    {
-        _83 = _10_colorRed;
-    }
-    return _83;
+    bool4 _83 = _82.xxxx;
+    return float4(_83.x ? _10_colorGreen.x : _10_colorRed.x, _83.y ? _10_colorGreen.y : _10_colorRed.y, _83.z ? _10_colorGreen.z : _10_colorRed.z, _83.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Inverse.asm.frag b/tests/sksl/intrinsics/Inverse.asm.frag
index 6fd56e41..acbbde3 100644
--- a/tests/sksl/intrinsics/Inverse.asm.frag
+++ b/tests/sksl/intrinsics/Inverse.asm.frag
@@ -43,9 +43,8 @@
 OpDecorate %114 RelaxedPrecision
 OpDecorate %117 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
 OpDecorate %131 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -111,7 +110,6 @@
 %107 = OpConstantComposite %v3float %float_4 %float_5 %float_6
 %108 = OpConstantComposite %v3float %float_7 %float_8 %float_9
 %109 = OpConstantComposite %mat3v3float %106 %107 %108
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -130,7 +128,6 @@
 %inv2x2 = OpVariable %_ptr_Function_mat2v2float Function
 %inv3x3 = OpVariable %_ptr_Function_mat3v3float Function
 %inv4x4 = OpVariable %_ptr_Function_mat4v4float Function
-%122 = OpVariable %_ptr_Function_v4float Function
 OpStore %inv2x2 %35
 OpStore %inv3x3 %51
 OpStore %inv4x4 %64
@@ -188,19 +185,11 @@
 OpBranch %100
 %100 = OpLabel
 %121 = OpPhi %bool %false %85 %120 %99
-OpSelectionMerge %126 None
-OpBranchConditional %121 %124 %125
-%124 = OpLabel
-%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%131 = OpLoad %v4float %127
-OpStore %122 %131
-OpBranch %126
-%125 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%134 = OpLoad %v4float %132
-OpStore %122 %134
-OpBranch %126
-%126 = OpLabel
-%135 = OpLoad %v4float %122
-OpReturnValue %135
+%122 = OpCompositeConstruct %v4bool %121 %121 %121 %121
+%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%128 = OpLoad %v4float %124
+%129 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%131 = OpLoad %v4float %129
+%123 = OpSelect %v4float %122 %128 %131
+OpReturnValue %123
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Inverse.hlsl b/tests/sksl/intrinsics/Inverse.hlsl
index f8cd0da..0e49cfd 100644
--- a/tests/sksl/intrinsics/Inverse.hlsl
+++ b/tests/sksl/intrinsics/Inverse.hlsl
@@ -81,16 +81,8 @@
     {
         _121 = false;
     }
-    float4 _122 = 0.0f.xxxx;
-    if (_121)
-    {
-        _122 = _10_colorGreen;
-    }
-    else
-    {
-        _122 = _10_colorRed;
-    }
-    return _122;
+    bool4 _122 = _121.xxxx;
+    return float4(_122.x ? _10_colorGreen.x : _10_colorRed.x, _122.y ? _10_colorGreen.y : _10_colorRed.y, _122.z ? _10_colorGreen.z : _10_colorRed.z, _122.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Inversesqrt.asm.frag b/tests/sksl/intrinsics/Inversesqrt.asm.frag
index 25dcfec..d735296 100644
--- a/tests/sksl/intrinsics/Inversesqrt.asm.frag
+++ b/tests/sksl/intrinsics/Inversesqrt.asm.frag
@@ -63,9 +63,8 @@
 OpDecorate %141 RelaxedPrecision
 OpDecorate %147 RelaxedPrecision
 OpDecorate %151 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
 OpDecorate %162 RelaxedPrecision
-OpDecorate %165 RelaxedPrecision
-OpDecorate %166 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -106,7 +105,6 @@
 %138 = OpConstantComposite %v3float %float_n1 %float_n4 %float_n16
 %float_n64 = OpConstant %float -64
 %149 = OpConstantComposite %v4float %float_n1 %float_n4 %float_n16 %float_n64
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -120,7 +118,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%155 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -260,19 +257,11 @@
 OpBranch %146
 %146 = OpLabel
 %154 = OpPhi %bool %false %135 %153 %145
-OpSelectionMerge %159 None
-OpBranchConditional %154 %157 %158
-%157 = OpLabel
-%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%155 = OpCompositeConstruct %v4bool %154 %154 %154 %154
+%157 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%159 = OpLoad %v4float %157
+%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %162 = OpLoad %v4float %160
-OpStore %155 %162
-OpBranch %159
-%158 = OpLabel
-%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%165 = OpLoad %v4float %163
-OpStore %155 %165
-OpBranch %159
-%159 = OpLabel
-%166 = OpLoad %v4float %155
-OpReturnValue %166
+%156 = OpSelect %v4float %155 %159 %162
+OpReturnValue %156
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Inversesqrt.hlsl b/tests/sksl/intrinsics/Inversesqrt.hlsl
index 1f6a12d..fd465c5 100644
--- a/tests/sksl/intrinsics/Inversesqrt.hlsl
+++ b/tests/sksl/intrinsics/Inversesqrt.hlsl
@@ -121,16 +121,8 @@
     {
         _154 = false;
     }
-    float4 _155 = 0.0f.xxxx;
-    if (_154)
-    {
-        _155 = _10_colorGreen;
-    }
-    else
-    {
-        _155 = _10_colorRed;
-    }
-    return _155;
+    bool4 _155 = _154.xxxx;
+    return float4(_155.x ? _10_colorGreen.x : _10_colorRed.x, _155.y ? _10_colorGreen.y : _10_colorRed.y, _155.z ? _10_colorGreen.z : _10_colorRed.z, _155.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/IsInf.asm.frag b/tests/sksl/intrinsics/IsInf.asm.frag
index 7f57f8a..e70a057 100644
--- a/tests/sksl/intrinsics/IsInf.asm.frag
+++ b/tests/sksl/intrinsics/IsInf.asm.frag
@@ -56,9 +56,8 @@
 OpDecorate %88 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
 OpDecorate %102 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -103,7 +102,6 @@
 %26 = OpLabel
 %infiniteValue = OpVariable %_ptr_Function_v4float Function
 %finiteValue = OpVariable %_ptr_Function_v4float Function
-%110 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -196,19 +194,11 @@
 OpBranch %105
 %105 = OpLabel
 %109 = OpPhi %bool %false %98 %106 %104
-OpSelectionMerge %113 None
-OpBranchConditional %109 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%115 = OpLoad %v4float %114
-OpStore %110 %115
-OpBranch %113
-%112 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%118 = OpLoad %v4float %116
-OpStore %110 %118
-OpBranch %113
-%113 = OpLabel
-%119 = OpLoad %v4float %110
-OpReturnValue %119
+%110 = OpCompositeConstruct %v4bool %109 %109 %109 %109
+%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%113 = OpLoad %v4float %112
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%116 = OpLoad %v4float %114
+%111 = OpSelect %v4float %110 %113 %116
+OpReturnValue %111
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/IsInf.hlsl b/tests/sksl/intrinsics/IsInf.hlsl
index 5c4bce1..1a9600a 100644
--- a/tests/sksl/intrinsics/IsInf.hlsl
+++ b/tests/sksl/intrinsics/IsInf.hlsl
@@ -82,16 +82,8 @@
     {
         _109 = false;
     }
-    float4 _110 = 0.0f.xxxx;
-    if (_109)
-    {
-        _110 = _10_colorGreen;
-    }
-    else
-    {
-        _110 = _10_colorRed;
-    }
-    return _110;
+    bool4 _110 = _109.xxxx;
+    return float4(_110.x ? _10_colorGreen.x : _10_colorRed.x, _110.y ? _10_colorGreen.y : _10_colorRed.y, _110.z ? _10_colorGreen.z : _10_colorRed.z, _110.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/IsNan.asm.frag b/tests/sksl/intrinsics/IsNan.asm.frag
index 4fb5f6e..19f22c2 100644
--- a/tests/sksl/intrinsics/IsNan.asm.frag
+++ b/tests/sksl/intrinsics/IsNan.asm.frag
@@ -39,9 +39,8 @@
 OpDecorate %70 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
 OpDecorate %84 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,7 +85,6 @@
 %25 = OpLabel
 %valueIsNaN = OpVariable %_ptr_Function_v4float Function
 %valueIsNumber = OpVariable %_ptr_Function_v4float Function
-%92 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpVectorShuffle %v4float %32 %32 1 1 1 1
@@ -162,19 +160,11 @@
 OpBranch %87
 %87 = OpLabel
 %91 = OpPhi %bool %false %80 %88 %86
-OpSelectionMerge %95 None
-OpBranchConditional %91 %93 %94
-%93 = OpLabel
-%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%98 = OpLoad %v4float %96
-OpStore %92 %98
-OpBranch %95
-%94 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%101 = OpLoad %v4float %99
-OpStore %92 %101
-OpBranch %95
-%95 = OpLabel
-%102 = OpLoad %v4float %92
-OpReturnValue %102
+%92 = OpCompositeConstruct %v4bool %91 %91 %91 %91
+%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%96 = OpLoad %v4float %94
+%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%99 = OpLoad %v4float %97
+%93 = OpSelect %v4float %92 %96 %99
+OpReturnValue %93
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/IsNan.hlsl b/tests/sksl/intrinsics/IsNan.hlsl
index 4a16b54..2cf4dda 100644
--- a/tests/sksl/intrinsics/IsNan.hlsl
+++ b/tests/sksl/intrinsics/IsNan.hlsl
@@ -82,16 +82,8 @@
     {
         _91 = false;
     }
-    float4 _92 = 0.0f.xxxx;
-    if (_91)
-    {
-        _92 = _10_colorGreen;
-    }
-    else
-    {
-        _92 = _10_colorRed;
-    }
-    return _92;
+    bool4 _92 = _91.xxxx;
+    return float4(_92.x ? _10_colorGreen.x : _10_colorRed.x, _92.y ? _10_colorGreen.y : _10_colorRed.y, _92.z ? _10_colorGreen.z : _10_colorRed.z, _92.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Length.asm.frag b/tests/sksl/intrinsics/Length.asm.frag
index b46b0a4..fa9a9d9 100644
--- a/tests/sksl/intrinsics/Length.asm.frag
+++ b/tests/sksl/intrinsics/Length.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -61,6 +60,7 @@
 %false = OpConstantFalse %bool
 %float_0_0500000007 = OpConstant %float 0.0500000007
 %v3float = OpTypeVector %float 3
+%v4bool = OpTypeVector %bool 4
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -76,7 +76,6 @@
 %25 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
 %expected = OpVariable %_ptr_Function_v4float Function
-%99 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %38 = OpFAdd %v4float %32 %37
@@ -155,19 +154,11 @@
 OpBranch %94
 %94 = OpLabel
 %98 = OpPhi %bool %false %88 %97 %93
-OpSelectionMerge %102 None
-OpBranchConditional %98 %100 %101
-%100 = OpLabel
-%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%105 = OpLoad %v4float %103
-OpStore %99 %105
-OpBranch %102
-%101 = OpLabel
-%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%108 = OpLoad %v4float %106
-OpStore %99 %108
-OpBranch %102
-%102 = OpLabel
-%109 = OpLoad %v4float %99
-OpReturnValue %109
+%100 = OpCompositeConstruct %v4bool %98 %98 %98 %98
+%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%104 = OpLoad %v4float %102
+%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%107 = OpLoad %v4float %105
+%101 = OpSelect %v4float %100 %104 %107
+OpReturnValue %101
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Length.hlsl b/tests/sksl/intrinsics/Length.hlsl
index 3d755d8..86077a0 100644
--- a/tests/sksl/intrinsics/Length.hlsl
+++ b/tests/sksl/intrinsics/Length.hlsl
@@ -81,16 +81,8 @@
     {
         _98 = false;
     }
-    float4 _99 = 0.0f.xxxx;
-    if (_98)
-    {
-        _99 = _10_colorGreen;
-    }
-    else
-    {
-        _99 = _10_colorRed;
-    }
-    return _99;
+    bool4 _100 = _98.xxxx;
+    return float4(_100.x ? _10_colorGreen.x : _10_colorRed.x, _100.y ? _10_colorGreen.y : _10_colorRed.y, _100.z ? _10_colorGreen.z : _10_colorRed.z, _100.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Log.asm.frag b/tests/sksl/intrinsics/Log.asm.frag
index ccd8e48..047b3c7 100644
--- a/tests/sksl/intrinsics/Log.asm.frag
+++ b/tests/sksl/intrinsics/Log.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Log.hlsl b/tests/sksl/intrinsics/Log.hlsl
index a0dba64..0d93bae 100644
--- a/tests/sksl/intrinsics/Log.hlsl
+++ b/tests/sksl/intrinsics/Log.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Log2.asm.frag b/tests/sksl/intrinsics/Log2.asm.frag
index 1891c2a..5e4ca58 100644
--- a/tests/sksl/intrinsics/Log2.asm.frag
+++ b/tests/sksl/intrinsics/Log2.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %99 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
 OpDecorate %109 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
 OpDecorate %120 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -87,7 +86,6 @@
 %97 = OpConstantComposite %v3float %float_0 %float_1 %float_2
 %float_3 = OpConstant %float 3
 %107 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -101,7 +99,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%113 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -195,19 +192,11 @@
 OpBranch %105
 %105 = OpLabel
 %112 = OpPhi %bool %false %95 %111 %104
-OpSelectionMerge %117 None
-OpBranchConditional %112 %115 %116
-%115 = OpLabel
-%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpCompositeConstruct %v4bool %112 %112 %112 %112
+%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%117 = OpLoad %v4float %115
+%118 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %120 = OpLoad %v4float %118
-OpStore %113 %120
-OpBranch %117
-%116 = OpLabel
-%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%123 = OpLoad %v4float %121
-OpStore %113 %123
-OpBranch %117
-%117 = OpLabel
-%124 = OpLoad %v4float %113
-OpReturnValue %124
+%114 = OpSelect %v4float %113 %117 %120
+OpReturnValue %114
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Log2.hlsl b/tests/sksl/intrinsics/Log2.hlsl
index 14bad78..7dcfae8 100644
--- a/tests/sksl/intrinsics/Log2.hlsl
+++ b/tests/sksl/intrinsics/Log2.hlsl
@@ -82,16 +82,8 @@
     {
         _112 = false;
     }
-    float4 _113 = 0.0f.xxxx;
-    if (_112)
-    {
-        _113 = _10_colorGreen;
-    }
-    else
-    {
-        _113 = _10_colorRed;
-    }
-    return _113;
+    bool4 _113 = _112.xxxx;
+    return float4(_113.x ? _10_colorGreen.x : _10_colorRed.x, _113.y ? _10_colorGreen.y : _10_colorRed.y, _113.z ? _10_colorGreen.z : _10_colorRed.z, _113.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag b/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag
index 11dfb30..278a90e 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag
+++ b/tests/sksl/intrinsics/MatrixCompMultES2.asm.frag
@@ -48,9 +48,8 @@
 OpDecorate %101 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
 OpDecorate %106 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -107,7 +106,7 @@
 %98 = OpConstantComposite %v3float %float_14 %float_16 %float_18
 %99 = OpConstantComposite %mat3v3float %96 %97 %98
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
@@ -125,7 +124,6 @@
 %h22 = OpVariable %_ptr_Function_mat2v2float Function
 %f22 = OpVariable %_ptr_Function_mat2v2float Function
 %h33 = OpVariable %_ptr_Function_mat3v3float Function
-%110 = OpVariable %_ptr_Function_v4float Function
 OpStore %h22 %36
 %39 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
 %43 = OpLoad %mat2v2float %39
@@ -175,19 +173,11 @@
 OpBranch %89
 %89 = OpLabel
 %109 = OpPhi %bool %false %78 %108 %88
-OpSelectionMerge %114 None
-OpBranchConditional %109 %112 %113
-%112 = OpLabel
-%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%118 = OpLoad %v4float %115
-OpStore %110 %118
-OpBranch %114
-%113 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%121 = OpLoad %v4float %119
-OpStore %110 %121
-OpBranch %114
-%114 = OpLabel
-%122 = OpLoad %v4float %110
-OpReturnValue %122
+%111 = OpCompositeConstruct %v4bool %109 %109 %109 %109
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%116 = OpLoad %v4float %113
+%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%119 = OpLoad %v4float %117
+%112 = OpSelect %v4float %111 %116 %119
+OpReturnValue %112
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MatrixCompMultES2.hlsl b/tests/sksl/intrinsics/MatrixCompMultES2.hlsl
index 0689052..f2c4972 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES2.hlsl
+++ b/tests/sksl/intrinsics/MatrixCompMultES2.hlsl
@@ -42,16 +42,8 @@
     {
         _109 = false;
     }
-    float4 _110 = 0.0f.xxxx;
-    if (_109)
-    {
-        _110 = _10_colorGreen;
-    }
-    else
-    {
-        _110 = _10_colorRed;
-    }
-    return _110;
+    bool4 _111 = _109.xxxx;
+    return float4(_111.x ? _10_colorGreen.x : _10_colorRed.x, _111.y ? _10_colorGreen.y : _10_colorRed.y, _111.z ? _10_colorGreen.z : _10_colorRed.z, _111.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
index e38e171..6562195 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
+++ b/tests/sksl/intrinsics/MatrixCompMultES3.asm.frag
@@ -58,9 +58,8 @@
 OpDecorate %119 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
-OpDecorate %150 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %153 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
+OpDecorate %149 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -128,7 +127,6 @@
 %115 = OpConstantComposite %mat4v2float %111 %112 %113 %114
 %v2bool = OpTypeVector %bool 2
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -143,7 +141,6 @@
 %h24 = OpVariable %_ptr_Function_mat2v4float Function
 %h42 = OpVariable %_ptr_Function_mat4v2float Function
 %f43 = OpVariable %_ptr_Function_mat4v3float Function
-%144 = OpVariable %_ptr_Function_v4float Function
 %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %37 = OpLoad %v4float %33
 %38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -216,19 +213,11 @@
 OpBranch %130
 %130 = OpLabel
 %143 = OpPhi %bool %false %110 %142 %129
-OpSelectionMerge %148 None
-OpBranchConditional %143 %146 %147
-%146 = OpLabel
-%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%150 = OpLoad %v4float %149
-OpStore %144 %150
-OpBranch %148
-%147 = OpLabel
-%151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%152 = OpLoad %v4float %151
-OpStore %144 %152
-OpBranch %148
-%148 = OpLabel
-%153 = OpLoad %v4float %144
-OpReturnValue %153
+%144 = OpCompositeConstruct %v4bool %143 %143 %143 %143
+%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%147 = OpLoad %v4float %146
+%148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%149 = OpLoad %v4float %148
+%145 = OpSelect %v4float %144 %147 %149
+OpReturnValue %145
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MatrixCompMultES3.hlsl b/tests/sksl/intrinsics/MatrixCompMultES3.hlsl
index a52b88c0..94ff81f 100644
--- a/tests/sksl/intrinsics/MatrixCompMultES3.hlsl
+++ b/tests/sksl/intrinsics/MatrixCompMultES3.hlsl
@@ -45,16 +45,8 @@
     {
         _143 = false;
     }
-    float4 _144 = 0.0f.xxxx;
-    if (_143)
-    {
-        _144 = _10_colorGreen;
-    }
-    else
-    {
-        _144 = _10_colorRed;
-    }
-    return _144;
+    bool4 _144 = _143.xxxx;
+    return float4(_144.x ? _10_colorGreen.x : _10_colorRed.x, _144.y ? _10_colorGreen.y : _10_colorRed.y, _144.z ? _10_colorGreen.z : _10_colorRed.z, _144.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MaxFloat.asm.frag b/tests/sksl/intrinsics/MaxFloat.asm.frag
index 35c9226e..66569a4 100644
--- a/tests/sksl/intrinsics/MaxFloat.asm.frag
+++ b/tests/sksl/intrinsics/MaxFloat.asm.frag
@@ -57,9 +57,8 @@
 OpDecorate %143 RelaxedPrecision
 OpDecorate %153 RelaxedPrecision
 OpDecorate %160 RelaxedPrecision
-OpDecorate %172 RelaxedPrecision
-OpDecorate %175 RelaxedPrecision
-OpDecorate %176 RelaxedPrecision
+OpDecorate %170 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -114,7 +113,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%167 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %31
 OpStore %expectedB %34
 %37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -278,19 +276,11 @@
 OpBranch %165
 %165 = OpLabel
 %166 = OpPhi %bool %false %158 %true %164
-OpSelectionMerge %170 None
-OpBranchConditional %166 %168 %169
-%168 = OpLabel
-%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%172 = OpLoad %v4float %171
-OpStore %167 %172
-OpBranch %170
-%169 = OpLabel
-%173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%175 = OpLoad %v4float %173
-OpStore %167 %175
-OpBranch %170
-%170 = OpLabel
-%176 = OpLoad %v4float %167
-OpReturnValue %176
+%167 = OpCompositeConstruct %v4bool %166 %166 %166 %166
+%169 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%170 = OpLoad %v4float %169
+%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%173 = OpLoad %v4float %171
+%168 = OpSelect %v4float %167 %170 %173
+OpReturnValue %168
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MaxFloat.hlsl b/tests/sksl/intrinsics/MaxFloat.hlsl
index 533ad33..a159e92 100644
--- a/tests/sksl/intrinsics/MaxFloat.hlsl
+++ b/tests/sksl/intrinsics/MaxFloat.hlsl
@@ -158,16 +158,8 @@
     {
         _166 = false;
     }
-    float4 _167 = 0.0f.xxxx;
-    if (_166)
-    {
-        _167 = _10_colorGreen;
-    }
-    else
-    {
-        _167 = _10_colorRed;
-    }
-    return _167;
+    bool4 _167 = _166.xxxx;
+    return float4(_167.x ? _10_colorGreen.x : _10_colorRed.x, _167.y ? _10_colorGreen.y : _10_colorRed.y, _167.z ? _10_colorGreen.z : _10_colorRed.z, _167.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MaxInt.asm.frag b/tests/sksl/intrinsics/MaxInt.asm.frag
index 9b9e093..c0ba91c 100644
--- a/tests/sksl/intrinsics/MaxInt.asm.frag
+++ b/tests/sksl/intrinsics/MaxInt.asm.frag
@@ -40,9 +40,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
 OpDecorate %177 RelaxedPrecision
-OpDecorate %180 RelaxedPrecision
-OpDecorate %181 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,7 +85,6 @@
 %113 = OpConstantComposite %v3int %int_50 %int_50 %int_75
 %156 = OpConstantComposite %v2int %int_0 %int_100
 %163 = OpConstantComposite %v3int %int_0 %int_100 %int_75
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -103,7 +101,6 @@
 %intGreen = OpVariable %_ptr_Function_v4int Function
 %expectedA = OpVariable %_ptr_Function_v4int Function
 %expectedB = OpVariable %_ptr_Function_v4int Function
-%171 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %30
 %35 = OpVectorTimesScalar %v4float %33 %float_100
@@ -268,19 +265,11 @@
 OpBranch %169
 %169 = OpLabel
 %170 = OpPhi %bool %false %162 %true %168
-OpSelectionMerge %175 None
-OpBranchConditional %170 %173 %174
-%173 = OpLabel
-%176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%177 = OpLoad %v4float %176
-OpStore %171 %177
-OpBranch %175
-%174 = OpLabel
-%178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%180 = OpLoad %v4float %178
-OpStore %171 %180
-OpBranch %175
-%175 = OpLabel
-%181 = OpLoad %v4float %171
-OpReturnValue %181
+%171 = OpCompositeConstruct %v4bool %170 %170 %170 %170
+%173 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%174 = OpLoad %v4float %173
+%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%177 = OpLoad %v4float %175
+%172 = OpSelect %v4float %171 %174 %177
+OpReturnValue %172
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MaxInt.hlsl b/tests/sksl/intrinsics/MaxInt.hlsl
index aca4bc2..dcd6279 100644
--- a/tests/sksl/intrinsics/MaxInt.hlsl
+++ b/tests/sksl/intrinsics/MaxInt.hlsl
@@ -165,16 +165,8 @@
     {
         _170 = false;
     }
-    float4 _171 = 0.0f.xxxx;
-    if (_170)
-    {
-        _171 = _10_colorGreen;
-    }
-    else
-    {
-        _171 = _10_colorRed;
-    }
-    return _171;
+    bool4 _171 = _170.xxxx;
+    return float4(_171.x ? _10_colorGreen.x : _10_colorRed.x, _171.y ? _10_colorGreen.y : _10_colorRed.y, _171.z ? _10_colorGreen.z : _10_colorRed.z, _171.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MaxUint.asm.frag b/tests/sksl/intrinsics/MaxUint.asm.frag
index d694030..b53f187 100644
--- a/tests/sksl/intrinsics/MaxUint.asm.frag
+++ b/tests/sksl/intrinsics/MaxUint.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
+OpDecorate %178 RelaxedPrecision
 OpDecorate %181 RelaxedPrecision
-OpDecorate %184 RelaxedPrecision
-OpDecorate %185 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %117 = OpConstantComposite %v3uint %uint_125 %uint_80 %uint_80
 %160 = OpConstantComposite %v2uint %uint_125 %uint_100
 %167 = OpConstantComposite %v3uint %uint_125 %uint_100 %uint_75
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -107,7 +105,6 @@
 %uintGreen = OpVariable %_ptr_Function_v4uint Function
 %expectedA = OpVariable %_ptr_Function_v4uint Function
 %expectedB = OpVariable %_ptr_Function_v4uint Function
-%175 = OpVariable %_ptr_Function_v4float Function
 %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %35 = OpLoad %v4float %31
 %30 = OpExtInst %v4float %1 FAbs %35
@@ -273,19 +270,11 @@
 OpBranch %173
 %173 = OpLabel
 %174 = OpPhi %bool %false %166 %true %172
-OpSelectionMerge %179 None
-OpBranchConditional %174 %177 %178
-%177 = OpLabel
-%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%181 = OpLoad %v4float %180
-OpStore %175 %181
-OpBranch %179
-%178 = OpLabel
-%182 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%184 = OpLoad %v4float %182
-OpStore %175 %184
-OpBranch %179
-%179 = OpLabel
-%185 = OpLoad %v4float %175
-OpReturnValue %185
+%175 = OpCompositeConstruct %v4bool %174 %174 %174 %174
+%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%178 = OpLoad %v4float %177
+%179 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%181 = OpLoad %v4float %179
+%176 = OpSelect %v4float %175 %178 %181
+OpReturnValue %176
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MaxUint.hlsl b/tests/sksl/intrinsics/MaxUint.hlsl
index 9a54fac..bd0a668 100644
--- a/tests/sksl/intrinsics/MaxUint.hlsl
+++ b/tests/sksl/intrinsics/MaxUint.hlsl
@@ -165,16 +165,8 @@
     {
         _174 = false;
     }
-    float4 _175 = 0.0f.xxxx;
-    if (_174)
-    {
-        _175 = _10_colorGreen;
-    }
-    else
-    {
-        _175 = _10_colorRed;
-    }
-    return _175;
+    bool4 _175 = _174.xxxx;
+    return float4(_175.x ? _10_colorGreen.x : _10_colorRed.x, _175.y ? _10_colorGreen.y : _10_colorRed.y, _175.z ? _10_colorGreen.z : _10_colorRed.z, _175.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MinFloat.asm.frag b/tests/sksl/intrinsics/MinFloat.asm.frag
index ce15098..2cc5ee0 100644
--- a/tests/sksl/intrinsics/MinFloat.asm.frag
+++ b/tests/sksl/intrinsics/MinFloat.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %131 RelaxedPrecision
 OpDecorate %132 RelaxedPrecision
 OpDecorate %143 RelaxedPrecision
-OpDecorate %171 RelaxedPrecision
-OpDecorate %174 RelaxedPrecision
-OpDecorate %175 RelaxedPrecision
+OpDecorate %169 RelaxedPrecision
+OpDecorate %172 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -88,7 +87,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%166 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %30
 OpStore %expectedB %33
 %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -252,19 +250,11 @@
 OpBranch %164
 %164 = OpLabel
 %165 = OpPhi %bool %false %157 %true %163
-OpSelectionMerge %169 None
-OpBranchConditional %165 %167 %168
-%167 = OpLabel
-%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%171 = OpLoad %v4float %170
-OpStore %166 %171
-OpBranch %169
-%168 = OpLabel
-%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%174 = OpLoad %v4float %172
-OpStore %166 %174
-OpBranch %169
-%169 = OpLabel
-%175 = OpLoad %v4float %166
-OpReturnValue %175
+%166 = OpCompositeConstruct %v4bool %165 %165 %165 %165
+%168 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%169 = OpLoad %v4float %168
+%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%172 = OpLoad %v4float %170
+%167 = OpSelect %v4float %166 %169 %172
+OpReturnValue %167
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MinFloat.hlsl b/tests/sksl/intrinsics/MinFloat.hlsl
index ec4668c..faba732 100644
--- a/tests/sksl/intrinsics/MinFloat.hlsl
+++ b/tests/sksl/intrinsics/MinFloat.hlsl
@@ -158,16 +158,8 @@
     {
         _165 = false;
     }
-    float4 _166 = 0.0f.xxxx;
-    if (_165)
-    {
-        _166 = _10_colorGreen;
-    }
-    else
-    {
-        _166 = _10_colorRed;
-    }
-    return _166;
+    bool4 _166 = _165.xxxx;
+    return float4(_166.x ? _10_colorGreen.x : _10_colorRed.x, _166.y ? _10_colorGreen.y : _10_colorRed.y, _166.z ? _10_colorGreen.z : _10_colorRed.z, _166.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MinInt.asm.frag b/tests/sksl/intrinsics/MinInt.asm.frag
index 911fe78..b696ba0 100644
--- a/tests/sksl/intrinsics/MinInt.asm.frag
+++ b/tests/sksl/intrinsics/MinInt.asm.frag
@@ -40,9 +40,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
 OpDecorate %176 RelaxedPrecision
-OpDecorate %179 RelaxedPrecision
-OpDecorate %180 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -85,7 +84,6 @@
 %106 = OpConstantComposite %v2int %int_n125 %int_0
 %113 = OpConstantComposite %v3int %int_n125 %int_0 %int_50
 %162 = OpConstantComposite %v3int %int_n125 %int_0 %int_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -102,7 +100,6 @@
 %intGreen = OpVariable %_ptr_Function_v4int Function
 %expectedA = OpVariable %_ptr_Function_v4int Function
 %expectedB = OpVariable %_ptr_Function_v4int Function
-%170 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %30
 %35 = OpVectorTimesScalar %v4float %33 %float_100
@@ -267,19 +264,11 @@
 OpBranch %168
 %168 = OpLabel
 %169 = OpPhi %bool %false %161 %true %167
-OpSelectionMerge %174 None
-OpBranchConditional %169 %172 %173
-%172 = OpLabel
-%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%176 = OpLoad %v4float %175
-OpStore %170 %176
-OpBranch %174
-%173 = OpLabel
-%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%179 = OpLoad %v4float %177
-OpStore %170 %179
-OpBranch %174
-%174 = OpLabel
-%180 = OpLoad %v4float %170
-OpReturnValue %180
+%170 = OpCompositeConstruct %v4bool %169 %169 %169 %169
+%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%173 = OpLoad %v4float %172
+%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%176 = OpLoad %v4float %174
+%171 = OpSelect %v4float %170 %173 %176
+OpReturnValue %171
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MinInt.hlsl b/tests/sksl/intrinsics/MinInt.hlsl
index c95a6e2..0d4d6ce 100644
--- a/tests/sksl/intrinsics/MinInt.hlsl
+++ b/tests/sksl/intrinsics/MinInt.hlsl
@@ -165,16 +165,8 @@
     {
         _169 = false;
     }
-    float4 _170 = 0.0f.xxxx;
-    if (_169)
-    {
-        _170 = _10_colorGreen;
-    }
-    else
-    {
-        _170 = _10_colorRed;
-    }
-    return _170;
+    bool4 _170 = _169.xxxx;
+    return float4(_170.x ? _10_colorGreen.x : _10_colorRed.x, _170.y ? _10_colorGreen.y : _10_colorRed.y, _170.z ? _10_colorGreen.z : _10_colorRed.z, _170.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MinUint.asm.frag b/tests/sksl/intrinsics/MinUint.asm.frag
index 9511ba1..9aed90e 100644
--- a/tests/sksl/intrinsics/MinUint.asm.frag
+++ b/tests/sksl/intrinsics/MinUint.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %54 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %58 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
 OpDecorate %179 RelaxedPrecision
-OpDecorate %182 RelaxedPrecision
-OpDecorate %183 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -88,7 +87,6 @@
 %115 = OpConstantComposite %v3uint %uint_50 %uint_0 %uint_50
 %158 = OpConstantComposite %v2uint %uint_0 %uint_0
 %165 = OpConstantComposite %v3uint %uint_0 %uint_0 %uint_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -105,7 +103,6 @@
 %uintGreen = OpVariable %_ptr_Function_v4uint Function
 %expectedA = OpVariable %_ptr_Function_v4uint Function
 %expectedB = OpVariable %_ptr_Function_v4uint Function
-%173 = OpVariable %_ptr_Function_v4float Function
 %31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %35 = OpLoad %v4float %31
 %30 = OpExtInst %v4float %1 FAbs %35
@@ -271,19 +268,11 @@
 OpBranch %171
 %171 = OpLabel
 %172 = OpPhi %bool %false %164 %true %170
-OpSelectionMerge %177 None
-OpBranchConditional %172 %175 %176
-%175 = OpLabel
-%178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%179 = OpLoad %v4float %178
-OpStore %173 %179
-OpBranch %177
-%176 = OpLabel
-%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%182 = OpLoad %v4float %180
-OpStore %173 %182
-OpBranch %177
-%177 = OpLabel
-%183 = OpLoad %v4float %173
-OpReturnValue %183
+%173 = OpCompositeConstruct %v4bool %172 %172 %172 %172
+%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%176 = OpLoad %v4float %175
+%177 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%179 = OpLoad %v4float %177
+%174 = OpSelect %v4float %173 %176 %179
+OpReturnValue %174
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MinUint.hlsl b/tests/sksl/intrinsics/MinUint.hlsl
index ecfebb2..7c7b54d 100644
--- a/tests/sksl/intrinsics/MinUint.hlsl
+++ b/tests/sksl/intrinsics/MinUint.hlsl
@@ -165,16 +165,8 @@
     {
         _172 = false;
     }
-    float4 _173 = 0.0f.xxxx;
-    if (_172)
-    {
-        _173 = _10_colorGreen;
-    }
-    else
-    {
-        _173 = _10_colorRed;
-    }
-    return _173;
+    bool4 _173 = _172.xxxx;
+    return float4(_173.x ? _10_colorGreen.x : _10_colorRed.x, _173.y ? _10_colorGreen.y : _10_colorRed.y, _173.z ? _10_colorGreen.z : _10_colorRed.z, _173.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MixBool.asm.frag b/tests/sksl/intrinsics/MixBool.asm.frag
index 0889f45..551dcbb 100644
--- a/tests/sksl/intrinsics/MixBool.asm.frag
+++ b/tests/sksl/intrinsics/MixBool.asm.frag
@@ -128,9 +128,8 @@
 OpDecorate %397 RelaxedPrecision
 OpDecorate %398 RelaxedPrecision
 OpDecorate %406 RelaxedPrecision
-OpDecorate %416 RelaxedPrecision
-OpDecorate %418 RelaxedPrecision
-OpDecorate %419 RelaxedPrecision
+OpDecorate %413 RelaxedPrecision
+OpDecorate %415 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -183,7 +182,6 @@
 %386 = OpConstantComposite %v2float %float_1 %float_0
 %395 = OpConstantComposite %v3float %float_1 %float_0 %float_0
 %404 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -197,7 +195,6 @@
 %25 = OpLabel
 %intGreen = OpVariable %_ptr_Function_v4int Function
 %intRed = OpVariable %_ptr_Function_v4int Function
-%410 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %30
 %35 = OpVectorTimesScalar %v4float %33 %float_100
@@ -640,19 +637,11 @@
 OpBranch %403
 %403 = OpLabel
 %409 = OpPhi %bool %false %394 %408 %402
-OpSelectionMerge %414 None
-OpBranchConditional %409 %412 %413
-%412 = OpLabel
-%415 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%416 = OpLoad %v4float %415
-OpStore %410 %416
-OpBranch %414
-%413 = OpLabel
-%417 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%418 = OpLoad %v4float %417
-OpStore %410 %418
-OpBranch %414
-%414 = OpLabel
-%419 = OpLoad %v4float %410
-OpReturnValue %419
+%410 = OpCompositeConstruct %v4bool %409 %409 %409 %409
+%412 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%413 = OpLoad %v4float %412
+%414 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%415 = OpLoad %v4float %414
+%411 = OpSelect %v4float %410 %413 %415
+OpReturnValue %411
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MixBool.hlsl b/tests/sksl/intrinsics/MixBool.hlsl
index e6886c1..56e1a67 100644
--- a/tests/sksl/intrinsics/MixBool.hlsl
+++ b/tests/sksl/intrinsics/MixBool.hlsl
@@ -332,16 +332,8 @@
     {
         _409 = false;
     }
-    float4 _410 = 0.0f.xxxx;
-    if (_409)
-    {
-        _410 = _10_colorGreen;
-    }
-    else
-    {
-        _410 = _10_colorRed;
-    }
-    return _410;
+    bool4 _410 = _409.xxxx;
+    return float4(_410.x ? _10_colorGreen.x : _10_colorRed.x, _410.y ? _10_colorGreen.y : _10_colorRed.y, _410.z ? _10_colorGreen.z : _10_colorRed.z, _410.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MixFloatES2.asm.frag b/tests/sksl/intrinsics/MixFloatES2.asm.frag
index 8f9b750..272d0a0 100644
--- a/tests/sksl/intrinsics/MixFloatES2.asm.frag
+++ b/tests/sksl/intrinsics/MixFloatES2.asm.frag
@@ -78,9 +78,8 @@
 OpDecorate %207 RelaxedPrecision
 OpDecorate %218 RelaxedPrecision
 OpDecorate %225 RelaxedPrecision
+OpDecorate %235 RelaxedPrecision
 OpDecorate %237 RelaxedPrecision
-OpDecorate %239 RelaxedPrecision
-OpDecorate %240 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -148,7 +147,6 @@
 %25 = OpLabel
 %expectedBW = OpVariable %_ptr_Function_v4float Function
 %expectedWT = OpVariable %_ptr_Function_v4float Function
-%232 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedBW %30
 OpStore %expectedWT %33
 %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -375,19 +373,11 @@
 OpBranch %230
 %230 = OpLabel
 %231 = OpPhi %bool %false %223 %true %229
-OpSelectionMerge %235 None
-OpBranchConditional %231 %233 %234
-%233 = OpLabel
-%236 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%232 = OpCompositeConstruct %v4bool %231 %231 %231 %231
+%234 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%235 = OpLoad %v4float %234
+%236 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %237 = OpLoad %v4float %236
-OpStore %232 %237
-OpBranch %235
-%234 = OpLabel
-%238 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%239 = OpLoad %v4float %238
-OpStore %232 %239
-OpBranch %235
-%235 = OpLabel
-%240 = OpLoad %v4float %232
-OpReturnValue %240
+%233 = OpSelect %v4float %232 %235 %237
+OpReturnValue %233
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MixFloatES2.hlsl b/tests/sksl/intrinsics/MixFloatES2.hlsl
index bdd8ed4..e557efb 100644
--- a/tests/sksl/intrinsics/MixFloatES2.hlsl
+++ b/tests/sksl/intrinsics/MixFloatES2.hlsl
@@ -200,16 +200,8 @@
     {
         _231 = false;
     }
-    float4 _232 = 0.0f.xxxx;
-    if (_231)
-    {
-        _232 = _10_colorGreen;
-    }
-    else
-    {
-        _232 = _10_colorRed;
-    }
-    return _232;
+    bool4 _232 = _231.xxxx;
+    return float4(_232.x ? _10_colorGreen.x : _10_colorRed.x, _232.y ? _10_colorGreen.y : _10_colorRed.y, _232.z ? _10_colorGreen.z : _10_colorRed.z, _232.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/MixFloatES3.asm.frag b/tests/sksl/intrinsics/MixFloatES3.asm.frag
index d2fb455..bb5a97e 100644
--- a/tests/sksl/intrinsics/MixFloatES3.asm.frag
+++ b/tests/sksl/intrinsics/MixFloatES3.asm.frag
@@ -123,9 +123,8 @@
 OpDecorate %230 RelaxedPrecision
 OpDecorate %231 RelaxedPrecision
 OpDecorate %232 RelaxedPrecision
+OpDecorate %239 RelaxedPrecision
 OpDecorate %242 RelaxedPrecision
-OpDecorate %245 RelaxedPrecision
-OpDecorate %246 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -156,7 +155,6 @@
 %v3float = OpTypeVector %float 3
 %v3bool = OpTypeVector %bool 3
 %int_4 = OpConstant %int 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -171,7 +169,6 @@
 %25 = OpLabel
 %FTFT = OpVariable %_ptr_Function_v4bool Function
 %TFTF = OpVariable %_ptr_Function_v4bool Function
-%236 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpCompositeExtract %float %33 0
@@ -390,19 +387,11 @@
 OpBranch %216
 %216 = OpLabel
 %235 = OpPhi %bool %false %189 %234 %215
-OpSelectionMerge %240 None
-OpBranchConditional %235 %238 %239
-%238 = OpLabel
-%241 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%242 = OpLoad %v4float %241
-OpStore %236 %242
-OpBranch %240
-%239 = OpLabel
-%243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%245 = OpLoad %v4float %243
-OpStore %236 %245
-OpBranch %240
-%240 = OpLabel
-%246 = OpLoad %v4float %236
-OpReturnValue %246
+%236 = OpCompositeConstruct %v4bool %235 %235 %235 %235
+%238 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%239 = OpLoad %v4float %238
+%240 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%242 = OpLoad %v4float %240
+%237 = OpSelect %v4float %236 %239 %242
+OpReturnValue %237
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MixFloatES3.hlsl b/tests/sksl/intrinsics/MixFloatES3.hlsl
index 54d0d7c..9a27bcf 100644
--- a/tests/sksl/intrinsics/MixFloatES3.hlsl
+++ b/tests/sksl/intrinsics/MixFloatES3.hlsl
@@ -100,16 +100,8 @@
     {
         _235 = false;
     }
-    float4 _236 = 0.0f.xxxx;
-    if (_235)
-    {
-        _236 = _10_colorGreen;
-    }
-    else
-    {
-        _236 = _10_colorRed;
-    }
-    return _236;
+    bool4 _236 = _235.xxxx;
+    return float4(_236.x ? _10_colorGreen.x : _10_colorRed.x, _236.y ? _10_colorGreen.y : _10_colorRed.y, _236.z ? _10_colorGreen.z : _10_colorRed.z, _236.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Mod.asm.frag b/tests/sksl/intrinsics/Mod.asm.frag
index cf077a9..313fd4b 100644
--- a/tests/sksl/intrinsics/Mod.asm.frag
+++ b/tests/sksl/intrinsics/Mod.asm.frag
@@ -60,9 +60,8 @@
 OpDecorate %143 RelaxedPrecision
 OpDecorate %153 RelaxedPrecision
 OpDecorate %160 RelaxedPrecision
-OpDecorate %173 RelaxedPrecision
-OpDecorate %176 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -118,7 +117,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%167 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %30
 OpStore %expectedB %33
 %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -282,19 +280,11 @@
 OpBranch %165
 %165 = OpLabel
 %166 = OpPhi %bool %false %158 %true %164
-OpSelectionMerge %170 None
-OpBranchConditional %166 %168 %169
-%168 = OpLabel
-%171 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%173 = OpLoad %v4float %171
-OpStore %167 %173
-OpBranch %170
-%169 = OpLabel
-%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%176 = OpLoad %v4float %174
-OpStore %167 %176
-OpBranch %170
-%170 = OpLabel
-%177 = OpLoad %v4float %167
-OpReturnValue %177
+%167 = OpCompositeConstruct %v4bool %166 %166 %166 %166
+%169 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%171 = OpLoad %v4float %169
+%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%174 = OpLoad %v4float %172
+%168 = OpSelect %v4float %167 %171 %174
+OpReturnValue %168
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Mod.hlsl b/tests/sksl/intrinsics/Mod.hlsl
index 3b46785..2c00d38 100644
--- a/tests/sksl/intrinsics/Mod.hlsl
+++ b/tests/sksl/intrinsics/Mod.hlsl
@@ -179,16 +179,8 @@
     {
         _166 = false;
     }
-    float4 _167 = 0.0f.xxxx;
-    if (_166)
-    {
-        _167 = _10_colorGreen;
-    }
-    else
-    {
-        _167 = _10_colorRed;
-    }
-    return _167;
+    bool4 _167 = _166.xxxx;
+    return float4(_167.x ? _10_colorGreen.x : _10_colorRed.x, _167.y ? _10_colorGreen.y : _10_colorRed.y, _167.z ? _10_colorGreen.z : _10_colorRed.z, _167.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Modf.asm.frag b/tests/sksl/intrinsics/Modf.asm.frag
index 1e77b7c..5435166 100644
--- a/tests/sksl/intrinsics/Modf.asm.frag
+++ b/tests/sksl/intrinsics/Modf.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
 OpDecorate %127 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
 OpDecorate %134 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -97,7 +96,6 @@
 %64 = OpVariable %_ptr_Function_v2float Function
 %90 = OpVariable %_ptr_Function_v3float Function
 %113 = OpVariable %_ptr_Function_v4float Function
-%128 = OpVariable %_ptr_Function_v4float Function
 OpStore %value %32
 OpStore %ok %37
 %41 = OpAccessChain %_ptr_Function_float %whole %int_0
@@ -187,19 +185,11 @@
 OpStore %124 %123
 %127 = OpLoad %v4bool %ok
 %126 = OpAll %bool %127
-OpSelectionMerge %131 None
-OpBranchConditional %126 %129 %130
-%129 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%134 = OpLoad %v4float %132
-OpStore %128 %134
-OpBranch %131
-%130 = OpLabel
-%135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%136 = OpLoad %v4float %135
-OpStore %128 %136
-OpBranch %131
-%131 = OpLabel
-%137 = OpLoad %v4float %128
-OpReturnValue %137
+%128 = OpCompositeConstruct %v4bool %126 %126 %126 %126
+%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%132 = OpLoad %v4float %130
+%133 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%134 = OpLoad %v4float %133
+%129 = OpSelect %v4float %128 %132 %134
+OpReturnValue %129
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Modf.hlsl b/tests/sksl/intrinsics/Modf.hlsl
index b011bae..a99b10c 100644
--- a/tests/sksl/intrinsics/Modf.hlsl
+++ b/tests/sksl/intrinsics/Modf.hlsl
@@ -78,16 +78,8 @@
         _123 = false;
     }
     ok.w = _123;
-    float4 _128 = 0.0f.xxxx;
-    if (all(ok))
-    {
-        _128 = _10_colorGreen;
-    }
-    else
-    {
-        _128 = _10_colorRed;
-    }
-    return _128;
+    bool4 _128 = all(ok).xxxx;
+    return float4(_128.x ? _10_colorGreen.x : _10_colorRed.x, _128.y ? _10_colorGreen.y : _10_colorRed.y, _128.z ? _10_colorGreen.z : _10_colorRed.z, _128.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Normalize.asm.frag b/tests/sksl/intrinsics/Normalize.asm.frag
index f24d129..8cf770f 100644
--- a/tests/sksl/intrinsics/Normalize.asm.frag
+++ b/tests/sksl/intrinsics/Normalize.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %66 RelaxedPrecision
 OpDecorate %78 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -89,7 +88,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expectedVec = OpVariable %_ptr_Function_v4float Function
-%92 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedVec %29
 %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %36 = OpLoad %v4float %32
@@ -163,19 +161,11 @@
 OpBranch %90
 %90 = OpLabel
 %91 = OpPhi %bool %false %83 %true %89
-OpSelectionMerge %95 None
-OpBranchConditional %91 %93 %94
-%93 = OpLabel
-%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%98 = OpLoad %v4float %96
-OpStore %92 %98
-OpBranch %95
-%94 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%101 = OpLoad %v4float %99
-OpStore %92 %101
-OpBranch %95
-%95 = OpLabel
-%102 = OpLoad %v4float %92
-OpReturnValue %102
+%92 = OpCompositeConstruct %v4bool %91 %91 %91 %91
+%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%96 = OpLoad %v4float %94
+%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%99 = OpLoad %v4float %97
+%93 = OpSelect %v4float %92 %96 %99
+OpReturnValue %93
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Normalize.hlsl b/tests/sksl/intrinsics/Normalize.hlsl
index fa5b8af..a6d340b 100644
--- a/tests/sksl/intrinsics/Normalize.hlsl
+++ b/tests/sksl/intrinsics/Normalize.hlsl
@@ -82,16 +82,8 @@
     {
         _91 = false;
     }
-    float4 _92 = 0.0f.xxxx;
-    if (_91)
-    {
-        _92 = _10_colorGreen;
-    }
-    else
-    {
-        _92 = _10_colorRed;
-    }
-    return _92;
+    bool4 _92 = _91.xxxx;
+    return float4(_92.x ? _10_colorGreen.x : _10_colorRed.x, _92.y ? _10_colorGreen.y : _10_colorRed.y, _92.z ? _10_colorGreen.z : _10_colorRed.z, _92.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Not.asm.frag b/tests/sksl/intrinsics/Not.asm.frag
index 3a8121c..0e9bf19 100644
--- a/tests/sksl/intrinsics/Not.asm.frag
+++ b/tests/sksl/intrinsics/Not.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %36 RelaxedPrecision
 OpDecorate %38 RelaxedPrecision
 OpDecorate %40 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
 OpDecorate %91 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -60,7 +59,6 @@
 %v3bool = OpTypeVector %bool 3
 %70 = OpConstantComposite %v2bool %true %false
 %77 = OpConstantComposite %v3bool %true %false %true
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -75,7 +73,6 @@
 %25 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4bool Function
 %expected = OpVariable %_ptr_Function_v4bool Function
-%85 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpCompositeExtract %float %33 0
@@ -138,19 +135,11 @@
 OpBranch %83
 %83 = OpLabel
 %84 = OpPhi %bool %false %76 %true %82
-OpSelectionMerge %89 None
-OpBranchConditional %84 %87 %88
-%87 = OpLabel
-%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%91 = OpLoad %v4float %90
-OpStore %85 %91
-OpBranch %89
-%88 = OpLabel
-%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%94 = OpLoad %v4float %92
-OpStore %85 %94
-OpBranch %89
-%89 = OpLabel
-%95 = OpLoad %v4float %85
-OpReturnValue %95
+%85 = OpCompositeConstruct %v4bool %84 %84 %84 %84
+%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%88 = OpLoad %v4float %87
+%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%91 = OpLoad %v4float %89
+%86 = OpSelect %v4float %85 %88 %91
+OpReturnValue %86
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Not.hlsl b/tests/sksl/intrinsics/Not.hlsl
index 10ef8f7..410daa5 100644
--- a/tests/sksl/intrinsics/Not.hlsl
+++ b/tests/sksl/intrinsics/Not.hlsl
@@ -67,16 +67,8 @@
     {
         _84 = false;
     }
-    float4 _85 = 0.0f.xxxx;
-    if (_84)
-    {
-        _85 = _10_colorGreen;
-    }
-    else
-    {
-        _85 = _10_colorRed;
-    }
-    return _85;
+    bool4 _85 = _84.xxxx;
+    return float4(_85.x ? _10_colorGreen.x : _10_colorRed.x, _85.y ? _10_colorGreen.y : _10_colorRed.y, _85.z ? _10_colorGreen.z : _10_colorRed.z, _85.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/OuterProduct.asm.frag b/tests/sksl/intrinsics/OuterProduct.asm.frag
index 3d2bd7f..41357b3 100644
--- a/tests/sksl/intrinsics/OuterProduct.asm.frag
+++ b/tests/sksl/intrinsics/OuterProduct.asm.frag
@@ -36,9 +36,8 @@
 OpDecorate %123 RelaxedPrecision
 OpDecorate %159 RelaxedPrecision
 OpDecorate %175 RelaxedPrecision
-OpDecorate %203 RelaxedPrecision
-OpDecorate %205 RelaxedPrecision
-OpDecorate %206 RelaxedPrecision
+OpDecorate %200 RelaxedPrecision
+OpDecorate %202 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -116,7 +115,6 @@
 %178 = OpConstantComposite %v2float %float_0_75 %float_1_5
 %179 = OpConstantComposite %v2float %float_2_25 %float_4_5
 %180 = OpConstantComposite %mat4v2float %177 %22 %178 %179
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %19
 %20 = OpLabel
 %23 = OpVariable %_ptr_Function_v2float Function
@@ -128,7 +126,6 @@
 %main = OpFunction %v4float None %26
 %27 = OpFunctionParameter %_ptr_Function_v2float
 %28 = OpLabel
-%197 = OpVariable %_ptr_Function_v4float Function
 %31 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
 %36 = OpAccessChain %_ptr_Uniform_v2float %31 %int_0
 %38 = OpLoad %v2float %36
@@ -255,19 +252,11 @@
 OpBranch %172
 %172 = OpLabel
 %196 = OpPhi %bool %false %156 %195 %171
-OpSelectionMerge %201 None
-OpBranchConditional %196 %199 %200
-%199 = OpLabel
-%202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%203 = OpLoad %v4float %202
-OpStore %197 %203
-OpBranch %201
-%200 = OpLabel
-%204 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%205 = OpLoad %v4float %204
-OpStore %197 %205
-OpBranch %201
-%201 = OpLabel
-%206 = OpLoad %v4float %197
-OpReturnValue %206
+%197 = OpCompositeConstruct %v4bool %196 %196 %196 %196
+%199 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%200 = OpLoad %v4float %199
+%201 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%202 = OpLoad %v4float %201
+%198 = OpSelect %v4float %197 %200 %202
+OpReturnValue %198
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/OuterProduct.hlsl b/tests/sksl/intrinsics/OuterProduct.hlsl
index db9fb31..0575f48 100644
--- a/tests/sksl/intrinsics/OuterProduct.hlsl
+++ b/tests/sksl/intrinsics/OuterProduct.hlsl
@@ -86,16 +86,8 @@
     {
         _196 = false;
     }
-    float4 _197 = 0.0f.xxxx;
-    if (_196)
-    {
-        _197 = _10_colorGreen;
-    }
-    else
-    {
-        _197 = _10_colorRed;
-    }
-    return _197;
+    bool4 _197 = _196.xxxx;
+    return float4(_197.x ? _10_colorGreen.x : _10_colorRed.x, _197.y ? _10_colorGreen.y : _10_colorRed.y, _197.z ? _10_colorGreen.z : _10_colorRed.z, _197.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/PackHalf2x16.asm.frag b/tests/sksl/intrinsics/PackHalf2x16.asm.frag
index cb540c8..a8269d6 100644
--- a/tests/sksl/intrinsics/PackHalf2x16.asm.frag
+++ b/tests/sksl/intrinsics/PackHalf2x16.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %64 RelaxedPrecision
-OpDecorate %67 RelaxedPrecision
-OpDecorate %68 RelaxedPrecision
+OpDecorate %62 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -57,7 +56,7 @@
 %float_0_75 = OpConstant %float 0.75
 %float_2_25 = OpConstant %float 2.25
 %53 = OpConstantComposite %v2float %float_0_75 %float_2_25
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
@@ -73,7 +72,6 @@
 %25 = OpLabel
 %xy = OpVariable %_ptr_Function_uint Function
 %zw = OpVariable %_ptr_Function_uint Function
-%57 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %34 = OpLoad %v4float %30
 %35 = OpVectorShuffle %v2float %34 %34 0 1
@@ -96,19 +94,11 @@
 OpBranch %49
 %49 = OpLabel
 %56 = OpPhi %bool %false %25 %55 %48
-OpSelectionMerge %61 None
-OpBranchConditional %56 %59 %60
-%59 = OpLabel
-%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%64 = OpLoad %v4float %62
-OpStore %57 %64
-OpBranch %61
-%60 = OpLabel
-%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%67 = OpLoad %v4float %65
-OpStore %57 %67
-OpBranch %61
-%61 = OpLabel
-%68 = OpLoad %v4float %57
-OpReturnValue %68
+%58 = OpCompositeConstruct %v4bool %56 %56 %56 %56
+%60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%62 = OpLoad %v4float %60
+%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%65 = OpLoad %v4float %63
+%59 = OpSelect %v4float %58 %62 %65
+OpReturnValue %59
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/PackHalf2x16.hlsl b/tests/sksl/intrinsics/PackHalf2x16.hlsl
index e40a51a..83249d2 100644
--- a/tests/sksl/intrinsics/PackHalf2x16.hlsl
+++ b/tests/sksl/intrinsics/PackHalf2x16.hlsl
@@ -41,16 +41,8 @@
     {
         _56 = false;
     }
-    float4 _57 = 0.0f.xxxx;
-    if (_56)
-    {
-        _57 = _10_colorGreen;
-    }
-    else
-    {
-        _57 = _10_colorRed;
-    }
-    return _57;
+    bool4 _58 = _56.xxxx;
+    return float4(_58.x ? _10_colorGreen.x : _10_colorRed.x, _58.y ? _10_colorGreen.y : _10_colorRed.y, _58.z ? _10_colorGreen.z : _10_colorRed.z, _58.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/PackSnorm2x16.asm.frag b/tests/sksl/intrinsics/PackSnorm2x16.asm.frag
index c164cda..ec67778 100644
--- a/tests/sksl/intrinsics/PackSnorm2x16.asm.frag
+++ b/tests/sksl/intrinsics/PackSnorm2x16.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %70 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %74 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -59,7 +58,7 @@
 %float_0_75 = OpConstant %float 0.75
 %float_1 = OpConstant %float 1
 %60 = OpConstantComposite %v2float %float_0_75 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
@@ -75,7 +74,6 @@
 %25 = OpLabel
 %xy = OpVariable %_ptr_Function_uint Function
 %zw = OpVariable %_ptr_Function_uint Function
-%63 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %34 = OpLoad %v4float %30
 %35 = OpVectorShuffle %v2float %34 %34 0 1
@@ -102,19 +100,11 @@
 OpBranch %53
 %53 = OpLabel
 %62 = OpPhi %bool %false %25 %54 %52
-OpSelectionMerge %67 None
-OpBranchConditional %62 %65 %66
-%65 = OpLabel
-%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%70 = OpLoad %v4float %68
-OpStore %63 %70
-OpBranch %67
-%66 = OpLabel
-%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%73 = OpLoad %v4float %71
-OpStore %63 %73
-OpBranch %67
-%67 = OpLabel
-%74 = OpLoad %v4float %63
-OpReturnValue %74
+%64 = OpCompositeConstruct %v4bool %62 %62 %62 %62
+%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpLoad %v4float %66
+%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%71 = OpLoad %v4float %69
+%65 = OpSelect %v4float %64 %68 %71
+OpReturnValue %65
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/PackSnorm2x16.hlsl b/tests/sksl/intrinsics/PackSnorm2x16.hlsl
index c16e9d8..123f2fe 100644
--- a/tests/sksl/intrinsics/PackSnorm2x16.hlsl
+++ b/tests/sksl/intrinsics/PackSnorm2x16.hlsl
@@ -43,16 +43,8 @@
     {
         _62 = false;
     }
-    float4 _63 = 0.0f.xxxx;
-    if (_62)
-    {
-        _63 = _10_colorGreen;
-    }
-    else
-    {
-        _63 = _10_colorRed;
-    }
-    return _63;
+    bool4 _64 = _62.xxxx;
+    return float4(_64.x ? _10_colorGreen.x : _10_colorRed.x, _64.y ? _10_colorGreen.y : _10_colorRed.y, _64.z ? _10_colorGreen.z : _10_colorRed.z, _64.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/PackUnorm2x16.asm.frag b/tests/sksl/intrinsics/PackUnorm2x16.asm.frag
index b12bca3..532225b 100644
--- a/tests/sksl/intrinsics/PackUnorm2x16.asm.frag
+++ b/tests/sksl/intrinsics/PackUnorm2x16.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %67 RelaxedPrecision
-OpDecorate %70 RelaxedPrecision
-OpDecorate %71 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -57,7 +56,7 @@
 %float_0_75 = OpConstant %float 0.75
 %float_1 = OpConstant %float 1
 %57 = OpConstantComposite %v2float %float_0_75 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
@@ -73,7 +72,6 @@
 %25 = OpLabel
 %xy = OpVariable %_ptr_Function_uint Function
 %zw = OpVariable %_ptr_Function_uint Function
-%60 = OpVariable %_ptr_Function_v4float Function
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %34 = OpLoad %v4float %30
 %35 = OpVectorShuffle %v2float %34 %34 0 1
@@ -99,19 +97,11 @@
 OpBranch %50
 %50 = OpLabel
 %59 = OpPhi %bool %false %25 %51 %49
-OpSelectionMerge %64 None
-OpBranchConditional %59 %62 %63
-%62 = OpLabel
-%65 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%67 = OpLoad %v4float %65
-OpStore %60 %67
-OpBranch %64
-%63 = OpLabel
-%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%70 = OpLoad %v4float %68
-OpStore %60 %70
-OpBranch %64
-%64 = OpLabel
-%71 = OpLoad %v4float %60
-OpReturnValue %71
+%61 = OpCompositeConstruct %v4bool %59 %59 %59 %59
+%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%65 = OpLoad %v4float %63
+%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%68 = OpLoad %v4float %66
+%62 = OpSelect %v4float %61 %65 %68
+OpReturnValue %62
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/PackUnorm2x16.hlsl b/tests/sksl/intrinsics/PackUnorm2x16.hlsl
index 7297d99..b4dbd2b 100644
--- a/tests/sksl/intrinsics/PackUnorm2x16.hlsl
+++ b/tests/sksl/intrinsics/PackUnorm2x16.hlsl
@@ -42,16 +42,8 @@
     {
         _59 = false;
     }
-    float4 _60 = 0.0f.xxxx;
-    if (_59)
-    {
-        _60 = _10_colorGreen;
-    }
-    else
-    {
-        _60 = _10_colorRed;
-    }
-    return _60;
+    bool4 _61 = _59.xxxx;
+    return float4(_61.x ? _10_colorGreen.x : _10_colorRed.x, _61.y ? _10_colorGreen.y : _10_colorRed.y, _61.z ? _10_colorGreen.z : _10_colorRed.z, _61.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Pow.asm.frag b/tests/sksl/intrinsics/Pow.asm.frag
index 46e74b1..2cd0fad 100644
--- a/tests/sksl/intrinsics/Pow.asm.frag
+++ b/tests/sksl/intrinsics/Pow.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %73 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %112 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -99,7 +98,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%105 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %31
 %34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %34
@@ -176,19 +174,11 @@
 OpBranch %100
 %100 = OpLabel
 %104 = OpPhi %bool %false %93 %103 %99
-OpSelectionMerge %108 None
-OpBranchConditional %104 %106 %107
-%106 = OpLabel
-%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%111 = OpLoad %v4float %109
-OpStore %105 %111
-OpBranch %108
-%107 = OpLabel
-%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%114 = OpLoad %v4float %112
-OpStore %105 %114
-OpBranch %108
-%108 = OpLabel
-%115 = OpLoad %v4float %105
-OpReturnValue %115
+%105 = OpCompositeConstruct %v4bool %104 %104 %104 %104
+%107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%109 = OpLoad %v4float %107
+%110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%112 = OpLoad %v4float %110
+%106 = OpSelect %v4float %105 %109 %112
+OpReturnValue %106
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Pow.hlsl b/tests/sksl/intrinsics/Pow.hlsl
index 705f896..0a6661a 100644
--- a/tests/sksl/intrinsics/Pow.hlsl
+++ b/tests/sksl/intrinsics/Pow.hlsl
@@ -82,16 +82,8 @@
     {
         _104 = false;
     }
-    float4 _105 = 0.0f.xxxx;
-    if (_104)
-    {
-        _105 = _10_colorGreen;
-    }
-    else
-    {
-        _105 = _10_colorRed;
-    }
-    return _105;
+    bool4 _105 = _104.xxxx;
+    return float4(_105.x ? _10_colorGreen.x : _10_colorRed.x, _105.y ? _10_colorGreen.y : _10_colorRed.y, _105.z ? _10_colorGreen.z : _10_colorRed.z, _105.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Radians.asm.frag b/tests/sksl/intrinsics/Radians.asm.frag
index ba17bb5..f636bbe 100644
--- a/tests/sksl/intrinsics/Radians.asm.frag
+++ b/tests/sksl/intrinsics/Radians.asm.frag
@@ -23,9 +23,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %87 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -61,7 +60,6 @@
 %78 = OpConstantComposite %v4float %float_n0_021816615 %float_0 %float_0_0130899698 %float_0_0392699093
 %80 = OpConstantComposite %v4float %float_0_000500000024 %float_0_000500000024 %float_0_000500000024 %float_0_000500000024
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -75,7 +73,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%83 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpCompositeExtract %float %33 0
@@ -124,19 +121,11 @@
 OpBranch %70
 %70 = OpLabel
 %82 = OpPhi %bool %false %54 %71 %69
-OpSelectionMerge %87 None
-OpBranchConditional %82 %85 %86
-%85 = OpLabel
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%83 = OpCompositeConstruct %v4bool %82 %82 %82 %82
+%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%87 = OpLoad %v4float %85
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %90 = OpLoad %v4float %88
-OpStore %83 %90
-OpBranch %87
-%86 = OpLabel
-%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %91
-OpStore %83 %93
-OpBranch %87
-%87 = OpLabel
-%94 = OpLoad %v4float %83
-OpReturnValue %94
+%84 = OpSelect %v4float %83 %87 %90
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Radians.hlsl b/tests/sksl/intrinsics/Radians.hlsl
index 9c8b5b1..f17a027 100644
--- a/tests/sksl/intrinsics/Radians.hlsl
+++ b/tests/sksl/intrinsics/Radians.hlsl
@@ -45,16 +45,8 @@
     {
         _82 = false;
     }
-    float4 _83 = 0.0f.xxxx;
-    if (_82)
-    {
-        _83 = _10_colorGreen;
-    }
-    else
-    {
-        _83 = _10_colorRed;
-    }
-    return _83;
+    bool4 _83 = _82.xxxx;
+    return float4(_83.x ? _10_colorGreen.x : _10_colorRed.x, _83.y ? _10_colorGreen.y : _10_colorRed.y, _83.z ? _10_colorGreen.z : _10_colorRed.z, _83.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Reflect.asm.frag b/tests/sksl/intrinsics/Reflect.asm.frag
index 70c1350..8c8a4d4 100644
--- a/tests/sksl/intrinsics/Reflect.asm.frag
+++ b/tests/sksl/intrinsics/Reflect.asm.frag
@@ -53,9 +53,8 @@
 OpDecorate %88 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
 OpDecorate %92 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -116,7 +115,6 @@
 %expectedXY = OpVariable %_ptr_Function_v2float Function
 %expectedXYZ = OpVariable %_ptr_Function_v3float Function
 %expectedXYZW = OpVariable %_ptr_Function_v4float Function
-%110 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedX %float_n49
 OpStore %expectedXY %32
 OpStore %expectedXYZ %39
@@ -196,19 +194,11 @@
 OpBranch %108
 %108 = OpLabel
 %109 = OpPhi %bool %false %105 %true %107
-OpSelectionMerge %113 None
-OpBranchConditional %109 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%116 = OpLoad %v4float %114
-OpStore %110 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %110 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %110
-OpReturnValue %120
+%110 = OpCompositeConstruct %v4bool %109 %109 %109 %109
+%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%114 = OpLoad %v4float %112
+%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%117 = OpLoad %v4float %115
+%111 = OpSelect %v4float %110 %114 %117
+OpReturnValue %111
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Reflect.hlsl b/tests/sksl/intrinsics/Reflect.hlsl
index 21559d6..c1101f0 100644
--- a/tests/sksl/intrinsics/Reflect.hlsl
+++ b/tests/sksl/intrinsics/Reflect.hlsl
@@ -91,16 +91,8 @@
     {
         _109 = false;
     }
-    float4 _110 = 0.0f.xxxx;
-    if (_109)
-    {
-        _110 = _10_colorGreen;
-    }
-    else
-    {
-        _110 = _10_colorRed;
-    }
-    return _110;
+    bool4 _110 = _109.xxxx;
+    return float4(_110.x ? _10_colorGreen.x : _10_colorRed.x, _110.y ? _10_colorGreen.y : _10_colorRed.y, _110.z ? _10_colorGreen.z : _10_colorRed.z, _110.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Round.asm.frag b/tests/sksl/intrinsics/Round.asm.frag
index c7deccd..de3b436 100644
--- a/tests/sksl/intrinsics/Round.asm.frag
+++ b/tests/sksl/intrinsics/Round.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
 OpDecorate %64 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
 OpDecorate %78 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -69,7 +68,6 @@
 %float_2 = OpConstant %float 2
 %66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -83,7 +81,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%71 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -124,19 +121,11 @@
 OpBranch %61
 %61 = OpLabel
 %70 = OpPhi %bool %false %48 %69 %60
-OpSelectionMerge %75 None
-OpBranchConditional %70 %73 %74
-%73 = OpLabel
-%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%71 = OpCompositeConstruct %v4bool %70 %70 %70 %70
+%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%75 = OpLoad %v4float %73
+%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %78 = OpLoad %v4float %76
-OpStore %71 %78
-OpBranch %75
-%74 = OpLabel
-%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%81 = OpLoad %v4float %79
-OpStore %71 %81
-OpBranch %75
-%75 = OpLabel
-%82 = OpLoad %v4float %71
-OpReturnValue %82
+%72 = OpSelect %v4float %71 %75 %78
+OpReturnValue %72
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Round.hlsl b/tests/sksl/intrinsics/Round.hlsl
index 4479268..ca685c2 100644
--- a/tests/sksl/intrinsics/Round.hlsl
+++ b/tests/sksl/intrinsics/Round.hlsl
@@ -45,16 +45,8 @@
     {
         _70 = false;
     }
-    float4 _71 = 0.0f.xxxx;
-    if (_70)
-    {
-        _71 = _10_colorGreen;
-    }
-    else
-    {
-        _71 = _10_colorRed;
-    }
-    return _71;
+    bool4 _71 = _70.xxxx;
+    return float4(_71.x ? _10_colorGreen.x : _10_colorRed.x, _71.y ? _10_colorGreen.y : _10_colorRed.y, _71.z ? _10_colorGreen.z : _10_colorRed.z, _71.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/RoundEven.asm.frag b/tests/sksl/intrinsics/RoundEven.asm.frag
index cc14991..4f637d1 100644
--- a/tests/sksl/intrinsics/RoundEven.asm.frag
+++ b/tests/sksl/intrinsics/RoundEven.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
 OpDecorate %64 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
 OpDecorate %78 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -69,7 +68,6 @@
 %float_2 = OpConstant %float 2
 %66 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_2
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -83,7 +81,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%71 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -124,19 +121,11 @@
 OpBranch %61
 %61 = OpLabel
 %70 = OpPhi %bool %false %48 %69 %60
-OpSelectionMerge %75 None
-OpBranchConditional %70 %73 %74
-%73 = OpLabel
-%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%71 = OpCompositeConstruct %v4bool %70 %70 %70 %70
+%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%75 = OpLoad %v4float %73
+%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %78 = OpLoad %v4float %76
-OpStore %71 %78
-OpBranch %75
-%74 = OpLabel
-%79 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%81 = OpLoad %v4float %79
-OpStore %71 %81
-OpBranch %75
-%75 = OpLabel
-%82 = OpLoad %v4float %71
-OpReturnValue %82
+%72 = OpSelect %v4float %71 %75 %78
+OpReturnValue %72
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/RoundEven.hlsl b/tests/sksl/intrinsics/RoundEven.hlsl
index 4479268..ca685c2 100644
--- a/tests/sksl/intrinsics/RoundEven.hlsl
+++ b/tests/sksl/intrinsics/RoundEven.hlsl
@@ -45,16 +45,8 @@
     {
         _70 = false;
     }
-    float4 _71 = 0.0f.xxxx;
-    if (_70)
-    {
-        _71 = _10_colorGreen;
-    }
-    else
-    {
-        _71 = _10_colorRed;
-    }
-    return _71;
+    bool4 _71 = _70.xxxx;
+    return float4(_71.x ? _10_colorGreen.x : _10_colorRed.x, _71.y ? _10_colorGreen.y : _10_colorRed.y, _71.z ? _10_colorGreen.z : _10_colorRed.z, _71.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Saturate.asm.frag b/tests/sksl/intrinsics/Saturate.asm.frag
index 41b89f5..fd406dc 100644
--- a/tests/sksl/intrinsics/Saturate.asm.frag
+++ b/tests/sksl/intrinsics/Saturate.asm.frag
@@ -37,9 +37,8 @@
 OpDecorate %70 RelaxedPrecision
 OpDecorate %83 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
-OpDecorate %107 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%97 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %30
 %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %37 = OpLoad %v4float %33
@@ -164,19 +162,11 @@
 OpBranch %95
 %95 = OpLabel
 %96 = OpPhi %bool %false %88 %true %94
-OpSelectionMerge %100 None
-OpBranchConditional %96 %98 %99
-%98 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%103 = OpLoad %v4float %101
-OpStore %97 %103
-OpBranch %100
-%99 = OpLabel
-%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%106 = OpLoad %v4float %104
-OpStore %97 %106
-OpBranch %100
-%100 = OpLabel
-%107 = OpLoad %v4float %97
-OpReturnValue %107
+%97 = OpCompositeConstruct %v4bool %96 %96 %96 %96
+%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%101 = OpLoad %v4float %99
+%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%104 = OpLoad %v4float %102
+%98 = OpSelect %v4float %97 %101 %104
+OpReturnValue %98
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Saturate.hlsl b/tests/sksl/intrinsics/Saturate.hlsl
index 220b49f..267b452 100644
--- a/tests/sksl/intrinsics/Saturate.hlsl
+++ b/tests/sksl/intrinsics/Saturate.hlsl
@@ -82,16 +82,8 @@
     {
         _96 = false;
     }
-    float4 _97 = 0.0f.xxxx;
-    if (_96)
-    {
-        _97 = _10_colorGreen;
-    }
-    else
-    {
-        _97 = _10_colorRed;
-    }
-    return _97;
+    bool4 _97 = _96.xxxx;
+    return float4(_97.x ? _10_colorGreen.x : _10_colorRed.x, _97.y ? _10_colorGreen.y : _10_colorRed.y, _97.z ? _10_colorGreen.z : _10_colorRed.z, _97.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/SignFloat.asm.frag b/tests/sksl/intrinsics/SignFloat.asm.frag
index 0d60d5d..e042cc7 100644
--- a/tests/sksl/intrinsics/SignFloat.asm.frag
+++ b/tests/sksl/intrinsics/SignFloat.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %67 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
 OpDecorate %86 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4float Function
-%93 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %30
 %33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %37 = OpLoad %v4float %33
@@ -164,19 +162,11 @@
 OpBranch %91
 %91 = OpLabel
 %92 = OpPhi %bool %false %84 %true %90
-OpSelectionMerge %96 None
-OpBranchConditional %92 %94 %95
-%94 = OpLabel
-%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%99 = OpLoad %v4float %97
-OpStore %93 %99
-OpBranch %96
-%95 = OpLabel
-%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%102 = OpLoad %v4float %100
-OpStore %93 %102
-OpBranch %96
-%96 = OpLabel
-%103 = OpLoad %v4float %93
-OpReturnValue %103
+%93 = OpCompositeConstruct %v4bool %92 %92 %92 %92
+%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%97 = OpLoad %v4float %95
+%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%100 = OpLoad %v4float %98
+%94 = OpSelect %v4float %93 %97 %100
+OpReturnValue %94
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/SignFloat.hlsl b/tests/sksl/intrinsics/SignFloat.hlsl
index 62ea826..63b53c2 100644
--- a/tests/sksl/intrinsics/SignFloat.hlsl
+++ b/tests/sksl/intrinsics/SignFloat.hlsl
@@ -82,16 +82,8 @@
     {
         _92 = false;
     }
-    float4 _93 = 0.0f.xxxx;
-    if (_92)
-    {
-        _93 = _10_colorGreen;
-    }
-    else
-    {
-        _93 = _10_colorRed;
-    }
-    return _93;
+    bool4 _93 = _92.xxxx;
+    return float4(_93.x ? _10_colorGreen.x : _10_colorRed.x, _93.y ? _10_colorGreen.y : _10_colorRed.y, _93.z ? _10_colorGreen.z : _10_colorRed.z, _93.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/SignInt.asm.frag b/tests/sksl/intrinsics/SignInt.asm.frag
index bc9917f..ecca8a2 100644
--- a/tests/sksl/intrinsics/SignInt.asm.frag
+++ b/tests/sksl/intrinsics/SignInt.asm.frag
@@ -41,9 +41,8 @@
 OpDecorate %86 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
+OpDecorate %121 RelaxedPrecision
 OpDecorate %124 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -79,7 +78,6 @@
 %true = OpConstantTrue %bool
 %103 = OpConstantComposite %v2int %int_n1 %int_0
 %110 = OpConstantComposite %v3int %int_n1 %int_0 %int_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -93,7 +91,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %expected = OpVariable %_ptr_Function_v4int Function
-%118 = OpVariable %_ptr_Function_v4float Function
 OpStore %expected %33
 %36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %38 = OpLoad %v4float %36
@@ -189,19 +186,11 @@
 OpBranch %116
 %116 = OpLabel
 %117 = OpPhi %bool %false %109 %true %115
-OpSelectionMerge %122 None
-OpBranchConditional %117 %120 %121
-%120 = OpLabel
-%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%124 = OpLoad %v4float %123
-OpStore %118 %124
-OpBranch %122
-%121 = OpLabel
-%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%127 = OpLoad %v4float %125
-OpStore %118 %127
-OpBranch %122
-%122 = OpLabel
-%128 = OpLoad %v4float %118
-OpReturnValue %128
+%118 = OpCompositeConstruct %v4bool %117 %117 %117 %117
+%120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%121 = OpLoad %v4float %120
+%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%124 = OpLoad %v4float %122
+%119 = OpSelect %v4float %118 %121 %124
+OpReturnValue %119
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/SignInt.hlsl b/tests/sksl/intrinsics/SignInt.hlsl
index 35f183c..8560745 100644
--- a/tests/sksl/intrinsics/SignInt.hlsl
+++ b/tests/sksl/intrinsics/SignInt.hlsl
@@ -82,16 +82,8 @@
     {
         _117 = false;
     }
-    float4 _118 = 0.0f.xxxx;
-    if (_117)
-    {
-        _118 = _10_colorGreen;
-    }
-    else
-    {
-        _118 = _10_colorRed;
-    }
-    return _118;
+    bool4 _118 = _117.xxxx;
+    return float4(_118.x ? _10_colorGreen.x : _10_colorRed.x, _118.y ? _10_colorGreen.y : _10_colorRed.y, _118.z ? _10_colorGreen.z : _10_colorRed.z, _118.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Sin.asm.frag b/tests/sksl/intrinsics/Sin.asm.frag
index 4bcdeb8..698006d 100644
--- a/tests/sksl/intrinsics/Sin.asm.frag
+++ b/tests/sksl/intrinsics/Sin.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Sin.hlsl b/tests/sksl/intrinsics/Sin.hlsl
index f583319..79190d1 100644
--- a/tests/sksl/intrinsics/Sin.hlsl
+++ b/tests/sksl/intrinsics/Sin.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Sinh.asm.frag b/tests/sksl/intrinsics/Sinh.asm.frag
index 5223ad3..90a6815 100644
--- a/tests/sksl/intrinsics/Sinh.asm.frag
+++ b/tests/sksl/intrinsics/Sinh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Sinh.hlsl b/tests/sksl/intrinsics/Sinh.hlsl
index 254a95f..c57a249 100644
--- a/tests/sksl/intrinsics/Sinh.hlsl
+++ b/tests/sksl/intrinsics/Sinh.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Smoothstep.asm.frag b/tests/sksl/intrinsics/Smoothstep.asm.frag
index be000d4..addb8b8 100644
--- a/tests/sksl/intrinsics/Smoothstep.asm.frag
+++ b/tests/sksl/intrinsics/Smoothstep.asm.frag
@@ -74,9 +74,8 @@
 OpDecorate %191 RelaxedPrecision
 OpDecorate %199 RelaxedPrecision
 OpDecorate %201 RelaxedPrecision
+OpDecorate %208 RelaxedPrecision
 OpDecorate %210 RelaxedPrecision
-OpDecorate %212 RelaxedPrecision
-OpDecorate %213 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -131,7 +130,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%205 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %30
 OpStore %expectedB %32
 OpSelectionMerge %36 None
@@ -344,19 +342,11 @@
 OpBranch %196
 %196 = OpLabel
 %204 = OpPhi %bool %false %183 %203 %195
-OpSelectionMerge %208 None
-OpBranchConditional %204 %206 %207
-%206 = OpLabel
-%209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%205 = OpCompositeConstruct %v4bool %204 %204 %204 %204
+%207 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%208 = OpLoad %v4float %207
+%209 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %210 = OpLoad %v4float %209
-OpStore %205 %210
-OpBranch %208
-%207 = OpLabel
-%211 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%212 = OpLoad %v4float %211
-OpStore %205 %212
-OpBranch %208
-%208 = OpLabel
-%213 = OpLoad %v4float %205
-OpReturnValue %213
+%206 = OpSelect %v4float %205 %208 %210
+OpReturnValue %206
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Smoothstep.hlsl b/tests/sksl/intrinsics/Smoothstep.hlsl
index a7000b4..c62978e 100644
--- a/tests/sksl/intrinsics/Smoothstep.hlsl
+++ b/tests/sksl/intrinsics/Smoothstep.hlsl
@@ -194,16 +194,8 @@
     {
         _204 = false;
     }
-    float4 _205 = 0.0f.xxxx;
-    if (_204)
-    {
-        _205 = _10_colorGreen;
-    }
-    else
-    {
-        _205 = _10_colorRed;
-    }
-    return _205;
+    bool4 _205 = _204.xxxx;
+    return float4(_205.x ? _10_colorGreen.x : _10_colorRed.x, _205.y ? _10_colorGreen.y : _10_colorRed.y, _205.z ? _10_colorGreen.z : _10_colorRed.z, _205.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Sqrt.asm.frag b/tests/sksl/intrinsics/Sqrt.asm.frag
index d37176e..26b0d9f 100644
--- a/tests/sksl/intrinsics/Sqrt.asm.frag
+++ b/tests/sksl/intrinsics/Sqrt.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %104 RelaxedPrecision
-OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
-%97 = OpVariable %_ptr_Function_v4float Function
 %27 = OpExtInst %v4float %1 Sqrt %32
 %33 = OpVectorShuffle %v2float %27 %27 0 1
 OpStore %25 %33
@@ -143,19 +141,11 @@
 OpBranch %86
 %86 = OpLabel
 %96 = OpPhi %bool %false %72 %87 %85
-OpSelectionMerge %100 None
-OpBranchConditional %96 %98 %99
-%98 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%104 = OpLoad %v4float %101
-OpStore %97 %104
-OpBranch %100
-%99 = OpLabel
-%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%107 = OpLoad %v4float %105
-OpStore %97 %107
-OpBranch %100
-%100 = OpLabel
-%108 = OpLoad %v4float %97
-OpReturnValue %108
+%97 = OpCompositeConstruct %v4bool %96 %96 %96 %96
+%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%102 = OpLoad %v4float %99
+%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%105 = OpLoad %v4float %103
+%98 = OpSelect %v4float %97 %102 %105
+OpReturnValue %98
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Sqrt.hlsl b/tests/sksl/intrinsics/Sqrt.hlsl
index d3fee07..10d4de8 100644
--- a/tests/sksl/intrinsics/Sqrt.hlsl
+++ b/tests/sksl/intrinsics/Sqrt.hlsl
@@ -48,16 +48,8 @@
     {
         _96 = false;
     }
-    float4 _97 = 0.0f.xxxx;
-    if (_96)
-    {
-        _97 = _10_colorGreen;
-    }
-    else
-    {
-        _97 = _10_colorRed;
-    }
-    return _97;
+    bool4 _97 = _96.xxxx;
+    return float4(_97.x ? _10_colorGreen.x : _10_colorRed.x, _97.y ? _10_colorGreen.y : _10_colorRed.y, _97.z ? _10_colorGreen.z : _10_colorRed.z, _97.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Step.asm.frag b/tests/sksl/intrinsics/Step.asm.frag
index afeb1b1..db9d2f3 100644
--- a/tests/sksl/intrinsics/Step.asm.frag
+++ b/tests/sksl/intrinsics/Step.asm.frag
@@ -50,9 +50,8 @@
 OpDecorate %131 RelaxedPrecision
 OpDecorate %142 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
-OpDecorate %162 RelaxedPrecision
-OpDecorate %165 RelaxedPrecision
-OpDecorate %166 RelaxedPrecision
+OpDecorate %160 RelaxedPrecision
+OpDecorate %163 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -108,7 +107,6 @@
 %25 = OpLabel
 %expectedA = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4float Function
-%156 = OpVariable %_ptr_Function_v4float Function
 OpStore %expectedA %29
 OpStore %expectedB %31
 %35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
@@ -261,19 +259,11 @@
 OpBranch %154
 %154 = OpLabel
 %155 = OpPhi %bool %false %147 %true %153
-OpSelectionMerge %159 None
-OpBranchConditional %155 %157 %158
-%157 = OpLabel
-%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%162 = OpLoad %v4float %160
-OpStore %156 %162
-OpBranch %159
-%158 = OpLabel
-%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%165 = OpLoad %v4float %163
-OpStore %156 %165
-OpBranch %159
-%159 = OpLabel
-%166 = OpLoad %v4float %156
-OpReturnValue %166
+%156 = OpCompositeConstruct %v4bool %155 %155 %155 %155
+%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%160 = OpLoad %v4float %158
+%161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%163 = OpLoad %v4float %161
+%157 = OpSelect %v4float %156 %160 %163
+OpReturnValue %157
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Step.hlsl b/tests/sksl/intrinsics/Step.hlsl
index 75f1d03..25159c5 100644
--- a/tests/sksl/intrinsics/Step.hlsl
+++ b/tests/sksl/intrinsics/Step.hlsl
@@ -158,16 +158,8 @@
     {
         _155 = false;
     }
-    float4 _156 = 0.0f.xxxx;
-    if (_155)
-    {
-        _156 = _10_colorGreen;
-    }
-    else
-    {
-        _156 = _10_colorRed;
-    }
-    return _156;
+    bool4 _156 = _155.xxxx;
+    return float4(_156.x ? _10_colorGreen.x : _10_colorRed.x, _156.y ? _10_colorGreen.y : _10_colorRed.y, _156.z ? _10_colorGreen.z : _10_colorRed.z, _156.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Tan.asm.frag b/tests/sksl/intrinsics/Tan.asm.frag
index ad1b7da..2658224 100644
--- a/tests/sksl/intrinsics/Tan.asm.frag
+++ b/tests/sksl/intrinsics/Tan.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Tan.hlsl b/tests/sksl/intrinsics/Tan.hlsl
index 54ab0d3..8aa7200 100644
--- a/tests/sksl/intrinsics/Tan.hlsl
+++ b/tests/sksl/intrinsics/Tan.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Tanh.asm.frag b/tests/sksl/intrinsics/Tanh.asm.frag
index 04ed01e..717c0e7 100644
--- a/tests/sksl/intrinsics/Tanh.asm.frag
+++ b/tests/sksl/intrinsics/Tanh.asm.frag
@@ -52,9 +52,8 @@
 OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -83,7 +82,6 @@
 %v4bool = OpTypeVector %bool 4
 %94 = OpConstantComposite %v3float %float_0 %float_0 %float_0
 %103 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %_entrypoint_v = OpFunction %void None %15
@@ -97,7 +95,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%109 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -191,19 +188,11 @@
 OpBranch %102
 %102 = OpLabel
 %108 = OpPhi %bool %false %93 %107 %101
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%109 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%113 = OpLoad %v4float %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %116 = OpLoad %v4float %114
-OpStore %109 %116
-OpBranch %113
-%112 = OpLabel
-%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%119 = OpLoad %v4float %117
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpSelect %v4float %109 %113 %116
+OpReturnValue %110
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Tanh.hlsl b/tests/sksl/intrinsics/Tanh.hlsl
index 2dba513..47ce0f5 100644
--- a/tests/sksl/intrinsics/Tanh.hlsl
+++ b/tests/sksl/intrinsics/Tanh.hlsl
@@ -82,16 +82,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _10_colorGreen;
-    }
-    else
-    {
-        _109 = _10_colorRed;
-    }
-    return _109;
+    bool4 _109 = _108.xxxx;
+    return float4(_109.x ? _10_colorGreen.x : _10_colorRed.x, _109.y ? _10_colorGreen.y : _10_colorRed.y, _109.z ? _10_colorGreen.z : _10_colorRed.z, _109.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Transpose.asm.frag b/tests/sksl/intrinsics/Transpose.asm.frag
index 6d797f6..1b197c2 100644
--- a/tests/sksl/intrinsics/Transpose.asm.frag
+++ b/tests/sksl/intrinsics/Transpose.asm.frag
@@ -30,9 +30,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %114 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
+OpDecorate %112 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -87,7 +86,7 @@
 %91 = OpConstantComposite %v3float %float_3 %float_6 %float_9
 %92 = OpConstantComposite %mat3v3float %89 %90 %91
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
@@ -103,7 +102,6 @@
 %27 = OpFunctionParameter %_ptr_Function_v2float
 %28 = OpLabel
 %testMatrix2x3 = OpVariable %_ptr_Function_mat2v3float Function
-%106 = OpVariable %_ptr_Function_v4float Function
 OpStore %testMatrix2x3 %40
 %43 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %47 = OpLoad %mat2v2float %43
@@ -153,19 +151,11 @@
 OpBranch %80
 %80 = OpLabel
 %105 = OpPhi %bool %false %60 %104 %79
-OpSelectionMerge %110 None
-OpBranchConditional %105 %108 %109
-%108 = OpLabel
-%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%114 = OpLoad %v4float %111
-OpStore %106 %114
-OpBranch %110
-%109 = OpLabel
-%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%117 = OpLoad %v4float %115
-OpStore %106 %117
-OpBranch %110
-%110 = OpLabel
-%118 = OpLoad %v4float %106
-OpReturnValue %118
+%107 = OpCompositeConstruct %v4bool %105 %105 %105 %105
+%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%112 = OpLoad %v4float %109
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%115 = OpLoad %v4float %113
+%108 = OpSelect %v4float %107 %112 %115
+OpReturnValue %108
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Transpose.hlsl b/tests/sksl/intrinsics/Transpose.hlsl
index 24bf05a..73b7f0b 100644
--- a/tests/sksl/intrinsics/Transpose.hlsl
+++ b/tests/sksl/intrinsics/Transpose.hlsl
@@ -46,16 +46,8 @@
     {
         _105 = false;
     }
-    float4 _106 = 0.0f.xxxx;
-    if (_105)
-    {
-        _106 = _10_colorGreen;
-    }
-    else
-    {
-        _106 = _10_colorRed;
-    }
-    return _106;
+    bool4 _107 = _105.xxxx;
+    return float4(_107.x ? _10_colorGreen.x : _10_colorRed.x, _107.y ? _10_colorGreen.y : _10_colorRed.y, _107.z ? _10_colorGreen.z : _10_colorRed.z, _107.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/Trunc.asm.frag b/tests/sksl/intrinsics/Trunc.asm.frag
index 818bbfc..88f9cd7 100644
--- a/tests/sksl/intrinsics/Trunc.asm.frag
+++ b/tests/sksl/intrinsics/Trunc.asm.frag
@@ -35,9 +35,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
 OpDecorate %63 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
 OpDecorate %77 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -68,7 +67,6 @@
 %float_2 = OpConstant %float 2
 %65 = OpConstantComposite %v4float %float_n1 %float_0 %float_0 %float_2
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -82,7 +80,6 @@
 %main = OpFunction %v4float None %23
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
-%70 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 0
@@ -123,19 +120,11 @@
 OpBranch %60
 %60 = OpLabel
 %69 = OpPhi %bool %false %48 %68 %59
-OpSelectionMerge %74 None
-OpBranchConditional %69 %72 %73
-%72 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%70 = OpCompositeConstruct %v4bool %69 %69 %69 %69
+%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%74 = OpLoad %v4float %72
+%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
 %77 = OpLoad %v4float %75
-OpStore %70 %77
-OpBranch %74
-%73 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%80 = OpLoad %v4float %78
-OpStore %70 %80
-OpBranch %74
-%74 = OpLabel
-%81 = OpLoad %v4float %70
-OpReturnValue %81
+%71 = OpSelect %v4float %70 %74 %77
+OpReturnValue %71
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Trunc.hlsl b/tests/sksl/intrinsics/Trunc.hlsl
index 51b44ef..ad734e8 100644
--- a/tests/sksl/intrinsics/Trunc.hlsl
+++ b/tests/sksl/intrinsics/Trunc.hlsl
@@ -45,16 +45,8 @@
     {
         _69 = false;
     }
-    float4 _70 = 0.0f.xxxx;
-    if (_69)
-    {
-        _70 = _10_colorGreen;
-    }
-    else
-    {
-        _70 = _10_colorRed;
-    }
-    return _70;
+    bool4 _70 = _69.xxxx;
+    return float4(_70.x ? _10_colorGreen.x : _10_colorRed.x, _70.y ? _10_colorGreen.y : _10_colorRed.y, _70.z ? _10_colorGreen.z : _10_colorRed.z, _70.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
index a0bc2af..1af063c 100644
--- a/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
+++ b/tests/sksl/intrinsics/UintBitsToFloat.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %91 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,7 +85,6 @@
 %26 = OpLabel
 %inputVal = OpVariable %_ptr_Function_v4float Function
 %expectedB = OpVariable %_ptr_Function_v4uint Function
-%84 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_0
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -131,19 +129,11 @@
 OpBranch %78
 %78 = OpLabel
 %83 = OpPhi %bool %false %67 %82 %77
-OpSelectionMerge %87 None
-OpBranchConditional %83 %85 %86
-%85 = OpLabel
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%91 = OpLoad %v4float %88
-OpStore %84 %91
-OpBranch %87
-%86 = OpLabel
-%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%94 = OpLoad %v4float %92
-OpStore %84 %94
-OpBranch %87
-%87 = OpLabel
-%95 = OpLoad %v4float %84
-OpReturnValue %95
+%84 = OpCompositeConstruct %v4bool %83 %83 %83 %83
+%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%89 = OpLoad %v4float %86
+%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%92 = OpLoad %v4float %90
+%85 = OpSelect %v4float %84 %89 %92
+OpReturnValue %85
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/UintBitsToFloat.hlsl b/tests/sksl/intrinsics/UintBitsToFloat.hlsl
index 3434570..89a3365 100644
--- a/tests/sksl/intrinsics/UintBitsToFloat.hlsl
+++ b/tests/sksl/intrinsics/UintBitsToFloat.hlsl
@@ -50,16 +50,8 @@
     {
         _83 = false;
     }
-    float4 _84 = 0.0f.xxxx;
-    if (_83)
-    {
-        _84 = _10_colorGreen;
-    }
-    else
-    {
-        _84 = _10_colorRed;
-    }
-    return _84;
+    bool4 _84 = _83.xxxx;
+    return float4(_84.x ? _10_colorGreen.x : _10_colorRed.x, _84.y ? _10_colorGreen.y : _10_colorRed.y, _84.z ? _10_colorGreen.z : _10_colorRed.z, _84.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ArrayCast.asm.frag b/tests/sksl/shared/ArrayCast.asm.frag
index 50f5f4a..65e3370 100644
--- a/tests/sksl/shared/ArrayCast.asm.frag
+++ b/tests/sksl/shared/ArrayCast.asm.frag
@@ -31,9 +31,8 @@
 OpDecorate %h RelaxedPrecision
 OpDecorate %_arr_v3int_int_3 ArrayStride 16
 OpDecorate %_arr_mat2v2float_int_2 ArrayStride 32
+OpDecorate %96 RelaxedPrecision
 OpDecorate %98 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -84,7 +83,7 @@
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
@@ -104,7 +103,6 @@
 %s3 = OpVariable %_ptr_Function__arr_v3int_int_3 Function
 %h2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function
 %f2x2 = OpVariable %_ptr_Function__arr_mat2v2float_int_2 Function
-%90 = OpVariable %_ptr_Function_v4float Function
 %35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
 OpStore %f %35
 OpStore %h %35
@@ -148,19 +146,11 @@
 OpBranch %76
 %76 = OpLabel
 %89 = OpPhi %bool %false %71 %88 %75
-OpSelectionMerge %94 None
-OpBranchConditional %89 %92 %93
-%92 = OpLabel
-%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%98 = OpLoad %v4float %95
-OpStore %90 %98
-OpBranch %94
-%93 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%100 = OpLoad %v4float %99
-OpStore %90 %100
-OpBranch %94
-%94 = OpLabel
-%101 = OpLoad %v4float %90
-OpReturnValue %101
+%91 = OpCompositeConstruct %v4bool %89 %89 %89 %89
+%93 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%96 = OpLoad %v4float %93
+%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%98 = OpLoad %v4float %97
+%92 = OpSelect %v4float %91 %96 %98
+OpReturnValue %92
 OpFunctionEnd
diff --git a/tests/sksl/shared/ArrayCast.hlsl b/tests/sksl/shared/ArrayCast.hlsl
index 5c06de9..ebfac54 100644
--- a/tests/sksl/shared/ArrayCast.hlsl
+++ b/tests/sksl/shared/ArrayCast.hlsl
@@ -47,16 +47,8 @@
     {
         _89 = false;
     }
-    float4 _90 = 0.0f.xxxx;
-    if (_89)
-    {
-        _90 = _10_colorGreen;
-    }
-    else
-    {
-        _90 = _10_colorRed;
-    }
-    return _90;
+    bool4 _91 = _89.xxxx;
+    return float4(_91.x ? _10_colorGreen.x : _10_colorRed.x, _91.y ? _10_colorGreen.y : _10_colorRed.y, _91.z ? _10_colorGreen.z : _10_colorRed.z, _91.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ArrayComparison.asm.frag b/tests/sksl/shared/ArrayComparison.asm.frag
index 37a247f..47717aa 100644
--- a/tests/sksl/shared/ArrayComparison.asm.frag
+++ b/tests/sksl/shared/ArrayComparison.asm.frag
@@ -58,9 +58,8 @@
 OpDecorate %253 RelaxedPrecision
 OpDecorate %257 RelaxedPrecision
 OpDecorate %259 RelaxedPrecision
+OpDecorate %287 RelaxedPrecision
 OpDecorate %289 RelaxedPrecision
-OpDecorate %291 RelaxedPrecision
-OpDecorate %292 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -128,7 +127,7 @@
 %_ptr_Uniform__arr_float_int_5 = OpTypePointer Uniform %_arr_float_int_5
 %v3bool = OpTypeVector %bool 3
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %18
 %19 = OpLabel
@@ -153,7 +152,6 @@
 %s1 = OpVariable %_ptr_Function__arr_S_int_3 Function
 %s2 = OpVariable %_ptr_Function__arr_S_int_3 Function
 %s3 = OpVariable %_ptr_Function__arr_S_int_3 Function
-%282 = OpVariable %_ptr_Function_v4float Function
 %36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5
 OpStore %f1 %36
 OpStore %f2 %36
@@ -396,19 +394,11 @@
 OpBranch %275
 %275 = OpLabel
 %281 = OpPhi %bool %false %265 %280 %274
-OpSelectionMerge %286 None
-OpBranchConditional %281 %284 %285
-%284 = OpLabel
-%287 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%289 = OpLoad %v4float %287
-OpStore %282 %289
-OpBranch %286
-%285 = OpLabel
-%290 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%291 = OpLoad %v4float %290
-OpStore %282 %291
-OpBranch %286
-%286 = OpLabel
-%292 = OpLoad %v4float %282
-OpReturnValue %292
+%283 = OpCompositeConstruct %v4bool %281 %281 %281 %281
+%285 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%287 = OpLoad %v4float %285
+%288 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%289 = OpLoad %v4float %288
+%284 = OpSelect %v4float %283 %287 %289
+OpReturnValue %284
 OpFunctionEnd
diff --git a/tests/sksl/shared/ArrayComparison.hlsl b/tests/sksl/shared/ArrayComparison.hlsl
index 7e08abb..401b88e 100644
--- a/tests/sksl/shared/ArrayComparison.hlsl
+++ b/tests/sksl/shared/ArrayComparison.hlsl
@@ -154,16 +154,8 @@
     {
         _281 = false;
     }
-    float4 _282 = 0.0f.xxxx;
-    if (_281)
-    {
-        _282 = _10_colorGreen;
-    }
-    else
-    {
-        _282 = _10_colorRed;
-    }
-    return _282;
+    bool4 _283 = _281.xxxx;
+    return float4(_283.x ? _10_colorGreen.x : _10_colorRed.x, _283.y ? _10_colorGreen.y : _10_colorRed.y, _283.z ? _10_colorGreen.z : _10_colorRed.z, _283.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ArrayConstructors.asm.frag b/tests/sksl/shared/ArrayConstructors.asm.frag
index 1943e3d..2d4fbf4 100644
--- a/tests/sksl/shared/ArrayConstructors.asm.frag
+++ b/tests/sksl/shared/ArrayConstructors.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %_arr_float_int_4 ArrayStride 16
 OpDecorate %_arr_v2float_int_2 ArrayStride 16
 OpDecorate %_arr_mat4v4float_int_1 ArrayStride 64
-OpDecorate %77 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -75,6 +74,7 @@
 %int_0 = OpConstant %int 0
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %float_24 = OpConstant %float 24
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -90,7 +90,6 @@
 %test1 = OpVariable %_ptr_Function__arr_float_int_4 Function
 %test2 = OpVariable %_ptr_Function__arr_v2float_int_2 Function
 %test3 = OpVariable %_ptr_Function__arr_mat4v4float_int_1 Function
-%71 = OpVariable %_ptr_Function_v4float Function
 %35 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
 OpStore %test1 %35
 %42 = OpCompositeConstruct %_arr_v2float_int_2 %40 %41
@@ -108,19 +107,11 @@
 %67 = OpCompositeExtract %float %66 3
 %68 = OpFAdd %float %62 %67
 %70 = OpFOrdEqual %bool %68 %float_24
-OpSelectionMerge %74 None
-OpBranchConditional %70 %72 %73
-%72 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%77 = OpLoad %v4float %75
-OpStore %71 %77
-OpBranch %74
-%73 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%79 = OpLoad %v4float %78
-OpStore %71 %79
-OpBranch %74
-%74 = OpLabel
-%80 = OpLoad %v4float %71
-OpReturnValue %80
+%72 = OpCompositeConstruct %v4bool %70 %70 %70 %70
+%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%76 = OpLoad %v4float %74
+%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%78 = OpLoad %v4float %77
+%73 = OpSelect %v4float %72 %76 %78
+OpReturnValue %73
 OpFunctionEnd
diff --git a/tests/sksl/shared/ArrayConstructors.hlsl b/tests/sksl/shared/ArrayConstructors.hlsl
index fd28e30..9cfd571 100644
--- a/tests/sksl/shared/ArrayConstructors.hlsl
+++ b/tests/sksl/shared/ArrayConstructors.hlsl
@@ -20,16 +20,8 @@
     float2 test2[2] = _42;
     float4x4 _54[1] = { float4x4(float4(16.0f, 0.0f, 0.0f, 0.0f), float4(0.0f, 16.0f, 0.0f, 0.0f), float4(0.0f, 0.0f, 16.0f, 0.0f), float4(0.0f, 0.0f, 0.0f, 16.0f)) };
     float4x4 test3[1] = _54;
-    float4 _71 = 0.0f.xxxx;
-    if (((test1[3] + test2[1].y) + test3[0][3].w) == 24.0f)
-    {
-        _71 = _10_colorGreen;
-    }
-    else
-    {
-        _71 = _10_colorRed;
-    }
-    return _71;
+    bool4 _72 = (((test1[3] + test2[1].y) + test3[0][3].w) == 24.0f).xxxx;
+    return float4(_72.x ? _10_colorGreen.x : _10_colorRed.x, _72.y ? _10_colorGreen.y : _10_colorRed.y, _72.z ? _10_colorGreen.z : _10_colorRed.z, _72.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ArrayNarrowingConversions.asm.frag b/tests/sksl/shared/ArrayNarrowingConversions.asm.frag
index 63d3965..f2bcc33 100644
--- a/tests/sksl/shared/ArrayNarrowingConversions.asm.frag
+++ b/tests/sksl/shared/ArrayNarrowingConversions.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %_arr_float_int_2 ArrayStride 16
 OpDecorate %h2 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
 OpDecorate %67 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %70 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,7 +62,7 @@
 %float_2 = OpConstant %float 2
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
@@ -82,7 +81,6 @@
 %f2 = OpVariable %_ptr_Function__arr_float_int_2 Function
 %h2 = OpVariable %_ptr_Function__arr_float_int_2 Function
 %cf2 = OpVariable %_ptr_Function__arr_float_int_2 Function
-%59 = OpVariable %_ptr_Function_v4float Function
 %32 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2
 OpStore %i2 %32
 %34 = OpCompositeConstruct %_arr_int_int_2 %int_1 %int_2
@@ -118,19 +116,11 @@
 OpBranch %56
 %56 = OpLabel
 %58 = OpPhi %bool %false %52 %57 %55
-OpSelectionMerge %63 None
-OpBranchConditional %58 %61 %62
-%61 = OpLabel
-%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%67 = OpLoad %v4float %64
-OpStore %59 %67
-OpBranch %63
-%62 = OpLabel
-%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%69 = OpLoad %v4float %68
-OpStore %59 %69
-OpBranch %63
-%63 = OpLabel
-%70 = OpLoad %v4float %59
-OpReturnValue %70
+%60 = OpCompositeConstruct %v4bool %58 %58 %58 %58
+%62 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%65 = OpLoad %v4float %62
+%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%67 = OpLoad %v4float %66
+%61 = OpSelect %v4float %60 %65 %67
+OpReturnValue %61
 OpFunctionEnd
diff --git a/tests/sksl/shared/ArrayNarrowingConversions.hlsl b/tests/sksl/shared/ArrayNarrowingConversions.hlsl
index 9ea63a4..3324ca3 100644
--- a/tests/sksl/shared/ArrayNarrowingConversions.hlsl
+++ b/tests/sksl/shared/ArrayNarrowingConversions.hlsl
@@ -54,16 +54,8 @@
     {
         _58 = false;
     }
-    float4 _59 = 0.0f.xxxx;
-    if (_58)
-    {
-        _59 = _10_colorGreen;
-    }
-    else
-    {
-        _59 = _10_colorRed;
-    }
-    return _59;
+    bool4 _60 = _58.xxxx;
+    return float4(_60.x ? _10_colorGreen.x : _10_colorRed.x, _60.y ? _10_colorGreen.y : _10_colorRed.y, _60.z ? _10_colorGreen.z : _10_colorRed.z, _60.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/CastsRoundTowardZero.asm.frag b/tests/sksl/shared/CastsRoundTowardZero.asm.frag
index 3928fcb..db6ec74 100644
--- a/tests/sksl/shared/CastsRoundTowardZero.asm.frag
+++ b/tests/sksl/shared/CastsRoundTowardZero.asm.frag
@@ -22,9 +22,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %38 RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
-OpDecorate %42 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -44,7 +43,8 @@
 %23 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
+%30 = OpConstantComposite %v4bool %true %true %true %true
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -61,21 +61,11 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
-%29 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
-OpSelectionMerge %33 None
-OpBranchConditional %true %31 %32
-%31 = OpLabel
-%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%38 = OpLoad %v4float %34
-OpStore %29 %38
-OpBranch %33
-%32 = OpLabel
-%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%41 = OpLoad %v4float %39
-OpStore %29 %41
-OpBranch %33
-%33 = OpLabel
-%42 = OpLoad %v4float %29
-OpReturnValue %42
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%36 = OpLoad %v4float %32
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%39 = OpLoad %v4float %37
+%31 = OpSelect %v4float %30 %36 %39
+OpReturnValue %31
 OpFunctionEnd
diff --git a/tests/sksl/shared/CastsRoundTowardZero.hlsl b/tests/sksl/shared/CastsRoundTowardZero.hlsl
index af5dd9b..2457d2b 100644
--- a/tests/sksl/shared/CastsRoundTowardZero.hlsl
+++ b/tests/sksl/shared/CastsRoundTowardZero.hlsl
@@ -15,16 +15,7 @@
 float4 main(float2 _24)
 {
     bool ok = true;
-    float4 _29 = 0.0f.xxxx;
-    if (true)
-    {
-        _29 = _10_colorGreen;
-    }
-    else
-    {
-        _29 = _10_colorRed;
-    }
-    return _29;
+    return float4(bool4(true, true, true, true).x ? _10_colorGreen.x : _10_colorRed.x, bool4(true, true, true, true).y ? _10_colorGreen.y : _10_colorRed.y, bool4(true, true, true, true).z ? _10_colorGreen.z : _10_colorRed.z, bool4(true, true, true, true).w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/CommaSideEffects.asm.frag b/tests/sksl/shared/CommaSideEffects.asm.frag
index b9eac75..6458ff7 100644
--- a/tests/sksl/shared/CommaSideEffects.asm.frag
+++ b/tests/sksl/shared/CommaSideEffects.asm.frag
@@ -50,9 +50,8 @@
 OpDecorate %65 RelaxedPrecision
 OpDecorate %72 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -104,7 +103,6 @@
 %c = OpVariable %_ptr_Function_v4float Function
 %d = OpVariable %_ptr_Function_v4float Function
 %46 = OpVariable %_ptr_Function_v4float Function
-%83 = OpVariable %_ptr_Function_v4float Function
 %40 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %42 = OpLoad %v4float %40
 OpStore %b %42
@@ -159,19 +157,11 @@
 OpBranch %77
 %77 = OpLabel
 %82 = OpPhi %bool %false %70 %81 %76
-OpSelectionMerge %86 None
-OpBranchConditional %82 %84 %85
-%84 = OpLabel
-%87 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%83 = OpCompositeConstruct %v4bool %82 %82 %82 %82
+%85 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%86 = OpLoad %v4float %85
+%87 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %88 = OpLoad %v4float %87
-OpStore %83 %88
-OpBranch %86
-%85 = OpLabel
-%89 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%90 = OpLoad %v4float %89
-OpStore %83 %90
-OpBranch %86
-%86 = OpLabel
-%91 = OpLoad %v4float %83
-OpReturnValue %91
+%84 = OpSelect %v4float %83 %86 %88
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/shared/CommaSideEffects.hlsl b/tests/sksl/shared/CommaSideEffects.hlsl
index 0c39c92..3279e15 100644
--- a/tests/sksl/shared/CommaSideEffects.hlsl
+++ b/tests/sksl/shared/CommaSideEffects.hlsl
@@ -62,16 +62,8 @@
     {
         _82 = false;
     }
-    float4 _83 = 0.0f.xxxx;
-    if (_82)
-    {
-        _83 = _11_colorGreen;
-    }
-    else
-    {
-        _83 = _11_colorRed;
-    }
-    return _83;
+    bool4 _83 = _82.xxxx;
+    return float4(_83.x ? _11_colorGreen.x : _11_colorRed.x, _83.y ? _11_colorGreen.y : _11_colorRed.y, _83.z ? _11_colorGreen.z : _11_colorRed.z, _83.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ConstGlobal.asm.frag b/tests/sksl/shared/ConstGlobal.asm.frag
index 44c38dc..388fb05 100644
--- a/tests/sksl/shared/ConstGlobal.asm.frag
+++ b/tests/sksl/shared/ConstGlobal.asm.frag
@@ -22,9 +22,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
-OpDecorate %54 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -48,7 +47,7 @@
 %int_7 = OpConstant %int 7
 %int_10 = OpConstant %int 10
 %40 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
@@ -81,23 +80,14 @@
 %42 = OpLabel
 %43 = OpVariable %_ptr_Function_int Function
 %44 = OpVariable %_ptr_Function_int Function
-%46 = OpVariable %_ptr_Function_v4float Function
 OpStore %43 %int_7
 OpStore %44 %int_10
 %45 = OpFunctionCall %bool %verify_const_globals_bii %43 %44
-OpSelectionMerge %50 None
-OpBranchConditional %45 %48 %49
-%48 = OpLabel
-%51 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%54 = OpLoad %v4float %51
-OpStore %46 %54
-OpBranch %50
-%49 = OpLabel
-%55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%57 = OpLoad %v4float %55
-OpStore %46 %57
-OpBranch %50
-%50 = OpLabel
-%58 = OpLoad %v4float %46
-OpReturnValue %58
+%47 = OpCompositeConstruct %v4bool %45 %45 %45 %45
+%49 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%52 = OpLoad %v4float %49
+%53 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%55 = OpLoad %v4float %53
+%48 = OpSelect %v4float %47 %52 %55
+OpReturnValue %48
 OpFunctionEnd
diff --git a/tests/sksl/shared/ConstGlobal.hlsl b/tests/sksl/shared/ConstGlobal.hlsl
index 0742b9a..c393bfb 100644
--- a/tests/sksl/shared/ConstGlobal.hlsl
+++ b/tests/sksl/shared/ConstGlobal.hlsl
@@ -30,16 +30,8 @@
 {
     int _43 = 7;
     int _44 = 10;
-    float4 _46 = 0.0f.xxxx;
-    if (verify_const_globals_bii(_43, _44))
-    {
-        _46 = _11_colorGreen;
-    }
-    else
-    {
-        _46 = _11_colorRed;
-    }
-    return _46;
+    bool4 _47 = verify_const_globals_bii(_43, _44).xxxx;
+    return float4(_47.x ? _11_colorGreen.x : _11_colorRed.x, _47.y ? _11_colorGreen.y : _11_colorRed.y, _47.z ? _11_colorGreen.z : _11_colorRed.z, _47.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ConstantIf.asm.frag b/tests/sksl/shared/ConstantIf.asm.frag
index 6ff1401..464a069 100644
--- a/tests/sksl/shared/ConstantIf.asm.frag
+++ b/tests/sksl/shared/ConstantIf.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %52 RelaxedPrecision
 OpDecorate %54 RelaxedPrecision
-OpDecorate %56 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -53,7 +52,7 @@
 %int_5 = OpConstant %int 5
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -70,7 +69,6 @@
 %b = OpVariable %_ptr_Function_int Function
 %c = OpVariable %_ptr_Function_int Function
 %d = OpVariable %_ptr_Function_int Function
-%47 = OpVariable %_ptr_Function_v4float Function
 OpStore %a %int_0
 OpStore %b %int_0
 OpStore %c %int_0
@@ -96,19 +94,11 @@
 OpBranch %45
 %45 = OpLabel
 %46 = OpPhi %bool %false %42 %true %44
-OpSelectionMerge %51 None
-OpBranchConditional %46 %49 %50
-%49 = OpLabel
-%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%54 = OpLoad %v4float %52
-OpStore %47 %54
-OpBranch %51
-%50 = OpLabel
-%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%56 = OpLoad %v4float %55
-OpStore %47 %56
-OpBranch %51
-%51 = OpLabel
-%57 = OpLoad %v4float %47
-OpReturnValue %57
+%48 = OpCompositeConstruct %v4bool %46 %46 %46 %46
+%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%52 = OpLoad %v4float %50
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%54 = OpLoad %v4float %53
+%49 = OpSelect %v4float %48 %52 %54
+OpReturnValue %49
 OpFunctionEnd
diff --git a/tests/sksl/shared/ConstantIf.hlsl b/tests/sksl/shared/ConstantIf.hlsl
index 05e2c97..b7a6d1f 100644
--- a/tests/sksl/shared/ConstantIf.hlsl
+++ b/tests/sksl/shared/ConstantIf.hlsl
@@ -48,16 +48,8 @@
     {
         _46 = false;
     }
-    float4 _47 = 0.0f.xxxx;
-    if (_46)
-    {
-        _47 = _10_colorGreen;
-    }
-    else
-    {
-        _47 = _10_colorRed;
-    }
-    return _47;
+    bool4 _48 = _46.xxxx;
+    return float4(_48.x ? _10_colorGreen.x : _10_colorRed.x, _48.y ? _10_colorGreen.y : _10_colorRed.y, _48.z ? _10_colorGreen.z : _10_colorRed.z, _48.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/DeadReturn.asm.frag b/tests/sksl/shared/DeadReturn.asm.frag
index 40c57d1..7b37ac9 100644
--- a/tests/sksl/shared/DeadReturn.asm.frag
+++ b/tests/sksl/shared/DeadReturn.asm.frag
@@ -33,9 +33,8 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %68 RelaxedPrecision
 OpDecorate %69 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,7 +62,7 @@
 %false = OpConstantFalse %bool
 %_ptr_Function_int = OpTypePointer Function %int
 %78 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %23
 %24 = OpLabel
 %28 = OpVariable %_ptr_Function_v2float Function
@@ -151,7 +150,6 @@
 %main = OpFunction %v4float None %78
 %79 = OpFunctionParameter %_ptr_Function_v2float
 %80 = OpLabel
-%94 = OpVariable %_ptr_Function_v4float Function
 OpStore %scratchVar %int_0
 %81 = OpFunctionCall %bool %test_flat_b
 OpSelectionMerge %83 None
@@ -175,19 +173,11 @@
 OpBranch %91
 %91 = OpLabel
 %93 = OpPhi %bool %false %87 %92 %90
-OpSelectionMerge %98 None
-OpBranchConditional %93 %96 %97
-%96 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%95 = OpCompositeConstruct %v4bool %93 %93 %93 %93
+%97 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%98 = OpLoad %v4float %97
+%99 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
 %100 = OpLoad %v4float %99
-OpStore %94 %100
-OpBranch %98
-%97 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%102 = OpLoad %v4float %101
-OpStore %94 %102
-OpBranch %98
-%98 = OpLabel
-%103 = OpLoad %v4float %94
-OpReturnValue %103
+%96 = OpSelect %v4float %95 %98 %100
+OpReturnValue %96
 OpFunctionEnd
diff --git a/tests/sksl/shared/DeadReturn.hlsl b/tests/sksl/shared/DeadReturn.hlsl
index 5b4614d..a6023c6 100644
--- a/tests/sksl/shared/DeadReturn.hlsl
+++ b/tests/sksl/shared/DeadReturn.hlsl
@@ -94,16 +94,8 @@
     {
         _93 = false;
     }
-    float4 _94 = 0.0f.xxxx;
-    if (_93)
-    {
-        _94 = _18_colorGreen;
-    }
-    else
-    {
-        _94 = _18_colorRed;
-    }
-    return _94;
+    bool4 _95 = _93.xxxx;
+    return float4(_95.x ? _18_colorGreen.x : _18_colorRed.x, _95.y ? _18_colorGreen.y : _18_colorRed.y, _95.z ? _18_colorGreen.z : _18_colorRed.z, _95.w ? _18_colorGreen.w : _18_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/DeadReturnES3.asm.frag b/tests/sksl/shared/DeadReturnES3.asm.frag
index 969bd56..704d8c9 100644
--- a/tests/sksl/shared/DeadReturnES3.asm.frag
+++ b/tests/sksl/shared/DeadReturnES3.asm.frag
@@ -36,9 +36,8 @@
 OpDecorate %76 RelaxedPrecision
 OpDecorate %88 RelaxedPrecision
 OpDecorate %89 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
 OpDecorate %146 RelaxedPrecision
-OpDecorate %148 RelaxedPrecision
-OpDecorate %149 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -64,7 +63,7 @@
 %_ptr_Function_int = OpTypePointer Function %int
 %int_1 = OpConstant %int 1
 %108 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %23
 %24 = OpLabel
 %28 = OpVariable %_ptr_Function_v2float Function
@@ -217,7 +216,6 @@
 %main = OpFunction %v4float None %108
 %109 = OpFunctionParameter %_ptr_Function_v2float
 %110 = OpLabel
-%140 = OpVariable %_ptr_Function_v4float Function
 %111 = OpFunctionCall %bool %test_return_b
 OpSelectionMerge %113 None
 OpBranchConditional %111 %112 %113
@@ -268,19 +266,11 @@
 OpBranch %137
 %137 = OpLabel
 %139 = OpPhi %bool %false %133 %138 %136
-OpSelectionMerge %144 None
-OpBranchConditional %139 %142 %143
-%142 = OpLabel
-%145 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%141 = OpCompositeConstruct %v4bool %139 %139 %139 %139
+%143 = OpAccessChain %_ptr_Uniform_v4float %18 %int_0
+%144 = OpLoad %v4float %143
+%145 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
 %146 = OpLoad %v4float %145
-OpStore %140 %146
-OpBranch %144
-%143 = OpLabel
-%147 = OpAccessChain %_ptr_Uniform_v4float %18 %int_1
-%148 = OpLoad %v4float %147
-OpStore %140 %148
-OpBranch %144
-%144 = OpLabel
-%149 = OpLoad %v4float %140
-OpReturnValue %149
+%142 = OpSelect %v4float %141 %144 %146
+OpReturnValue %142
 OpFunctionEnd
diff --git a/tests/sksl/shared/DeadReturnES3.hlsl b/tests/sksl/shared/DeadReturnES3.hlsl
index 9dd05f2..cbfac2a 100644
--- a/tests/sksl/shared/DeadReturnES3.hlsl
+++ b/tests/sksl/shared/DeadReturnES3.hlsl
@@ -163,16 +163,8 @@
     {
         _139 = false;
     }
-    float4 _140 = 0.0f.xxxx;
-    if (_139)
-    {
-        _140 = _18_colorGreen;
-    }
-    else
-    {
-        _140 = _18_colorRed;
-    }
-    return _140;
+    bool4 _141 = _139.xxxx;
+    return float4(_141.x ? _18_colorGreen.x : _18_colorRed.x, _141.y ? _18_colorGreen.y : _18_colorRed.y, _141.z ? _18_colorGreen.z : _18_colorRed.z, _141.w ? _18_colorGreen.w : _18_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/DeadStripFunctions.asm.frag b/tests/sksl/shared/DeadStripFunctions.asm.frag
index dcde829..b4d5727 100644
--- a/tests/sksl/shared/DeadStripFunctions.asm.frag
+++ b/tests/sksl/shared/DeadStripFunctions.asm.frag
@@ -42,9 +42,8 @@
 OpDecorate %51 RelaxedPrecision
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
-OpDecorate %85 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -123,7 +122,6 @@
 %59 = OpVariable %_ptr_Function_v4float Function
 %62 = OpVariable %_ptr_Function_v4float Function
 %65 = OpVariable %_ptr_Function_v4float Function
-%77 = OpVariable %_ptr_Function_v4float Function
 OpStore %59 %58
 OpStore %62 %61
 %63 = OpFunctionCall %v4float %live_fn_h4h4h4 %59 %62
@@ -141,19 +139,11 @@
 OpBranch %73
 %73 = OpLabel
 %76 = OpPhi %bool %false %54 %75 %72
-OpSelectionMerge %80 None
-OpBranchConditional %76 %78 %79
-%78 = OpLabel
-%81 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%85 = OpLoad %v4float %81
-OpStore %77 %85
-OpBranch %80
-%79 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%88 = OpLoad %v4float %86
-OpStore %77 %88
-OpBranch %80
-%80 = OpLabel
-%89 = OpLoad %v4float %77
-OpReturnValue %89
+%77 = OpCompositeConstruct %v4bool %76 %76 %76 %76
+%79 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%83 = OpLoad %v4float %79
+%84 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%86 = OpLoad %v4float %84
+%78 = OpSelect %v4float %77 %83 %86
+OpReturnValue %78
 OpFunctionEnd
diff --git a/tests/sksl/shared/DeadStripFunctions.hlsl b/tests/sksl/shared/DeadStripFunctions.hlsl
index a036937..b5fdb95 100644
--- a/tests/sksl/shared/DeadStripFunctions.hlsl
+++ b/tests/sksl/shared/DeadStripFunctions.hlsl
@@ -40,16 +40,8 @@
     {
         _76 = false;
     }
-    float4 _77 = 0.0f.xxxx;
-    if (_76)
-    {
-        _77 = _12_colorGreen;
-    }
-    else
-    {
-        _77 = _12_colorRed;
-    }
-    return _77;
+    bool4 _77 = _76.xxxx;
+    return float4(_77.x ? _12_colorGreen.x : _12_colorRed.x, _77.y ? _12_colorGreen.y : _12_colorRed.y, _77.z ? _12_colorGreen.z : _12_colorRed.z, _77.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/DependentInitializers.asm.frag b/tests/sksl/shared/DependentInitializers.asm.frag
index 4b40158..bf13276 100644
--- a/tests/sksl/shared/DependentInitializers.asm.frag
+++ b/tests/sksl/shared/DependentInitializers.asm.frag
@@ -23,9 +23,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %43 RelaxedPrecision
-OpDecorate %46 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -47,7 +46,7 @@
 %float_0_5 = OpConstant %float 0.5
 %float_2 = OpConstant %float 2
 %float_1 = OpConstant %float 1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -65,24 +64,15 @@
 %25 = OpLabel
 %x = OpVariable %_ptr_Function_float Function
 %y = OpVariable %_ptr_Function_float Function
-%34 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_0_5
 %31 = OpFMul %float %float_0_5 %float_2
 OpStore %y %31
 %33 = OpFOrdEqual %bool %31 %float_1
-OpSelectionMerge %38 None
-OpBranchConditional %33 %36 %37
-%36 = OpLabel
-%39 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%43 = OpLoad %v4float %39
-OpStore %34 %43
-OpBranch %38
-%37 = OpLabel
-%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%46 = OpLoad %v4float %44
-OpStore %34 %46
-OpBranch %38
-%38 = OpLabel
-%47 = OpLoad %v4float %34
-OpReturnValue %47
+%35 = OpCompositeConstruct %v4bool %33 %33 %33 %33
+%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%41 = OpLoad %v4float %37
+%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%44 = OpLoad %v4float %42
+%36 = OpSelect %v4float %35 %41 %44
+OpReturnValue %36
 OpFunctionEnd
diff --git a/tests/sksl/shared/DependentInitializers.hlsl b/tests/sksl/shared/DependentInitializers.hlsl
index 547682f..ffa7290 100644
--- a/tests/sksl/shared/DependentInitializers.hlsl
+++ b/tests/sksl/shared/DependentInitializers.hlsl
@@ -17,16 +17,8 @@
     float x = 0.5f;
     float _31 = 0.5f * 2.0f;
     float y = _31;
-    float4 _34 = 0.0f.xxxx;
-    if (_31 == 1.0f)
-    {
-        _34 = _10_colorGreen;
-    }
-    else
-    {
-        _34 = _10_colorRed;
-    }
-    return _34;
+    bool4 _35 = (_31 == 1.0f).xxxx;
+    return float4(_35.x ? _10_colorGreen.x : _10_colorRed.x, _35.y ? _10_colorGreen.y : _10_colorRed.y, _35.z ? _10_colorGreen.z : _10_colorRed.z, _35.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
index 8648bc8..e18ce12 100644
--- a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
+++ b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
@@ -44,9 +44,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %33 Binding 0
 OpDecorate %33 DescriptorSet 0
+OpDecorate %285 RelaxedPrecision
 OpDecorate %287 RelaxedPrecision
-OpDecorate %289 RelaxedPrecision
-OpDecorate %290 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -285,7 +284,6 @@
 %263 = OpVariable %_ptr_Function_v2int Function
 %270 = OpVariable %_ptr_Function_v3int Function
 %277 = OpVariable %_ptr_Function_v4int Function
-%280 = OpVariable %_ptr_Function_v4float Function
 OpSelectionMerge %138 None
 OpBranchConditional %true %137 %138
 %137 = OpLabel
@@ -469,19 +467,11 @@
 OpBranch %274
 %274 = OpLabel
 %279 = OpPhi %bool %false %267 %278 %273
-OpSelectionMerge %283 None
-OpBranchConditional %279 %281 %282
-%281 = OpLabel
-%284 = OpAccessChain %_ptr_Uniform_v4float %33 %int_0
-%287 = OpLoad %v4float %284
-OpStore %280 %287
-OpBranch %283
-%282 = OpLabel
-%288 = OpAccessChain %_ptr_Uniform_v4float %33 %int_1
-%289 = OpLoad %v4float %288
-OpStore %280 %289
-OpBranch %283
-%283 = OpLabel
-%290 = OpLoad %v4float %280
-OpReturnValue %290
+%280 = OpCompositeConstruct %v4bool %279 %279 %279 %279
+%282 = OpAccessChain %_ptr_Uniform_v4float %33 %int_0
+%285 = OpLoad %v4float %282
+%286 = OpAccessChain %_ptr_Uniform_v4float %33 %int_1
+%287 = OpLoad %v4float %286
+%281 = OpSelect %v4float %280 %285 %287
+OpReturnValue %281
 OpFunctionEnd
diff --git a/tests/sksl/shared/FunctionArgTypeMatch.hlsl b/tests/sksl/shared/FunctionArgTypeMatch.hlsl
index 03c51a9..170ad23 100644
--- a/tests/sksl/shared/FunctionArgTypeMatch.hlsl
+++ b/tests/sksl/shared/FunctionArgTypeMatch.hlsl
@@ -358,16 +358,8 @@
     {
         _279 = false;
     }
-    float4 _280 = 0.0f.xxxx;
-    if (_279)
-    {
-        _280 = _33_colorGreen;
-    }
-    else
-    {
-        _280 = _33_colorRed;
-    }
-    return _280;
+    bool4 _280 = _279.xxxx;
+    return float4(_280.x ? _33_colorGreen.x : _33_colorRed.x, _280.y ? _33_colorGreen.y : _33_colorRed.y, _280.z ? _33_colorGreen.z : _33_colorRed.z, _280.w ? _33_colorGreen.w : _33_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
index 0e0c28a..c25253e 100644
--- a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
+++ b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
@@ -89,9 +89,8 @@
 OpDecorate %284 RelaxedPrecision
 OpDecorate %287 RelaxedPrecision
 OpDecorate %288 RelaxedPrecision
+OpDecorate %343 RelaxedPrecision
 OpDecorate %345 RelaxedPrecision
-OpDecorate %347 RelaxedPrecision
-OpDecorate %348 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -299,7 +298,6 @@
 %x20 = OpVariable %_ptr_Function_v2int Function
 %x21 = OpVariable %_ptr_Function_v3int Function
 %x22 = OpVariable %_ptr_Function_v4int Function
-%338 = OpVariable %_ptr_Function_v4float Function
 OpStore %x1 %float_1
 OpStore %x2 %47
 OpStore %x3 %52
@@ -562,19 +560,11 @@
 OpBranch %333
 %333 = OpLabel
 %337 = OpPhi %bool %false %327 %336 %332
-OpSelectionMerge %341 None
-OpBranchConditional %337 %339 %340
-%339 = OpLabel
-%342 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0
-%345 = OpLoad %v4float %342
-OpStore %338 %345
-OpBranch %341
-%340 = OpLabel
-%346 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1
-%347 = OpLoad %v4float %346
-OpStore %338 %347
-OpBranch %341
-%341 = OpLabel
-%348 = OpLoad %v4float %338
-OpReturnValue %348
+%338 = OpCompositeConstruct %v4bool %337 %337 %337 %337
+%340 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0
+%343 = OpLoad %v4float %340
+%344 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1
+%345 = OpLoad %v4float %344
+%339 = OpSelect %v4float %338 %343 %345
+OpReturnValue %339
 OpFunctionEnd
diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.hlsl b/tests/sksl/shared/FunctionReturnTypeMatch.hlsl
index 04f0874..eaef4a2 100644
--- a/tests/sksl/shared/FunctionReturnTypeMatch.hlsl
+++ b/tests/sksl/shared/FunctionReturnTypeMatch.hlsl
@@ -366,16 +366,8 @@
     {
         _337 = false;
     }
-    float4 _338 = 0.0f.xxxx;
-    if (_337)
-    {
-        _338 = _31_colorGreen;
-    }
-    else
-    {
-        _338 = _31_colorRed;
-    }
-    return _338;
+    bool4 _338 = _337.xxxx;
+    return float4(_338.x ? _31_colorGreen.x : _31_colorRed.x, _338.y ? _31_colorGreen.y : _31_colorRed.y, _338.z ? _31_colorGreen.z : _31_colorRed.z, _338.w ? _31_colorGreen.w : _31_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/Functions.asm.frag b/tests/sksl/shared/Functions.asm.frag
index c40af9e..923f74a 100644
--- a/tests/sksl/shared/Functions.asm.frag
+++ b/tests/sksl/shared/Functions.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
 OpDecorate %_arr_float_int_2 ArrayStride 16
+OpDecorate %72 RelaxedPrecision
 OpDecorate %74 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -58,7 +57,7 @@
 %57 = OpTypeFunction %v4float %_ptr_Function_v2float
 %float_10 = OpConstant %float 10
 %float_200 = OpConstant %float 200
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
@@ -105,26 +104,17 @@
 %59 = OpLabel
 %x = OpVariable %_ptr_Function_float Function
 %62 = OpVariable %_ptr_Function_float Function
-%67 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_10
 OpStore %62 %float_10
 %63 = OpFunctionCall %void %bar_vf %62
 %64 = OpLoad %float %62
 OpStore %x %64
 %66 = OpFOrdEqual %bool %64 %float_200
-OpSelectionMerge %71 None
-OpBranchConditional %66 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%74 = OpLoad %v4float %72
-OpStore %67 %74
-OpBranch %71
-%70 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%76 = OpLoad %v4float %75
-OpStore %67 %76
-OpBranch %71
-%71 = OpLabel
-%77 = OpLoad %v4float %67
-OpReturnValue %77
+%68 = OpCompositeConstruct %v4bool %66 %66 %66 %66
+%70 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%72 = OpLoad %v4float %70
+%73 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%74 = OpLoad %v4float %73
+%69 = OpSelect %v4float %68 %72 %74
+OpReturnValue %69
 OpFunctionEnd
diff --git a/tests/sksl/shared/Functions.hlsl b/tests/sksl/shared/Functions.hlsl
index 34d9caa..1225359 100644
--- a/tests/sksl/shared/Functions.hlsl
+++ b/tests/sksl/shared/Functions.hlsl
@@ -32,16 +32,8 @@
     float _62 = 10.0f;
     bar_vf(_62);
     x = _62;
-    float4 _67 = 0.0f.xxxx;
-    if (_62 == 200.0f)
-    {
-        _67 = _12_colorGreen;
-    }
-    else
-    {
-        _67 = _12_colorRed;
-    }
-    return _67;
+    bool4 _68 = (_62 == 200.0f).xxxx;
+    return float4(_68.x ? _12_colorGreen.x : _12_colorRed.x, _68.y ? _12_colorGreen.y : _12_colorRed.y, _68.z ? _12_colorGreen.z : _12_colorRed.z, _68.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/InoutParamsAreDistinct.asm.frag b/tests/sksl/shared/InoutParamsAreDistinct.asm.frag
index 09259ad..177f4dc 100644
--- a/tests/sksl/shared/InoutParamsAreDistinct.asm.frag
+++ b/tests/sksl/shared/InoutParamsAreDistinct.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %41 RelaxedPrecision
 OpDecorate %43 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -54,7 +53,7 @@
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
 %36 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -87,7 +86,6 @@
 %x = OpVariable %_ptr_Function_float Function
 %40 = OpVariable %_ptr_Function_float Function
 %41 = OpVariable %_ptr_Function_float Function
-%45 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_0
 OpStore %40 %float_0
 OpStore %41 %float_0
@@ -96,19 +94,11 @@
 OpStore %x %43
 %44 = OpLoad %float %41
 OpStore %x %44
-OpSelectionMerge %49 None
-OpBranchConditional %42 %47 %48
-%47 = OpLabel
-%50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%54 = OpLoad %v4float %50
-OpStore %45 %54
-OpBranch %49
-%48 = OpLabel
-%55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%57 = OpLoad %v4float %55
-OpStore %45 %57
-OpBranch %49
-%49 = OpLabel
-%58 = OpLoad %v4float %45
-OpReturnValue %58
+%46 = OpCompositeConstruct %v4bool %42 %42 %42 %42
+%48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%52 = OpLoad %v4float %48
+%53 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%55 = OpLoad %v4float %53
+%47 = OpSelect %v4float %46 %52 %55
+OpReturnValue %47
 OpFunctionEnd
diff --git a/tests/sksl/shared/InoutParamsAreDistinct.hlsl b/tests/sksl/shared/InoutParamsAreDistinct.hlsl
index 69b16bf..7987270 100644
--- a/tests/sksl/shared/InoutParamsAreDistinct.hlsl
+++ b/tests/sksl/shared/InoutParamsAreDistinct.hlsl
@@ -36,16 +36,8 @@
     bool _42 = inout_params_are_distinct_bhh(_40, _41);
     x = _40;
     x = _41;
-    float4 _45 = 0.0f.xxxx;
-    if (_42)
-    {
-        _45 = _11_colorGreen;
-    }
-    else
-    {
-        _45 = _11_colorRed;
-    }
-    return _45;
+    bool4 _46 = _42.xxxx;
+    return float4(_46.x ? _11_colorGreen.x : _11_colorRed.x, _46.y ? _11_colorGreen.y : _11_colorRed.y, _46.z ? _11_colorGreen.z : _11_colorRed.z, _46.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/LogicalAndShortCircuit.asm.frag b/tests/sksl/shared/LogicalAndShortCircuit.asm.frag
index 0e70d06..7a51365 100644
--- a/tests/sksl/shared/LogicalAndShortCircuit.asm.frag
+++ b/tests/sksl/shared/LogicalAndShortCircuit.asm.frag
@@ -33,9 +33,8 @@
 OpDecorate %13 Binding 0
 OpDecorate %13 DescriptorSet 0
 OpDecorate %96 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
 OpDecorate %117 RelaxedPrecision
-OpDecorate %119 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -62,7 +61,7 @@
 %int_2 = OpConstant %int 2
 %84 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_bool = OpTypePointer Function %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %18
@@ -176,7 +175,6 @@
 %86 = OpLabel
 %_0_TrueTrue = OpVariable %_ptr_Function_bool Function
 %_2_y = OpVariable %_ptr_Function_int Function
-%109 = OpVariable %_ptr_Function_v4float Function
 OpStore %_2_y %int_1
 %90 = OpIAdd %int %int_1 %int_1
 OpStore %_2_y %90
@@ -213,19 +211,11 @@
 OpBranch %106
 %106 = OpLabel
 %108 = OpPhi %bool %false %102 %107 %105
-OpSelectionMerge %113 None
-OpBranchConditional %108 %111 %112
-%111 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0
-%117 = OpLoad %v4float %114
-OpStore %109 %117
-OpBranch %113
-%112 = OpLabel
-%118 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1
-%119 = OpLoad %v4float %118
-OpStore %109 %119
-OpBranch %113
-%113 = OpLabel
-%120 = OpLoad %v4float %109
-OpReturnValue %120
+%110 = OpCompositeConstruct %v4bool %108 %108 %108 %108
+%112 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0
+%115 = OpLoad %v4float %112
+%116 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1
+%117 = OpLoad %v4float %116
+%111 = OpSelect %v4float %110 %115 %117
+OpReturnValue %111
 OpFunctionEnd
diff --git a/tests/sksl/shared/LogicalAndShortCircuit.hlsl b/tests/sksl/shared/LogicalAndShortCircuit.hlsl
index cf4fb46..b3cca04 100644
--- a/tests/sksl/shared/LogicalAndShortCircuit.hlsl
+++ b/tests/sksl/shared/LogicalAndShortCircuit.hlsl
@@ -155,16 +155,8 @@
     {
         _108 = false;
     }
-    float4 _109 = 0.0f.xxxx;
-    if (_108)
-    {
-        _109 = _13_colorGreen;
-    }
-    else
-    {
-        _109 = _13_colorRed;
-    }
-    return _109;
+    bool4 _110 = _108.xxxx;
+    return float4(_110.x ? _13_colorGreen.x : _13_colorRed.x, _110.y ? _13_colorGreen.y : _13_colorRed.y, _110.z ? _13_colorGreen.z : _13_colorRed.z, _110.w ? _13_colorGreen.w : _13_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/LogicalOrShortCircuit.asm.frag b/tests/sksl/shared/LogicalOrShortCircuit.asm.frag
index 43df203..b0f1252 100644
--- a/tests/sksl/shared/LogicalOrShortCircuit.asm.frag
+++ b/tests/sksl/shared/LogicalOrShortCircuit.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %13 Binding 0
 OpDecorate %13 DescriptorSet 0
+OpDecorate %108 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -61,7 +60,7 @@
 %int_2 = OpConstant %int 2
 %84 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_bool = OpTypePointer Function %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %18
@@ -175,7 +174,6 @@
 %86 = OpLabel
 %_0_TrueTrue = OpVariable %_ptr_Function_bool Function
 %_2_y = OpVariable %_ptr_Function_int Function
-%102 = OpVariable %_ptr_Function_v4float Function
 OpStore %_2_y %int_1
 OpStore %_0_TrueTrue %true
 OpSelectionMerge %91 None
@@ -199,19 +197,11 @@
 OpBranch %99
 %99 = OpLabel
 %101 = OpPhi %bool %false %95 %100 %98
-OpSelectionMerge %106 None
-OpBranchConditional %101 %104 %105
-%104 = OpLabel
-%107 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0
-%110 = OpLoad %v4float %107
-OpStore %102 %110
-OpBranch %106
-%105 = OpLabel
-%111 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1
-%112 = OpLoad %v4float %111
-OpStore %102 %112
-OpBranch %106
-%106 = OpLabel
-%113 = OpLoad %v4float %102
-OpReturnValue %113
+%103 = OpCompositeConstruct %v4bool %101 %101 %101 %101
+%105 = OpAccessChain %_ptr_Uniform_v4float %13 %int_0
+%108 = OpLoad %v4float %105
+%109 = OpAccessChain %_ptr_Uniform_v4float %13 %int_1
+%110 = OpLoad %v4float %109
+%104 = OpSelect %v4float %103 %108 %110
+OpReturnValue %104
 OpFunctionEnd
diff --git a/tests/sksl/shared/LogicalOrShortCircuit.hlsl b/tests/sksl/shared/LogicalOrShortCircuit.hlsl
index 14fc6cf..2ddbb61 100644
--- a/tests/sksl/shared/LogicalOrShortCircuit.hlsl
+++ b/tests/sksl/shared/LogicalOrShortCircuit.hlsl
@@ -145,16 +145,8 @@
     {
         _101 = false;
     }
-    float4 _102 = 0.0f.xxxx;
-    if (_101)
-    {
-        _102 = _13_colorGreen;
-    }
-    else
-    {
-        _102 = _13_colorRed;
-    }
-    return _102;
+    bool4 _103 = _101.xxxx;
+    return float4(_103.x ? _13_colorGreen.x : _13_colorRed.x, _103.y ? _13_colorGreen.y : _13_colorRed.y, _103.z ? _13_colorGreen.z : _13_colorRed.z, _103.w ? _13_colorGreen.w : _13_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/Matrices.asm.frag b/tests/sksl/shared/Matrices.asm.frag
index 1dee651..9285cc3 100644
--- a/tests/sksl/shared/Matrices.asm.frag
+++ b/tests/sksl/shared/Matrices.asm.frag
@@ -90,9 +90,8 @@
 OpDecorate %201 RelaxedPrecision
 OpDecorate %204 RelaxedPrecision
 OpDecorate %207 RelaxedPrecision
-OpDecorate %316 RelaxedPrecision
-OpDecorate %318 RelaxedPrecision
-OpDecorate %319 RelaxedPrecision
+OpDecorate %313 RelaxedPrecision
+OpDecorate %315 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -174,7 +173,6 @@
 %197 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_9
 %198 = OpConstantComposite %mat4v4float %194 %195 %196 %197
 %219 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %17
@@ -385,7 +383,6 @@
 %_4_m5 = OpVariable %_ptr_Function_mat2v2float Function
 %_7_m10 = OpVariable %_ptr_Function_mat4v4float Function
 %_8_m11 = OpVariable %_ptr_Function_mat4v4float Function
-%308 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 OpStore %_1_m1 %39
 OpSelectionMerge %225 None
@@ -505,19 +502,11 @@
 OpBranch %305
 %305 = OpLabel
 %307 = OpPhi %bool %false %301 %306 %304
-OpSelectionMerge %312 None
-OpBranchConditional %307 %310 %311
-%310 = OpLabel
-%313 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%316 = OpLoad %v4float %313
-OpStore %308 %316
-OpBranch %312
-%311 = OpLabel
-%317 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%318 = OpLoad %v4float %317
-OpStore %308 %318
-OpBranch %312
-%312 = OpLabel
-%319 = OpLoad %v4float %308
-OpReturnValue %319
+%308 = OpCompositeConstruct %v4bool %307 %307 %307 %307
+%310 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%313 = OpLoad %v4float %310
+%314 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%315 = OpLoad %v4float %314
+%309 = OpSelect %v4float %308 %313 %315
+OpReturnValue %309
 OpFunctionEnd
diff --git a/tests/sksl/shared/Matrices.hlsl b/tests/sksl/shared/Matrices.hlsl
index 91d46a7..46223b5 100644
--- a/tests/sksl/shared/Matrices.hlsl
+++ b/tests/sksl/shared/Matrices.hlsl
@@ -250,16 +250,8 @@
     {
         _307 = false;
     }
-    float4 _308 = 0.0f.xxxx;
-    if (_307)
-    {
-        _308 = _12_colorGreen;
-    }
-    else
-    {
-        _308 = _12_colorRed;
-    }
-    return _308;
+    bool4 _308 = _307.xxxx;
+    return float4(_308.x ? _12_colorGreen.x : _12_colorRed.x, _308.y ? _12_colorGreen.y : _12_colorRed.y, _308.z ? _12_colorGreen.z : _12_colorRed.z, _308.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatricesNonsquare.asm.frag b/tests/sksl/shared/MatricesNonsquare.asm.frag
index c9b1f22..e69699e 100644
--- a/tests/sksl/shared/MatricesNonsquare.asm.frag
+++ b/tests/sksl/shared/MatricesNonsquare.asm.frag
@@ -91,9 +91,8 @@
 OpDecorate %234 RelaxedPrecision
 OpDecorate %236 RelaxedPrecision
 OpDecorate %237 RelaxedPrecision
+OpDecorate %334 RelaxedPrecision
 OpDecorate %337 RelaxedPrecision
-OpDecorate %340 RelaxedPrecision
-OpDecorate %341 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -189,7 +188,6 @@
 %231 = OpConstantComposite %v4float %float_0 %float_0_75 %float_0 %float_0
 %232 = OpConstantComposite %mat2v4float %230 %231
 %241 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -408,7 +406,6 @@
 %_2_m24 = OpVariable %_ptr_Function_mat2v4float Function
 %_3_m32 = OpVariable %_ptr_Function_mat3v2float Function
 %_7_m22 = OpVariable %_ptr_Function_mat2v2float Function
-%328 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 OpStore %_1_m23 %36
 OpSelectionMerge %247 None
@@ -527,19 +524,11 @@
 OpBranch %325
 %325 = OpLabel
 %327 = OpPhi %bool %false %315 %326 %324
-OpSelectionMerge %332 None
-OpBranchConditional %327 %330 %331
-%330 = OpLabel
-%333 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%337 = OpLoad %v4float %333
-OpStore %328 %337
-OpBranch %332
-%331 = OpLabel
-%338 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%340 = OpLoad %v4float %338
-OpStore %328 %340
-OpBranch %332
-%332 = OpLabel
-%341 = OpLoad %v4float %328
-OpReturnValue %341
+%328 = OpCompositeConstruct %v4bool %327 %327 %327 %327
+%330 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%334 = OpLoad %v4float %330
+%335 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%337 = OpLoad %v4float %335
+%329 = OpSelect %v4float %328 %334 %337
+OpReturnValue %329
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatricesNonsquare.hlsl b/tests/sksl/shared/MatricesNonsquare.hlsl
index 1fdf9d7..24027d2 100644
--- a/tests/sksl/shared/MatricesNonsquare.hlsl
+++ b/tests/sksl/shared/MatricesNonsquare.hlsl
@@ -254,16 +254,8 @@
     {
         _327 = false;
     }
-    float4 _328 = 0.0f.xxxx;
-    if (_327)
-    {
-        _328 = _11_colorGreen;
-    }
-    else
-    {
-        _328 = _11_colorRed;
-    }
-    return _328;
+    bool4 _328 = _327.xxxx;
+    return float4(_328.x ? _11_colorGreen.x : _11_colorRed.x, _328.y ? _11_colorGreen.y : _11_colorRed.y, _328.z ? _11_colorGreen.z : _11_colorRed.z, _328.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixConstructorsES2.asm.frag b/tests/sksl/shared/MatrixConstructorsES2.asm.frag
index 75d8ffe..e2c329b 100644
--- a/tests/sksl/shared/MatrixConstructorsES2.asm.frag
+++ b/tests/sksl/shared/MatrixConstructorsES2.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %135 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %136 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -89,7 +88,6 @@
 %26 = OpLabel
 %f4 = OpVariable %_ptr_Function_v4float Function
 %ok = OpVariable %_ptr_Function_bool Function
-%128 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -174,19 +172,11 @@
 %91 = OpLabel
 %127 = OpPhi %bool %false %64 %126 %90
 OpStore %ok %127
-OpSelectionMerge %131 None
-OpBranchConditional %127 %129 %130
-%129 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%135 = OpLoad %v4float %132
-OpStore %128 %135
-OpBranch %131
-%130 = OpLabel
-%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%138 = OpLoad %v4float %136
-OpStore %128 %138
-OpBranch %131
-%131 = OpLabel
-%139 = OpLoad %v4float %128
-OpReturnValue %139
+%128 = OpCompositeConstruct %v4bool %127 %127 %127 %127
+%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%133 = OpLoad %v4float %130
+%134 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%136 = OpLoad %v4float %134
+%129 = OpSelect %v4float %128 %133 %136
+OpReturnValue %129
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixConstructorsES2.hlsl b/tests/sksl/shared/MatrixConstructorsES2.hlsl
index e71f8af..d176d3b 100644
--- a/tests/sksl/shared/MatrixConstructorsES2.hlsl
+++ b/tests/sksl/shared/MatrixConstructorsES2.hlsl
@@ -51,16 +51,8 @@
         _127 = false;
     }
     ok = _127;
-    float4 _128 = 0.0f.xxxx;
-    if (_127)
-    {
-        _128 = _10_colorGreen;
-    }
-    else
-    {
-        _128 = _10_colorRed;
-    }
-    return _128;
+    bool4 _128 = _127.xxxx;
+    return float4(_128.x ? _10_colorGreen.x : _10_colorRed.x, _128.y ? _10_colorGreen.y : _10_colorRed.y, _128.z ? _10_colorGreen.z : _10_colorRed.z, _128.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixConstructorsES3.asm.frag b/tests/sksl/shared/MatrixConstructorsES3.asm.frag
index 92238d2..f57caef 100644
--- a/tests/sksl/shared/MatrixConstructorsES3.asm.frag
+++ b/tests/sksl/shared/MatrixConstructorsES3.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %183 RelaxedPrecision
-OpDecorate %186 RelaxedPrecision
-OpDecorate %187 RelaxedPrecision
+OpDecorate %181 RelaxedPrecision
+OpDecorate %184 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -95,7 +94,6 @@
 %26 = OpLabel
 %f4 = OpVariable %_ptr_Function_v4float Function
 %ok = OpVariable %_ptr_Function_bool Function
-%176 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
 %33 = OpLoad %mat2v2float %29
 %34 = OpCompositeExtract %float %33 0 0
@@ -230,19 +228,11 @@
 %145 = OpLabel
 %175 = OpPhi %bool %false %112 %174 %144
 OpStore %ok %175
-OpSelectionMerge %179 None
-OpBranchConditional %175 %177 %178
-%177 = OpLabel
-%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%183 = OpLoad %v4float %180
-OpStore %176 %183
-OpBranch %179
-%178 = OpLabel
-%184 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%186 = OpLoad %v4float %184
-OpStore %176 %186
-OpBranch %179
-%179 = OpLabel
-%187 = OpLoad %v4float %176
-OpReturnValue %187
+%176 = OpCompositeConstruct %v4bool %175 %175 %175 %175
+%178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%181 = OpLoad %v4float %178
+%182 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%184 = OpLoad %v4float %182
+%177 = OpSelect %v4float %176 %181 %184
+OpReturnValue %177
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixConstructorsES3.hlsl b/tests/sksl/shared/MatrixConstructorsES3.hlsl
index 917742a..b4fa141 100644
--- a/tests/sksl/shared/MatrixConstructorsES3.hlsl
+++ b/tests/sksl/shared/MatrixConstructorsES3.hlsl
@@ -80,16 +80,8 @@
         _175 = false;
     }
     ok = _175;
-    float4 _176 = 0.0f.xxxx;
-    if (_175)
-    {
-        _176 = _10_colorGreen;
-    }
-    else
-    {
-        _176 = _10_colorRed;
-    }
-    return _176;
+    bool4 _176 = _175.xxxx;
+    return float4(_176.x ? _10_colorGreen.x : _10_colorRed.x, _176.y ? _10_colorGreen.y : _10_colorRed.y, _176.z ? _10_colorGreen.z : _10_colorRed.z, _176.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixEquality.asm.frag b/tests/sksl/shared/MatrixEquality.asm.frag
index f2bc267..4b3318c 100644
--- a/tests/sksl/shared/MatrixEquality.asm.frag
+++ b/tests/sksl/shared/MatrixEquality.asm.frag
@@ -89,9 +89,8 @@
 OpDecorate %467 RelaxedPrecision
 OpDecorate %468 RelaxedPrecision
 OpDecorate %469 RelaxedPrecision
-OpDecorate %573 RelaxedPrecision
-OpDecorate %575 RelaxedPrecision
-OpDecorate %576 RelaxedPrecision
+OpDecorate %570 RelaxedPrecision
+OpDecorate %572 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -177,7 +176,6 @@
 %_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %int_1 = OpConstant %int 1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %19
 %20 = OpLabel
 %23 = OpVariable %_ptr_Function_v2float Function
@@ -195,7 +193,6 @@
 %_3_two = OpVariable %_ptr_Function_float Function
 %_4_nine = OpVariable %_ptr_Function_float Function
 %_5_m = OpVariable %_ptr_Function_mat3v3float Function
-%567 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 OpSelectionMerge %34 None
 OpBranchConditional %true %33 %34
@@ -829,19 +826,11 @@
 %561 = OpLabel
 %566 = OpPhi %bool %false %554 %565 %560
 OpStore %_0_ok %566
-OpSelectionMerge %571 None
-OpBranchConditional %566 %569 %570
-%569 = OpLabel
-%572 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%573 = OpLoad %v4float %572
-OpStore %567 %573
-OpBranch %571
-%570 = OpLabel
-%574 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%575 = OpLoad %v4float %574
-OpStore %567 %575
-OpBranch %571
-%571 = OpLabel
-%576 = OpLoad %v4float %567
-OpReturnValue %576
+%567 = OpCompositeConstruct %v4bool %566 %566 %566 %566
+%569 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%570 = OpLoad %v4float %569
+%571 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%572 = OpLoad %v4float %571
+%568 = OpSelect %v4float %567 %570 %572
+OpReturnValue %568
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixEquality.hlsl b/tests/sksl/shared/MatrixEquality.hlsl
index 2511201..f046f46 100644
--- a/tests/sksl/shared/MatrixEquality.hlsl
+++ b/tests/sksl/shared/MatrixEquality.hlsl
@@ -484,16 +484,8 @@
         _566 = false;
     }
     _RESERVED_IDENTIFIER_FIXUP_0_ok = _566;
-    float4 _567 = 0.0f.xxxx;
-    if (_566)
-    {
-        _567 = _10_colorGreen;
-    }
-    else
-    {
-        _567 = _10_colorRed;
-    }
-    return _567;
+    bool4 _567 = _566.xxxx;
+    return float4(_567.x ? _10_colorGreen.x : _10_colorRed.x, _567.y ? _10_colorGreen.y : _10_colorRed.y, _567.z ? _10_colorGreen.z : _10_colorRed.z, _567.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixIndexLookup.asm.frag b/tests/sksl/shared/MatrixIndexLookup.asm.frag
index 7a664d2..7641030 100644
--- a/tests/sksl/shared/MatrixIndexLookup.asm.frag
+++ b/tests/sksl/shared/MatrixIndexLookup.asm.frag
@@ -37,9 +37,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
+OpDecorate %116 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -182,7 +181,6 @@
 %main = OpFunction %v4float None %104
 %105 = OpFunctionParameter %_ptr_Function_v2float
 %106 = OpLabel
-%112 = OpVariable %_ptr_Function_v4float Function
 %107 = OpFunctionCall %bool %test3x3_b
 OpSelectionMerge %109 None
 OpBranchConditional %107 %108 %109
@@ -191,19 +189,11 @@
 OpBranch %109
 %109 = OpLabel
 %111 = OpPhi %bool %false %106 %110 %108
-OpSelectionMerge %115 None
-OpBranchConditional %111 %113 %114
-%113 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%118 = OpLoad %v4float %116
-OpStore %112 %118
-OpBranch %115
-%114 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%120 = OpLoad %v4float %119
-OpStore %112 %120
-OpBranch %115
-%115 = OpLabel
-%121 = OpLoad %v4float %112
-OpReturnValue %121
+%112 = OpCompositeConstruct %v4bool %111 %111 %111 %111
+%114 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%116 = OpLoad %v4float %114
+%117 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%118 = OpLoad %v4float %117
+%113 = OpSelect %v4float %112 %116 %118
+OpReturnValue %113
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixIndexLookup.hlsl b/tests/sksl/shared/MatrixIndexLookup.hlsl
index 63e1f8b..c393f6d 100644
--- a/tests/sksl/shared/MatrixIndexLookup.hlsl
+++ b/tests/sksl/shared/MatrixIndexLookup.hlsl
@@ -55,16 +55,8 @@
     {
         _111 = false;
     }
-    float4 _112 = 0.0f.xxxx;
-    if (_111)
-    {
-        _112 = _12_colorGreen;
-    }
-    else
-    {
-        _112 = _12_colorRed;
-    }
-    return _112;
+    bool4 _112 = _111.xxxx;
+    return float4(_112.x ? _12_colorGreen.x : _12_colorRed.x, _112.y ? _12_colorGreen.y : _12_colorRed.y, _112.z ? _12_colorGreen.z : _12_colorRed.z, _112.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixIndexStore.asm.frag b/tests/sksl/shared/MatrixIndexStore.asm.frag
index d203ea9..86addd1 100644
--- a/tests/sksl/shared/MatrixIndexStore.asm.frag
+++ b/tests/sksl/shared/MatrixIndexStore.asm.frag
@@ -37,9 +37,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
+OpDecorate %140 RelaxedPrecision
 OpDecorate %142 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -200,7 +199,6 @@
 %main = OpFunction %v4float None %127
 %128 = OpFunctionParameter %_ptr_Function_v2float
 %129 = OpLabel
-%136 = OpVariable %_ptr_Function_v4float Function
 %131 = OpFunctionCall %bool %test3x3_b
 OpSelectionMerge %133 None
 OpBranchConditional %131 %132 %133
@@ -209,19 +207,11 @@
 OpBranch %133
 %133 = OpLabel
 %135 = OpPhi %bool %false %129 %134 %132
-OpSelectionMerge %139 None
-OpBranchConditional %135 %137 %138
-%137 = OpLabel
-%140 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%142 = OpLoad %v4float %140
-OpStore %136 %142
-OpBranch %139
-%138 = OpLabel
-%143 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%144 = OpLoad %v4float %143
-OpStore %136 %144
-OpBranch %139
-%139 = OpLabel
-%145 = OpLoad %v4float %136
-OpReturnValue %145
+%136 = OpCompositeConstruct %v4bool %135 %135 %135 %135
+%138 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%140 = OpLoad %v4float %138
+%141 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%142 = OpLoad %v4float %141
+%137 = OpSelect %v4float %136 %140 %142
+OpReturnValue %137
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixIndexStore.hlsl b/tests/sksl/shared/MatrixIndexStore.hlsl
index ce2f944..d32b5af 100644
--- a/tests/sksl/shared/MatrixIndexStore.hlsl
+++ b/tests/sksl/shared/MatrixIndexStore.hlsl
@@ -49,16 +49,8 @@
     {
         _135 = false;
     }
-    float4 _136 = 0.0f.xxxx;
-    if (_135)
-    {
-        _136 = _12_colorGreen;
-    }
-    else
-    {
-        _136 = _12_colorRed;
-    }
-    return _136;
+    bool4 _136 = _135.xxxx;
+    return float4(_136.x ? _12_colorGreen.x : _12_colorRed.x, _136.y ? _12_colorGreen.y : _12_colorRed.y, _136.z ? _12_colorGreen.z : _12_colorRed.z, _136.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixOpEqualsES2.asm.frag b/tests/sksl/shared/MatrixOpEqualsES2.asm.frag
index ff34994..a2b076c 100644
--- a/tests/sksl/shared/MatrixOpEqualsES2.asm.frag
+++ b/tests/sksl/shared/MatrixOpEqualsES2.asm.frag
@@ -121,9 +121,8 @@
 OpDecorate %305 RelaxedPrecision
 OpDecorate %308 RelaxedPrecision
 OpDecorate %309 RelaxedPrecision
+OpDecorate %492 RelaxedPrecision
 OpDecorate %495 RelaxedPrecision
-OpDecorate %498 RelaxedPrecision
-OpDecorate %499 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -263,7 +262,6 @@
 %299 = OpConstantComposite %v3float %float_240 %float_73 %float_45
 %300 = OpConstantComposite %mat3v3float %297 %298 %299
 %313 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_1 = OpConstant %int 1
@@ -527,7 +525,6 @@
 %_6_m = OpVariable %_ptr_Function_mat2v2float Function
 %_7_m = OpVariable %_ptr_Function_mat2v2float Function
 %_8_m = OpVariable %_ptr_Function_mat3v3float Function
-%486 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 OpStore %_1_splat_4 %35
 OpStore %_2_splat_2 %39
@@ -761,19 +758,11 @@
 OpBranch %483
 %483 = OpLabel
 %485 = OpPhi %bool %false %469 %484 %482
-OpSelectionMerge %490 None
-OpBranchConditional %485 %488 %489
-%488 = OpLabel
-%491 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%495 = OpLoad %v4float %491
-OpStore %486 %495
-OpBranch %490
-%489 = OpLabel
-%496 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%498 = OpLoad %v4float %496
-OpStore %486 %498
-OpBranch %490
-%490 = OpLabel
-%499 = OpLoad %v4float %486
-OpReturnValue %499
+%486 = OpCompositeConstruct %v4bool %485 %485 %485 %485
+%488 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%492 = OpLoad %v4float %488
+%493 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%495 = OpLoad %v4float %493
+%487 = OpSelect %v4float %486 %492 %495
+OpReturnValue %487
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixOpEqualsES2.hlsl b/tests/sksl/shared/MatrixOpEqualsES2.hlsl
index a126081..85d64a3 100644
--- a/tests/sksl/shared/MatrixOpEqualsES2.hlsl
+++ b/tests/sksl/shared/MatrixOpEqualsES2.hlsl
@@ -364,16 +364,8 @@
     {
         _485 = false;
     }
-    float4 _486 = 0.0f.xxxx;
-    if (_485)
-    {
-        _486 = _11_colorGreen;
-    }
-    else
-    {
-        _486 = _11_colorRed;
-    }
-    return _486;
+    bool4 _486 = _485.xxxx;
+    return float4(_486.x ? _11_colorGreen.x : _11_colorRed.x, _486.y ? _11_colorGreen.y : _11_colorRed.y, _486.z ? _11_colorGreen.z : _11_colorRed.z, _486.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixOpEqualsES3.asm.frag b/tests/sksl/shared/MatrixOpEqualsES3.asm.frag
index 02c1194..7f11c69 100644
--- a/tests/sksl/shared/MatrixOpEqualsES3.asm.frag
+++ b/tests/sksl/shared/MatrixOpEqualsES3.asm.frag
@@ -112,9 +112,8 @@
 OpDecorate %295 RelaxedPrecision
 OpDecorate %297 RelaxedPrecision
 OpDecorate %298 RelaxedPrecision
+OpDecorate %462 RelaxedPrecision
 OpDecorate %465 RelaxedPrecision
-OpDecorate %468 RelaxedPrecision
-OpDecorate %469 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -262,7 +261,6 @@
 %292 = OpConstantComposite %v3float %float_54 %float_68 %float_82
 %293 = OpConstantComposite %mat2v3float %291 %292
 %302 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_1 = OpConstant %int 1
@@ -501,7 +499,6 @@
 %_6_m = OpVariable %_ptr_Function_mat4v2float Function
 %_7_m = OpVariable %_ptr_Function_mat2v4float Function
 %_8_m = OpVariable %_ptr_Function_mat2v3float Function
-%456 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 OpStore %_1_splat_4 %34
 OpStore %_2_m %39
@@ -710,19 +707,11 @@
 OpBranch %453
 %453 = OpLabel
 %455 = OpPhi %bool %false %443 %454 %452
-OpSelectionMerge %460 None
-OpBranchConditional %455 %458 %459
-%458 = OpLabel
-%461 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%465 = OpLoad %v4float %461
-OpStore %456 %465
-OpBranch %460
-%459 = OpLabel
-%466 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%468 = OpLoad %v4float %466
-OpStore %456 %468
-OpBranch %460
-%460 = OpLabel
-%469 = OpLoad %v4float %456
-OpReturnValue %469
+%456 = OpCompositeConstruct %v4bool %455 %455 %455 %455
+%458 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%462 = OpLoad %v4float %458
+%463 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%465 = OpLoad %v4float %463
+%457 = OpSelect %v4float %456 %462 %465
+OpReturnValue %457
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixOpEqualsES3.hlsl b/tests/sksl/shared/MatrixOpEqualsES3.hlsl
index 9467d34..aad8578 100644
--- a/tests/sksl/shared/MatrixOpEqualsES3.hlsl
+++ b/tests/sksl/shared/MatrixOpEqualsES3.hlsl
@@ -330,16 +330,8 @@
     {
         _455 = false;
     }
-    float4 _456 = 0.0f.xxxx;
-    if (_455)
-    {
-        _456 = _11_colorGreen;
-    }
-    else
-    {
-        _456 = _11_colorRed;
-    }
-    return _456;
+    bool4 _456 = _455.xxxx;
+    return float4(_456.x ? _11_colorGreen.x : _11_colorRed.x, _456.y ? _11_colorGreen.y : _11_colorRed.y, _456.z ? _11_colorGreen.z : _11_colorRed.z, _456.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixScalarMath.asm.frag b/tests/sksl/shared/MatrixScalarMath.asm.frag
index b3dc135..51fb8fa 100644
--- a/tests/sksl/shared/MatrixScalarMath.asm.frag
+++ b/tests/sksl/shared/MatrixScalarMath.asm.frag
@@ -55,9 +55,8 @@
 OpDecorate %191 RelaxedPrecision
 OpDecorate %202 RelaxedPrecision
 OpDecorate %203 RelaxedPrecision
-OpDecorate %315 RelaxedPrecision
-OpDecorate %317 RelaxedPrecision
-OpDecorate %318 RelaxedPrecision
+OpDecorate %312 RelaxedPrecision
+OpDecorate %314 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -102,7 +101,6 @@
 %float_4 = OpConstant %float 4
 %int_3 = OpConstant %int 3
 %int_4 = OpConstant %int 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
 %22 = OpVariable %_ptr_Function_v2float Function
@@ -293,7 +291,6 @@
 %293 = OpVariable %_ptr_Function_float Function
 %294 = OpVariable %_ptr_Function_float Function
 %302 = OpVariable %_ptr_Function_mat2v2float Function
-%309 = OpVariable %_ptr_Function_v4float Function
 %172 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
 %173 = OpLoad %v4float %172
 %174 = OpCompositeExtract %float %173 1
@@ -450,19 +447,11 @@
 OpBranch %306
 %306 = OpLabel
 %308 = OpPhi %bool %false %288 %307 %305
-OpSelectionMerge %313 None
-OpBranchConditional %308 %311 %312
-%311 = OpLabel
-%314 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%315 = OpLoad %v4float %314
-OpStore %309 %315
-OpBranch %313
-%312 = OpLabel
-%316 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%317 = OpLoad %v4float %316
-OpStore %309 %317
-OpBranch %313
-%313 = OpLabel
-%318 = OpLoad %v4float %309
-OpReturnValue %318
+%309 = OpCompositeConstruct %v4bool %308 %308 %308 %308
+%311 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%312 = OpLoad %v4float %311
+%313 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%314 = OpLoad %v4float %313
+%310 = OpSelect %v4float %309 %312 %314
+OpReturnValue %310
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixScalarMath.hlsl b/tests/sksl/shared/MatrixScalarMath.hlsl
index 5cee43e..30de6a6 100644
--- a/tests/sksl/shared/MatrixScalarMath.hlsl
+++ b/tests/sksl/shared/MatrixScalarMath.hlsl
@@ -193,16 +193,8 @@
     {
         _308 = false;
     }
-    float4 _309 = 0.0f.xxxx;
-    if (_308)
-    {
-        _309 = _12_colorGreen;
-    }
-    else
-    {
-        _309 = _12_colorRed;
-    }
-    return _309;
+    bool4 _309 = _308.xxxx;
+    return float4(_309.x ? _12_colorGreen.x : _12_colorRed.x, _309.y ? _12_colorGreen.y : _12_colorRed.y, _309.z ? _12_colorGreen.z : _12_colorRed.z, _309.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixSwizzleStore.asm.frag b/tests/sksl/shared/MatrixSwizzleStore.asm.frag
index 279df57..b39feb7 100644
--- a/tests/sksl/shared/MatrixSwizzleStore.asm.frag
+++ b/tests/sksl/shared/MatrixSwizzleStore.asm.frag
@@ -36,9 +36,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
+OpDecorate %155 RelaxedPrecision
 OpDecorate %157 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %160 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -164,7 +163,6 @@
 %_0_matrix = OpVariable %_ptr_Function_mat3v3float Function
 %_1_values = OpVariable %_ptr_Function_v3float Function
 %_2_index = OpVariable %_ptr_Function_int Function
-%151 = OpVariable %_ptr_Function_v4float Function
 OpStore %_1_values %100
 OpStore %_2_index %int_0
 OpBranch %102
@@ -223,19 +221,11 @@
 OpBranch %148
 %148 = OpLabel
 %150 = OpPhi %bool %false %106 %149 %147
-OpSelectionMerge %154 None
-OpBranchConditional %150 %152 %153
-%152 = OpLabel
-%155 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%157 = OpLoad %v4float %155
-OpStore %151 %157
-OpBranch %154
-%153 = OpLabel
-%158 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%159 = OpLoad %v4float %158
-OpStore %151 %159
-OpBranch %154
-%154 = OpLabel
-%160 = OpLoad %v4float %151
-OpReturnValue %160
+%151 = OpCompositeConstruct %v4bool %150 %150 %150 %150
+%153 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%155 = OpLoad %v4float %153
+%156 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%157 = OpLoad %v4float %156
+%152 = OpSelect %v4float %151 %155 %157
+OpReturnValue %152
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixSwizzleStore.hlsl b/tests/sksl/shared/MatrixSwizzleStore.hlsl
index 2810103..99add26 100644
--- a/tests/sksl/shared/MatrixSwizzleStore.hlsl
+++ b/tests/sksl/shared/MatrixSwizzleStore.hlsl
@@ -46,16 +46,8 @@
     {
         _150 = false;
     }
-    float4 _151 = 0.0f.xxxx;
-    if (_150)
-    {
-        _151 = _11_colorGreen;
-    }
-    else
-    {
-        _151 = _11_colorRed;
-    }
-    return _151;
+    bool4 _151 = _150.xxxx;
+    return float4(_151.x ? _11_colorGreen.x : _11_colorRed.x, _151.y ? _11_colorGreen.y : _11_colorRed.y, _151.z ? _11_colorGreen.z : _11_colorRed.z, _151.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/MatrixToVectorCast.asm.frag b/tests/sksl/shared/MatrixToVectorCast.asm.frag
index 4292930..8d59871 100644
--- a/tests/sksl/shared/MatrixToVectorCast.asm.frag
+++ b/tests/sksl/shared/MatrixToVectorCast.asm.frag
@@ -51,9 +51,8 @@
 OpDecorate %92 RelaxedPrecision
 OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -90,7 +89,6 @@
 %int_4 = OpConstant %int 4
 %82 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
 %100 = OpConstantComposite %v4bool %true %true %true %true
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %17
@@ -105,7 +103,6 @@
 %25 = OpFunctionParameter %_ptr_Function_v2float
 %26 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
-%104 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 OpSelectionMerge %32 None
 OpBranchConditional %true %31 %32
@@ -181,19 +178,11 @@
 %87 = OpLabel
 %103 = OpPhi %bool %false %65 %102 %86
 OpStore %ok %103
-OpSelectionMerge %108 None
-OpBranchConditional %103 %106 %107
-%106 = OpLabel
-%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%112 = OpLoad %v4float %109
-OpStore %104 %112
-OpBranch %108
-%107 = OpLabel
-%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%114 = OpLoad %v4float %113
-OpStore %104 %114
-OpBranch %108
-%108 = OpLabel
-%115 = OpLoad %v4float %104
-OpReturnValue %115
+%104 = OpCompositeConstruct %v4bool %103 %103 %103 %103
+%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%109 = OpLoad %v4float %106
+%110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%111 = OpLoad %v4float %110
+%105 = OpSelect %v4float %104 %109 %111
+OpReturnValue %105
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixToVectorCast.hlsl b/tests/sksl/shared/MatrixToVectorCast.hlsl
index 1eecbcd..1e5cbf5 100644
--- a/tests/sksl/shared/MatrixToVectorCast.hlsl
+++ b/tests/sksl/shared/MatrixToVectorCast.hlsl
@@ -60,16 +60,8 @@
         _103 = false;
     }
     ok = _103;
-    float4 _104 = 0.0f.xxxx;
-    if (_103)
-    {
-        _104 = _10_colorGreen;
-    }
-    else
-    {
-        _104 = _10_colorRed;
-    }
-    return _104;
+    bool4 _104 = _103.xxxx;
+    return float4(_104.x ? _10_colorGreen.x : _10_colorRed.x, _104.y ? _10_colorGreen.y : _10_colorRed.y, _104.z ? _10_colorGreen.z : _10_colorRed.z, _104.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/Octal.asm.frag b/tests/sksl/shared/Octal.asm.frag
index f02e7b0..ba8a4bb 100644
--- a/tests/sksl/shared/Octal.asm.frag
+++ b/tests/sksl/shared/Octal.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %53 RelaxedPrecision
 OpDecorate %55 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -53,7 +52,7 @@
 %int_n2000000000 = OpConstant %int -2000000000
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
@@ -71,7 +70,6 @@
 %i2 = OpVariable %_ptr_Function_int Function
 %i3 = OpVariable %_ptr_Function_int Function
 %i4 = OpVariable %_ptr_Function_int Function
-%47 = OpVariable %_ptr_Function_v4float Function
 OpStore %i1 %int_1
 OpStore %i2 %int_342391
 OpStore %i3 %int_2000000000
@@ -94,19 +92,11 @@
 OpBranch %45
 %45 = OpLabel
 %46 = OpPhi %bool %false %42 %true %44
-OpSelectionMerge %51 None
-OpBranchConditional %46 %49 %50
-%49 = OpLabel
-%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%55 = OpLoad %v4float %52
-OpStore %47 %55
-OpBranch %51
-%50 = OpLabel
-%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%57 = OpLoad %v4float %56
-OpStore %47 %57
-OpBranch %51
-%51 = OpLabel
-%58 = OpLoad %v4float %47
-OpReturnValue %58
+%48 = OpCompositeConstruct %v4bool %46 %46 %46 %46
+%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%53 = OpLoad %v4float %50
+%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%55 = OpLoad %v4float %54
+%49 = OpSelect %v4float %48 %53 %55
+OpReturnValue %49
 OpFunctionEnd
diff --git a/tests/sksl/shared/Octal.hlsl b/tests/sksl/shared/Octal.hlsl
index 0454677..0e64a45 100644
--- a/tests/sksl/shared/Octal.hlsl
+++ b/tests/sksl/shared/Octal.hlsl
@@ -45,16 +45,8 @@
     {
         _46 = false;
     }
-    float4 _47 = 0.0f.xxxx;
-    if (_46)
-    {
-        _47 = _10_colorGreen;
-    }
-    else
-    {
-        _47 = _10_colorRed;
-    }
-    return _47;
+    bool4 _48 = _46.xxxx;
+    return float4(_48.x ? _10_colorGreen.x : _10_colorRed.x, _48.y ? _10_colorGreen.y : _10_colorRed.y, _48.z ? _10_colorGreen.z : _10_colorRed.z, _48.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OperatorsES2.asm.frag b/tests/sksl/shared/OperatorsES2.asm.frag
index fb2a7a5..ddfac60 100644
--- a/tests/sksl/shared/OperatorsES2.asm.frag
+++ b/tests/sksl/shared/OperatorsES2.asm.frag
@@ -34,9 +34,8 @@
 OpDecorate %10 DescriptorSet 0
 OpDecorate %61 RelaxedPrecision
 OpDecorate %70 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
 OpDecorate %115 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
-OpDecorate %118 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -72,7 +71,7 @@
 %float_6 = OpConstant %float 6
 %int_1 = OpConstant %int 1
 %int_6 = OpConstant %int 6
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
@@ -94,7 +93,6 @@
 %d = OpVariable %_ptr_Function_bool Function
 %e = OpVariable %_ptr_Function_bool Function
 %f = OpVariable %_ptr_Function_bool Function
-%107 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_2
 OpStore %z %int_3
@@ -188,19 +186,11 @@
 OpBranch %105
 %105 = OpLabel
 %106 = OpPhi %bool %false %102 %true %104
-OpSelectionMerge %111 None
-OpBranchConditional %106 %109 %110
-%109 = OpLabel
-%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%115 = OpLoad %v4float %112
-OpStore %107 %115
-OpBranch %111
-%110 = OpLabel
-%116 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%117 = OpLoad %v4float %116
-OpStore %107 %117
-OpBranch %111
-%111 = OpLabel
-%118 = OpLoad %v4float %107
-OpReturnValue %118
+%108 = OpCompositeConstruct %v4bool %106 %106 %106 %106
+%110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%113 = OpLoad %v4float %110
+%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%115 = OpLoad %v4float %114
+%109 = OpSelect %v4float %108 %113 %115
+OpReturnValue %109
 OpFunctionEnd
diff --git a/tests/sksl/shared/OperatorsES2.hlsl b/tests/sksl/shared/OperatorsES2.hlsl
index d722710..872ec52 100644
--- a/tests/sksl/shared/OperatorsES2.hlsl
+++ b/tests/sksl/shared/OperatorsES2.hlsl
@@ -97,16 +97,8 @@
     {
         _106 = false;
     }
-    float4 _107 = 0.0f.xxxx;
-    if (_106)
-    {
-        _107 = _10_colorGreen;
-    }
-    else
-    {
-        _107 = _10_colorRed;
-    }
-    return _107;
+    bool4 _108 = _106.xxxx;
+    return float4(_108.x ? _10_colorGreen.x : _10_colorRed.x, _108.y ? _10_colorGreen.y : _10_colorRed.y, _108.z ? _10_colorGreen.z : _10_colorRed.z, _108.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OperatorsES3.asm.frag b/tests/sksl/shared/OperatorsES3.asm.frag
index b086708..91cdbbd 100644
--- a/tests/sksl/shared/OperatorsES3.asm.frag
+++ b/tests/sksl/shared/OperatorsES3.asm.frag
@@ -36,9 +36,8 @@
 OpDecorate %102 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
 OpDecorate %117 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
 OpDecorate %147 RelaxedPrecision
-OpDecorate %149 RelaxedPrecision
-OpDecorate %150 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -80,7 +79,7 @@
 %float_6 = OpConstant %float 6
 %v2int = OpTypeVector %int 2
 %_ptr_Function_v2int = OpTypePointer Function %v2int
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -101,7 +100,6 @@
 %e = OpVariable %_ptr_Function_bool Function
 %f = OpVariable %_ptr_Function_bool Function
 %w = OpVariable %_ptr_Function_v2int Function
-%141 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_2
 OpStore %z %int_3
@@ -234,19 +232,11 @@
 OpBranch %139
 %139 = OpLabel
 %140 = OpPhi %bool %false %136 %true %138
-OpSelectionMerge %145 None
-OpBranchConditional %140 %143 %144
-%143 = OpLabel
-%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%142 = OpCompositeConstruct %v4bool %140 %140 %140 %140
+%144 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%145 = OpLoad %v4float %144
+%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %147 = OpLoad %v4float %146
-OpStore %141 %147
-OpBranch %145
-%144 = OpLabel
-%148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%149 = OpLoad %v4float %148
-OpStore %141 %149
-OpBranch %145
-%145 = OpLabel
-%150 = OpLoad %v4float %141
-OpReturnValue %150
+%143 = OpSelect %v4float %142 %145 %147
+OpReturnValue %143
 OpFunctionEnd
diff --git a/tests/sksl/shared/OperatorsES3.hlsl b/tests/sksl/shared/OperatorsES3.hlsl
index bb4d0a3..dba9551 100644
--- a/tests/sksl/shared/OperatorsES3.hlsl
+++ b/tests/sksl/shared/OperatorsES3.hlsl
@@ -129,16 +129,8 @@
     {
         _140 = false;
     }
-    float4 _141 = 0.0f.xxxx;
-    if (_140)
-    {
-        _141 = _10_colorGreen;
-    }
-    else
-    {
-        _141 = _10_colorRed;
-    }
-    return _141;
+    bool4 _142 = _140.xxxx;
+    return float4(_142.x ? _10_colorGreen.x : _10_colorRed.x, _142.y ? _10_colorGreen.y : _10_colorRed.y, _142.z ? _10_colorGreen.z : _10_colorRed.z, _142.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OutParams.asm.frag b/tests/sksl/shared/OutParams.asm.frag
index c916220..fbeace4 100644
--- a/tests/sksl/shared/OutParams.asm.frag
+++ b/tests/sksl/shared/OutParams.asm.frag
@@ -188,9 +188,8 @@
 OpDecorate %470 RelaxedPrecision
 OpDecorate %475 RelaxedPrecision
 OpDecorate %480 RelaxedPrecision
+OpDecorate %487 RelaxedPrecision
 OpDecorate %489 RelaxedPrecision
-OpDecorate %491 RelaxedPrecision
-OpDecorate %492 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -567,7 +566,6 @@
 %386 = OpVariable %_ptr_Function_v2bool Function
 %392 = OpVariable %_ptr_Function_bool Function
 %ok = OpVariable %_ptr_Function_bool Function
-%484 = OpVariable %_ptr_Function_v4float Function
 %246 = OpFunctionCall %void %out_half_vh %245
 %247 = OpLoad %float %245
 OpStore %h %247
@@ -805,19 +803,11 @@
 %466 = OpLabel
 %483 = OpPhi %bool %false %452 %482 %479
 OpStore %ok %483
-OpSelectionMerge %487 None
-OpBranchConditional %483 %485 %486
-%485 = OpLabel
-%488 = OpAccessChain %_ptr_Uniform_v4float %32 %int_0
+%484 = OpCompositeConstruct %v4bool %483 %483 %483 %483
+%486 = OpAccessChain %_ptr_Uniform_v4float %32 %int_0
+%487 = OpLoad %v4float %486
+%488 = OpAccessChain %_ptr_Uniform_v4float %32 %int_1
 %489 = OpLoad %v4float %488
-OpStore %484 %489
-OpBranch %487
-%486 = OpLabel
-%490 = OpAccessChain %_ptr_Uniform_v4float %32 %int_1
-%491 = OpLoad %v4float %490
-OpStore %484 %491
-OpBranch %487
-%487 = OpLabel
-%492 = OpLoad %v4float %484
-OpReturnValue %492
+%485 = OpSelect %v4float %484 %487 %489
+OpReturnValue %485
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParams.hlsl b/tests/sksl/shared/OutParams.hlsl
index f817ab0..276dbf9 100644
--- a/tests/sksl/shared/OutParams.hlsl
+++ b/tests/sksl/shared/OutParams.hlsl
@@ -298,16 +298,8 @@
         _483 = false;
     }
     ok = _483;
-    float4 _484 = 0.0f.xxxx;
-    if (_483)
-    {
-        _484 = _32_colorGreen;
-    }
-    else
-    {
-        _484 = _32_colorRed;
-    }
-    return _484;
+    bool4 _484 = _483.xxxx;
+    return float4(_484.x ? _32_colorGreen.x : _32_colorRed.x, _484.y ? _32_colorGreen.y : _32_colorRed.y, _484.z ? _32_colorGreen.z : _32_colorRed.z, _484.w ? _32_colorGreen.w : _32_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OutParamsAreDistinct.asm.frag b/tests/sksl/shared/OutParamsAreDistinct.asm.frag
index 4f08f56..b4e6a34 100644
--- a/tests/sksl/shared/OutParamsAreDistinct.asm.frag
+++ b/tests/sksl/shared/OutParamsAreDistinct.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %41 RelaxedPrecision
 OpDecorate %43 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -54,7 +53,7 @@
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
 %36 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -87,26 +86,17 @@
 %x = OpVariable %_ptr_Function_float Function
 %40 = OpVariable %_ptr_Function_float Function
 %41 = OpVariable %_ptr_Function_float Function
-%45 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_0
 %42 = OpFunctionCall %bool %out_params_are_distinct_bhh %40 %41
 %43 = OpLoad %float %40
 OpStore %x %43
 %44 = OpLoad %float %41
 OpStore %x %44
-OpSelectionMerge %49 None
-OpBranchConditional %42 %47 %48
-%47 = OpLabel
-%50 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%54 = OpLoad %v4float %50
-OpStore %45 %54
-OpBranch %49
-%48 = OpLabel
-%55 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%57 = OpLoad %v4float %55
-OpStore %45 %57
-OpBranch %49
-%49 = OpLabel
-%58 = OpLoad %v4float %45
-OpReturnValue %58
+%46 = OpCompositeConstruct %v4bool %42 %42 %42 %42
+%48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%52 = OpLoad %v4float %48
+%53 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%55 = OpLoad %v4float %53
+%47 = OpSelect %v4float %46 %52 %55
+OpReturnValue %47
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParamsAreDistinct.hlsl b/tests/sksl/shared/OutParamsAreDistinct.hlsl
index cd0bb06..e373703 100644
--- a/tests/sksl/shared/OutParamsAreDistinct.hlsl
+++ b/tests/sksl/shared/OutParamsAreDistinct.hlsl
@@ -36,16 +36,8 @@
     bool _42 = out_params_are_distinct_bhh(_40, _41);
     x = _40;
     x = _41;
-    float4 _45 = 0.0f.xxxx;
-    if (_42)
-    {
-        _45 = _11_colorGreen;
-    }
-    else
-    {
-        _45 = _11_colorRed;
-    }
-    return _45;
+    bool4 _46 = _42.xxxx;
+    return float4(_46.x ? _11_colorGreen.x : _11_colorRed.x, _46.y ? _11_colorGreen.y : _11_colorRed.y, _46.z ? _11_colorGreen.z : _11_colorRed.z, _46.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag
index 7d15ee9..65c36c2 100644
--- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag
+++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %33 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -55,7 +54,7 @@
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
 %39 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -86,24 +85,15 @@
 %40 = OpFunctionParameter %_ptr_Function_v2float
 %41 = OpLabel
 %42 = OpVariable %_ptr_Function_float Function
-%45 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 %43 = OpFunctionCall %bool %out_params_are_distinct_from_global_bh %42
 %44 = OpLoad %float %42
 OpStore %x %44
-OpSelectionMerge %49 None
-OpBranchConditional %43 %47 %48
-%47 = OpLabel
-%50 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
-%54 = OpLoad %v4float %50
-OpStore %45 %54
-OpBranch %49
-%48 = OpLabel
-%55 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
-%57 = OpLoad %v4float %55
-OpStore %45 %57
-OpBranch %49
-%49 = OpLabel
-%58 = OpLoad %v4float %45
-OpReturnValue %58
+%46 = OpCompositeConstruct %v4bool %43 %43 %43 %43
+%48 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
+%52 = OpLoad %v4float %48
+%53 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
+%55 = OpLoad %v4float %53
+%47 = OpSelect %v4float %46 %52 %55
+OpReturnValue %47
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.hlsl b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.hlsl
index af4ccfe..c215e52 100644
--- a/tests/sksl/shared/OutParamsAreDistinctFromGlobal.hlsl
+++ b/tests/sksl/shared/OutParamsAreDistinctFromGlobal.hlsl
@@ -35,16 +35,8 @@
     float _42 = 0.0f;
     bool _43 = out_params_are_distinct_from_global_bh(_42);
     x = _42;
-    float4 _45 = 0.0f.xxxx;
-    if (_43)
-    {
-        _45 = _14_colorGreen;
-    }
-    else
-    {
-        _45 = _14_colorRed;
-    }
-    return _45;
+    bool4 _46 = _43.xxxx;
+    return float4(_46.x ? _14_colorGreen.x : _14_colorRed.x, _46.y ? _14_colorGreen.y : _14_colorRed.y, _46.z ? _14_colorGreen.z : _14_colorRed.z, _46.w ? _14_colorGreen.w : _14_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag b/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag
index 2ccd662..0340079 100644
--- a/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag
+++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.asm.frag
@@ -37,9 +37,8 @@
 OpDecorate %58 RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
 OpDecorate %67 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
 OpDecorate %76 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -69,7 +68,7 @@
 %_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2
 %false = OpConstantFalse %bool
 %float_1 = OpConstant %float 1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
 %22 = OpVariable %_ptr_Function_v2float Function
@@ -103,7 +102,6 @@
 %testArray = OpVariable %_ptr_Function__arr_float_int_2 Function
 %51 = OpVariable %_ptr_Function_float Function
 %56 = OpVariable %_ptr_Function_float Function
-%70 = OpVariable %_ptr_Function_v4float Function
 %50 = OpAccessChain %_ptr_Function_float %testArray %int_0
 %52 = OpFunctionCall %int %out_param_func2_ih %51
 %53 = OpLoad %float %51
@@ -126,19 +124,11 @@
 OpBranch %65
 %65 = OpLabel
 %69 = OpPhi %bool %false %45 %68 %64
-OpSelectionMerge %74 None
-OpBranchConditional %69 %72 %73
-%72 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%71 = OpCompositeConstruct %v4bool %69 %69 %69 %69
+%73 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%74 = OpLoad %v4float %73
+%75 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
 %76 = OpLoad %v4float %75
-OpStore %70 %76
-OpBranch %74
-%73 = OpLabel
-%77 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%78 = OpLoad %v4float %77
-OpStore %70 %78
-OpBranch %74
-%74 = OpLabel
-%79 = OpLoad %v4float %70
-OpReturnValue %79
+%72 = OpSelect %v4float %71 %74 %76
+OpReturnValue %72
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParamsFunctionCallInArgument.hlsl b/tests/sksl/shared/OutParamsFunctionCallInArgument.hlsl
index 242490b..fc0884d 100644
--- a/tests/sksl/shared/OutParamsFunctionCallInArgument.hlsl
+++ b/tests/sksl/shared/OutParamsFunctionCallInArgument.hlsl
@@ -41,16 +41,8 @@
     {
         _69 = false;
     }
-    float4 _70 = 0.0f.xxxx;
-    if (_69)
-    {
-        _70 = _12_colorGreen;
-    }
-    else
-    {
-        _70 = _12_colorRed;
-    }
-    return _70;
+    bool4 _71 = _69.xxxx;
+    return float4(_71.x ? _12_colorGreen.x : _12_colorRed.x, _71.y ? _12_colorGreen.y : _12_colorRed.y, _71.z ? _12_colorGreen.z : _12_colorRed.z, _71.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/OutParamsTricky.asm.frag b/tests/sksl/shared/OutParamsTricky.asm.frag
index 25768f3..fe02227 100644
--- a/tests/sksl/shared/OutParamsTricky.asm.frag
+++ b/tests/sksl/shared/OutParamsTricky.asm.frag
@@ -44,9 +44,8 @@
 OpDecorate %result RelaxedPrecision
 OpDecorate %65 RelaxedPrecision
 OpDecorate %67 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -133,7 +132,6 @@
 %61 = OpLabel
 %result = OpVariable %_ptr_Function_v4float Function
 %65 = OpVariable %_ptr_Function_v4float Function
-%72 = OpVariable %_ptr_Function_v4float Function
 OpStore %result %64
 OpStore %65 %64
 %66 = OpFunctionCall %void %func_vh4 %65
@@ -141,19 +139,11 @@
 OpStore %result %67
 %69 = OpFOrdEqual %v4bool %67 %68
 %71 = OpAll %bool %69
-OpSelectionMerge %75 None
-OpBranchConditional %71 %73 %74
-%73 = OpLabel
-%76 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%80 = OpLoad %v4float %76
-OpStore %72 %80
-OpBranch %75
-%74 = OpLabel
-%81 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%83 = OpLoad %v4float %81
-OpStore %72 %83
-OpBranch %75
-%75 = OpLabel
-%84 = OpLoad %v4float %72
-OpReturnValue %84
+%72 = OpCompositeConstruct %v4bool %71 %71 %71 %71
+%74 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%78 = OpLoad %v4float %74
+%79 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%81 = OpLoad %v4float %79
+%73 = OpSelect %v4float %72 %78 %81
+OpReturnValue %73
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParamsTricky.hlsl b/tests/sksl/shared/OutParamsTricky.hlsl
index 5c87a4f..0f78d826 100644
--- a/tests/sksl/shared/OutParamsTricky.hlsl
+++ b/tests/sksl/shared/OutParamsTricky.hlsl
@@ -36,16 +36,8 @@
     float4 _65 = float4(0.0f, 1.0f, 2.0f, 3.0f);
     func_vh4(_65);
     result = _65;
-    float4 _72 = 0.0f.xxxx;
-    if (all(bool4(_65.x == float4(2.0f, 3.0f, 0.0f, 5.0f).x, _65.y == float4(2.0f, 3.0f, 0.0f, 5.0f).y, _65.z == float4(2.0f, 3.0f, 0.0f, 5.0f).z, _65.w == float4(2.0f, 3.0f, 0.0f, 5.0f).w)))
-    {
-        _72 = _12_colorGreen;
-    }
-    else
-    {
-        _72 = _12_colorRed;
-    }
-    return _72;
+    bool4 _72 = all(bool4(_65.x == float4(2.0f, 3.0f, 0.0f, 5.0f).x, _65.y == float4(2.0f, 3.0f, 0.0f, 5.0f).y, _65.z == float4(2.0f, 3.0f, 0.0f, 5.0f).z, _65.w == float4(2.0f, 3.0f, 0.0f, 5.0f).w)).xxxx;
+    return float4(_72.x ? _12_colorGreen.x : _12_colorRed.x, _72.y ? _12_colorGreen.y : _12_colorRed.y, _72.z ? _12_colorGreen.z : _12_colorRed.z, _72.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/PostfixExpressions.asm.frag b/tests/sksl/shared/PostfixExpressions.asm.frag
index 124cd2c..55d9d95 100644
--- a/tests/sksl/shared/PostfixExpressions.asm.frag
+++ b/tests/sksl/shared/PostfixExpressions.asm.frag
@@ -24,9 +24,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
+OpDecorate %105 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -58,7 +57,7 @@
 %float_1 = OpConstant %float 1
 %float_1_5 = OpConstant %float 1.5
 %float_2_5 = OpConstant %float 2.5
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
@@ -75,7 +74,6 @@
 %ok = OpVariable %_ptr_Function_bool Function
 %i = OpVariable %_ptr_Function_int Function
 %f = OpVariable %_ptr_Function_float Function
-%99 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 OpStore %i %int_5
 %34 = OpIAdd %int %int_5 %int_1
@@ -183,19 +181,11 @@
 %96 = OpLabel
 %98 = OpPhi %bool %false %89 %97 %95
 OpStore %ok %98
-OpSelectionMerge %103 None
-OpBranchConditional %98 %101 %102
-%101 = OpLabel
-%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%107 = OpLoad %v4float %104
-OpStore %99 %107
-OpBranch %103
-%102 = OpLabel
-%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%109 = OpLoad %v4float %108
-OpStore %99 %109
-OpBranch %103
-%103 = OpLabel
-%110 = OpLoad %v4float %99
-OpReturnValue %110
+%100 = OpCompositeConstruct %v4bool %98 %98 %98 %98
+%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%105 = OpLoad %v4float %102
+%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%107 = OpLoad %v4float %106
+%101 = OpSelect %v4float %100 %105 %107
+OpReturnValue %101
 OpFunctionEnd
diff --git a/tests/sksl/shared/PostfixExpressions.hlsl b/tests/sksl/shared/PostfixExpressions.hlsl
index 74ef43c..6625c2d 100644
--- a/tests/sksl/shared/PostfixExpressions.hlsl
+++ b/tests/sksl/shared/PostfixExpressions.hlsl
@@ -133,16 +133,8 @@
         _98 = false;
     }
     ok = _98;
-    float4 _99 = 0.0f.xxxx;
-    if (_98)
-    {
-        _99 = _10_colorGreen;
-    }
-    else
-    {
-        _99 = _10_colorRed;
-    }
-    return _99;
+    bool4 _100 = _98.xxxx;
+    return float4(_100.x ? _10_colorGreen.x : _10_colorRed.x, _100.y ? _10_colorGreen.y : _10_colorRed.y, _100.z ? _10_colorGreen.z : _10_colorRed.z, _100.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/PrefixExpressionsES2.asm.frag b/tests/sksl/shared/PrefixExpressionsES2.asm.frag
index 6a8ef1b..a316fd1 100644
--- a/tests/sksl/shared/PrefixExpressionsES2.asm.frag
+++ b/tests/sksl/shared/PrefixExpressionsES2.asm.frag
@@ -36,9 +36,8 @@
 OpDecorate %104 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
-OpDecorate %165 RelaxedPrecision
-OpDecorate %167 RelaxedPrecision
-OpDecorate %168 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -89,7 +88,6 @@
 %_ptr_Function_v2int = OpTypePointer Function %v2int
 %int_n5 = OpConstant %int -5
 %155 = OpConstantComposite %v2int %int_n5 %int_5
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
 %21 = OpVariable %_ptr_Function_v2float Function
@@ -105,7 +103,6 @@
 %i = OpVariable %_ptr_Function_int Function
 %f = OpVariable %_ptr_Function_float Function
 %iv = OpVariable %_ptr_Function_v2int Function
-%159 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 OpStore %i %int_5
 %35 = OpIAdd %int %int_5 %int_1
@@ -270,19 +267,11 @@
 %153 = OpLabel
 %158 = OpPhi %bool %false %147 %157 %152
 OpStore %ok %158
-OpSelectionMerge %163 None
-OpBranchConditional %158 %161 %162
-%161 = OpLabel
-%164 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%165 = OpLoad %v4float %164
-OpStore %159 %165
-OpBranch %163
-%162 = OpLabel
-%166 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%167 = OpLoad %v4float %166
-OpStore %159 %167
-OpBranch %163
-%163 = OpLabel
-%168 = OpLoad %v4float %159
-OpReturnValue %168
+%159 = OpCompositeConstruct %v4bool %158 %158 %158 %158
+%161 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%162 = OpLoad %v4float %161
+%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%164 = OpLoad %v4float %163
+%160 = OpSelect %v4float %159 %162 %164
+OpReturnValue %160
 OpFunctionEnd
diff --git a/tests/sksl/shared/PrefixExpressionsES2.hlsl b/tests/sksl/shared/PrefixExpressionsES2.hlsl
index af706cc..7e5de34 100644
--- a/tests/sksl/shared/PrefixExpressionsES2.hlsl
+++ b/tests/sksl/shared/PrefixExpressionsES2.hlsl
@@ -184,16 +184,8 @@
         _158 = false;
     }
     ok = _158;
-    float4 _159 = 0.0f.xxxx;
-    if (_158)
-    {
-        _159 = _10_colorGreen;
-    }
-    else
-    {
-        _159 = _10_colorRed;
-    }
-    return _159;
+    bool4 _159 = _158.xxxx;
+    return float4(_159.x ? _10_colorGreen.x : _10_colorRed.x, _159.y ? _10_colorGreen.y : _10_colorRed.y, _159.z ? _10_colorGreen.z : _10_colorRed.z, _159.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/PrefixExpressionsES3.asm.frag b/tests/sksl/shared/PrefixExpressionsES3.asm.frag
index bb09b3e..caa3e4f 100644
--- a/tests/sksl/shared/PrefixExpressionsES3.asm.frag
+++ b/tests/sksl/shared/PrefixExpressionsES3.asm.frag
@@ -27,9 +27,8 @@
 OpDecorate %10 DescriptorSet 0
 OpDecorate %36 RelaxedPrecision
 OpDecorate %37 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %77 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -62,7 +61,7 @@
 %uint_0 = OpConstant %uint 0
 %65 = OpConstantComposite %v2uint %uint_0 %uint_0
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -79,7 +78,6 @@
 %val = OpVariable %_ptr_Function_uint Function
 %mask = OpVariable %_ptr_Function_v2uint Function
 %imask = OpVariable %_ptr_Function_v2int Function
-%70 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 %32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %36 = OpLoad %v4float %32
@@ -114,19 +112,11 @@
 %63 = OpLabel
 %69 = OpPhi %bool %false %25 %68 %62
 OpStore %ok %69
-OpSelectionMerge %74 None
-OpBranchConditional %69 %72 %73
-%72 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%76 = OpLoad %v4float %75
-OpStore %70 %76
-OpBranch %74
-%73 = OpLabel
-%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%79 = OpLoad %v4float %77
-OpStore %70 %79
-OpBranch %74
-%74 = OpLabel
-%80 = OpLoad %v4float %70
-OpReturnValue %80
+%71 = OpCompositeConstruct %v4bool %69 %69 %69 %69
+%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%74 = OpLoad %v4float %73
+%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%77 = OpLoad %v4float %75
+%72 = OpSelect %v4float %71 %74 %77
+OpReturnValue %72
 OpFunctionEnd
diff --git a/tests/sksl/shared/PrefixExpressionsES3.hlsl b/tests/sksl/shared/PrefixExpressionsES3.hlsl
index 2901bd5..529f491 100644
--- a/tests/sksl/shared/PrefixExpressionsES3.hlsl
+++ b/tests/sksl/shared/PrefixExpressionsES3.hlsl
@@ -35,16 +35,8 @@
         _69 = false;
     }
     ok = _69;
-    float4 _70 = 0.0f.xxxx;
-    if (_69)
-    {
-        _70 = _10_colorGreen;
-    }
-    else
-    {
-        _70 = _10_colorRed;
-    }
-    return _70;
+    bool4 _71 = _69.xxxx;
+    return float4(_71.x ? _10_colorGreen.x : _10_colorRed.x, _71.y ? _10_colorGreen.y : _10_colorRed.y, _71.z ? _10_colorGreen.z : _10_colorRed.z, _71.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ResizeMatrix.asm.frag b/tests/sksl/shared/ResizeMatrix.asm.frag
index a9bc7cb..c38f181 100644
--- a/tests/sksl/shared/ResizeMatrix.asm.frag
+++ b/tests/sksl/shared/ResizeMatrix.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %107 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %111 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -74,6 +73,7 @@
 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %float_6 = OpConstant %float 6
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
@@ -94,7 +94,6 @@
 %d = OpVariable %_ptr_Function_mat3v3float Function
 %e = OpVariable %_ptr_Function_mat4v4float Function
 %f = OpVariable %_ptr_Function_mat2v2float Function
-%101 = OpVariable %_ptr_Function_v4float Function
 OpStore %result %float_0
 %38 = OpVectorShuffle %v2float %33 %33 0 1
 %39 = OpVectorShuffle %v2float %34 %34 0 1
@@ -150,19 +149,11 @@
 %98 = OpFAdd %float %86 %97
 OpStore %result %98
 %100 = OpFOrdEqual %bool %98 %float_6
-OpSelectionMerge %104 None
-OpBranchConditional %100 %102 %103
-%102 = OpLabel
-%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%107 = OpLoad %v4float %105
-OpStore %101 %107
-OpBranch %104
-%103 = OpLabel
-%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%110 = OpLoad %v4float %108
-OpStore %101 %110
-OpBranch %104
-%104 = OpLabel
-%111 = OpLoad %v4float %101
-OpReturnValue %111
+%102 = OpCompositeConstruct %v4bool %100 %100 %100 %100
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%106 = OpLoad %v4float %104
+%107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%109 = OpLoad %v4float %107
+%103 = OpSelect %v4float %102 %106 %109
+OpReturnValue %103
 OpFunctionEnd
diff --git a/tests/sksl/shared/ResizeMatrix.hlsl b/tests/sksl/shared/ResizeMatrix.hlsl
index 4af7952..53770d6 100644
--- a/tests/sksl/shared/ResizeMatrix.hlsl
+++ b/tests/sksl/shared/ResizeMatrix.hlsl
@@ -33,16 +33,8 @@
     float2x2 f = float2x2(float4(1.0f, 0.0f, 0.0f, 0.0f).xyz.xy, float4(0.0f, 1.0f, 0.0f, 0.0f).xyz.xy);
     float _98 = _86 + f[0].x;
     result = _98;
-    float4 _101 = 0.0f.xxxx;
-    if (_98 == 6.0f)
-    {
-        _101 = _10_colorGreen;
-    }
-    else
-    {
-        _101 = _10_colorRed;
-    }
-    return _101;
+    bool4 _102 = (_98 == 6.0f).xxxx;
+    return float4(_102.x ? _10_colorGreen.x : _10_colorRed.x, _102.y ? _10_colorGreen.y : _10_colorRed.y, _102.z ? _10_colorGreen.z : _10_colorRed.z, _102.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag b/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag
index 4726d6a..8968738 100644
--- a/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag
+++ b/tests/sksl/shared/ResizeMatrixNonsquare.asm.frag
@@ -28,9 +28,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %105 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,6 +85,7 @@
 %_ptr_Function_mat2v4float = OpTypePointer Function %mat2v4float
 %_ptr_Function_mat4v2float = OpTypePointer Function %mat4v2float
 %float_6 = OpConstant %float 6
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
@@ -106,7 +106,6 @@
 %j = OpVariable %_ptr_Function_mat4v4float Function
 %k = OpVariable %_ptr_Function_mat2v4float Function
 %l = OpVariable %_ptr_Function_mat4v2float Function
-%99 = OpVariable %_ptr_Function_v4float Function
 OpStore %result %float_0
 OpStore %g %38
 %41 = OpAccessChain %_ptr_Function_v3float %g %int_0
@@ -148,19 +147,11 @@
 %96 = OpFAdd %float %87 %95
 OpStore %result %96
 %98 = OpFOrdEqual %bool %96 %float_6
-OpSelectionMerge %102 None
-OpBranchConditional %98 %100 %101
-%100 = OpLabel
-%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%105 = OpLoad %v4float %103
-OpStore %99 %105
-OpBranch %102
-%101 = OpLabel
-%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%108 = OpLoad %v4float %106
-OpStore %99 %108
-OpBranch %102
-%102 = OpLabel
-%109 = OpLoad %v4float %99
-OpReturnValue %109
+%100 = OpCompositeConstruct %v4bool %98 %98 %98 %98
+%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%104 = OpLoad %v4float %102
+%105 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%107 = OpLoad %v4float %105
+%101 = OpSelect %v4float %100 %104 %107
+OpReturnValue %101
 OpFunctionEnd
diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.hlsl b/tests/sksl/shared/ResizeMatrixNonsquare.hlsl
index 2696269..03d9eed 100644
--- a/tests/sksl/shared/ResizeMatrixNonsquare.hlsl
+++ b/tests/sksl/shared/ResizeMatrixNonsquare.hlsl
@@ -33,16 +33,8 @@
     float4x2 l = float4x2(float4(1.0f, 0.0f, 0.0f, 0.0f).xy, float4(0.0f, 1.0f, 0.0f, 0.0f).xy, 0.0f.xx, 0.0f.xx);
     float _96 = _87 + l[0].x;
     result = _96;
-    float4 _99 = 0.0f.xxxx;
-    if (_96 == 6.0f)
-    {
-        _99 = _10_colorGreen;
-    }
-    else
-    {
-        _99 = _10_colorRed;
-    }
-    return _99;
+    bool4 _100 = (_96 == 6.0f).xxxx;
+    return float4(_100.x ? _10_colorGreen.x : _10_colorRed.x, _100.y ? _10_colorGreen.y : _10_colorRed.y, _100.z ? _10_colorGreen.z : _10_colorRed.z, _100.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
index 91ddd75..28dc37f 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
@@ -38,9 +38,8 @@
 OpDecorate %92 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
+OpDecorate %141 RelaxedPrecision
 OpDecorate %143 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
-OpDecorate %146 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -72,7 +71,7 @@
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
 %113 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %20
 %21 = OpLabel
@@ -219,7 +218,6 @@
 %main = OpFunction %v4float None %113
 %114 = OpFunctionParameter %_ptr_Function_v2float
 %115 = OpLabel
-%136 = OpVariable %_ptr_Function_v4float Function
 OpSelectionMerge %117 None
 OpBranchConditional %true %116 %117
 %116 = OpLabel
@@ -255,19 +253,11 @@
 OpBranch %133
 %133 = OpLabel
 %135 = OpPhi %bool %false %129 %134 %132
-OpSelectionMerge %140 None
-OpBranchConditional %135 %138 %139
-%138 = OpLabel
-%141 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
-%143 = OpLoad %v4float %141
-OpStore %136 %143
-OpBranch %140
-%139 = OpLabel
-%144 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1
-%145 = OpLoad %v4float %144
-OpStore %136 %145
-OpBranch %140
-%140 = OpLabel
-%146 = OpLoad %v4float %136
-OpReturnValue %146
+%137 = OpCompositeConstruct %v4bool %135 %135 %135 %135
+%139 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
+%141 = OpLoad %v4float %139
+%142 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1
+%143 = OpLoad %v4float %142
+%138 = OpSelect %v4float %137 %141 %143
+OpReturnValue %138
 OpFunctionEnd
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.hlsl b/tests/sksl/shared/ReturnsValueOnEveryPathES2.hlsl
index bb2612c..c2d0e97 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.hlsl
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.hlsl
@@ -136,16 +136,8 @@
     {
         _135 = false;
     }
-    float4 _136 = 0.0f.xxxx;
-    if (_135)
-    {
-        _136 = _15_colorGreen;
-    }
-    else
-    {
-        _136 = _15_colorRed;
-    }
-    return _136;
+    bool4 _137 = _135.xxxx;
+    return float4(_137.x ? _15_colorGreen.x : _15_colorRed.x, _137.y ? _15_colorGreen.y : _15_colorRed.y, _137.z ? _15_colorGreen.z : _15_colorRed.z, _137.w ? _15_colorGreen.w : _15_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag b/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag
index b0ba0db..111be01 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES3.asm.frag
@@ -48,9 +48,8 @@
 OpDecorate %145 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
+OpDecorate %215 RelaxedPrecision
 OpDecorate %217 RelaxedPrecision
-OpDecorate %219 RelaxedPrecision
-OpDecorate %220 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -79,7 +78,7 @@
 %int_10 = OpConstant %int 10
 %int_1 = OpConstant %int 1
 %162 = OpTypeFunction %v4float %_ptr_Function_v2float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %27
 %28 = OpLabel
@@ -318,7 +317,6 @@
 %main = OpFunction %v4float None %162
 %163 = OpFunctionParameter %_ptr_Function_v2float
 %164 = OpLabel
-%210 = OpVariable %_ptr_Function_v4float Function
 %165 = OpFunctionCall %bool %inside_while_loop_b
 OpSelectionMerge %167 None
 OpBranchConditional %165 %166 %167
@@ -397,19 +395,11 @@
 OpBranch %207
 %207 = OpLabel
 %209 = OpPhi %bool %false %203 %208 %206
-OpSelectionMerge %214 None
-OpBranchConditional %209 %212 %213
-%212 = OpLabel
-%215 = OpAccessChain %_ptr_Uniform_v4float %22 %int_0
-%217 = OpLoad %v4float %215
-OpStore %210 %217
-OpBranch %214
-%213 = OpLabel
-%218 = OpAccessChain %_ptr_Uniform_v4float %22 %int_1
-%219 = OpLoad %v4float %218
-OpStore %210 %219
-OpBranch %214
-%214 = OpLabel
-%220 = OpLoad %v4float %210
-OpReturnValue %220
+%211 = OpCompositeConstruct %v4bool %209 %209 %209 %209
+%213 = OpAccessChain %_ptr_Uniform_v4float %22 %int_0
+%215 = OpLoad %v4float %213
+%216 = OpAccessChain %_ptr_Uniform_v4float %22 %int_1
+%217 = OpLoad %v4float %216
+%212 = OpSelect %v4float %211 %215 %217
+OpReturnValue %212
 OpFunctionEnd
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES3.hlsl b/tests/sksl/shared/ReturnsValueOnEveryPathES3.hlsl
index c2deb33..3e7b291 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES3.hlsl
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES3.hlsl
@@ -281,16 +281,8 @@
     {
         _209 = false;
     }
-    float4 _210 = 0.0f.xxxx;
-    if (_209)
-    {
-        _210 = _22_colorGreen;
-    }
-    else
-    {
-        _210 = _22_colorRed;
-    }
-    return _210;
+    bool4 _211 = _209.xxxx;
+    return float4(_211.x ? _22_colorGreen.x : _22_colorRed.x, _211.y ? _22_colorGreen.y : _22_colorRed.y, _211.z ? _22_colorGreen.z : _22_colorRed.z, _211.w ? _22_colorGreen.w : _22_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SampleLocations.asm.vert b/tests/sksl/shared/SampleLocations.asm.vert
index 565fc41..2f10356 100644
--- a/tests/sksl/shared/SampleLocations.asm.vert
+++ b/tests/sksl/shared/SampleLocations.asm.vert
@@ -77,8 +77,6 @@
 %t = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_float Function
 %vertexpos = OpVariable %_ptr_Function_v2float Function
-%92 = OpVariable %_ptr_Function_float Function
-%104 = OpVariable %_ptr_Function_float Function
 %20 = OpLoad %int %sk_InstanceID
 %22 = OpSMod %int %20 %int_200
 OpStore %x %22
@@ -143,59 +141,41 @@
 %89 = OpLoad %int %sk_VertexID
 %90 = OpSMod %int %89 %int_2
 %91 = OpIEqual %bool %int_0 %90
-OpSelectionMerge %95 None
-OpBranchConditional %91 %93 %94
-%93 = OpLabel
-OpStore %92 %73
-OpBranch %95
-%94 = OpLabel
-OpStore %92 %77
-OpBranch %95
-%95 = OpLabel
-%96 = OpLoad %float %92
-%97 = OpFAdd %float %88 %96
-%98 = OpAccessChain %_ptr_Function_float %vertexpos %int_0
-OpStore %98 %97
-%99 = OpLoad %int %y
-%100 = OpConvertSToF %float %99
-%101 = OpLoad %int %sk_VertexID
-%102 = OpSDiv %int %101 %int_2
-%103 = OpIEqual %bool %int_0 %102
-OpSelectionMerge %107 None
-OpBranchConditional %103 %105 %106
-%105 = OpLabel
-%108 = OpLoad %float %t
-OpStore %104 %108
-OpBranch %107
-%106 = OpLabel
-%109 = OpLoad %float %b
-OpStore %104 %109
-OpBranch %107
-%107 = OpLabel
-%110 = OpLoad %float %104
-%111 = OpFAdd %float %100 %110
-%112 = OpAccessChain %_ptr_Function_float %vertexpos %int_1
-OpStore %112 %111
+%92 = OpSelect %float %91 %73 %77
+%93 = OpFAdd %float %88 %92
+%94 = OpAccessChain %_ptr_Function_float %vertexpos %int_0
+OpStore %94 %93
+%95 = OpLoad %int %y
+%96 = OpConvertSToF %float %95
+%97 = OpLoad %int %sk_VertexID
+%98 = OpSDiv %int %97 %int_2
+%99 = OpIEqual %bool %int_0 %98
+%101 = OpLoad %float %t
+%102 = OpLoad %float %b
+%100 = OpSelect %float %99 %101 %102
+%103 = OpFAdd %float %96 %100
+%104 = OpAccessChain %_ptr_Function_float %vertexpos %int_1
+OpStore %104 %103
+%105 = OpLoad %int %sk_VertexID
+%106 = OpSMod %int %105 %int_2
+%107 = OpIEqual %bool %int_0 %106
+%108 = OpSelect %int %107 %int_n1 %int_1
+%110 = OpConvertSToF %float %108
+%111 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0
+OpStore %111 %110
 %113 = OpLoad %int %sk_VertexID
-%114 = OpSMod %int %113 %int_2
+%114 = OpSDiv %int %113 %int_2
 %115 = OpIEqual %bool %int_0 %114
 %116 = OpSelect %int %115 %int_n1 %int_1
-%118 = OpConvertSToF %float %116
-%119 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0
-OpStore %119 %118
-%121 = OpLoad %int %sk_VertexID
-%122 = OpSDiv %int %121 %int_2
-%123 = OpIEqual %bool %int_0 %122
-%124 = OpSelect %int %123 %int_n1 %int_1
-%125 = OpConvertSToF %float %124
-%126 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1
+%117 = OpConvertSToF %float %116
+%118 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1
+OpStore %118 %117
+%119 = OpLoad %v2float %vertexpos
+%120 = OpCompositeExtract %float %119 0
+%121 = OpLoad %v2float %vertexpos
+%122 = OpCompositeExtract %float %121 1
+%125 = OpCompositeConstruct %v4float %120 %122 %float_0 %float_1
+%126 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %126 %125
-%127 = OpLoad %v2float %vertexpos
-%128 = OpCompositeExtract %float %127 0
-%129 = OpLoad %v2float %vertexpos
-%130 = OpCompositeExtract %float %129 1
-%133 = OpCompositeConstruct %v4float %128 %130 %float_0 %float_1
-%134 = OpAccessChain %_ptr_Output_v4float %3 %int_0
-OpStore %134 %133
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/SampleLocations.hlsl b/tests/sksl/shared/SampleLocations.hlsl
index 37572a9..f16a28b 100644
--- a/tests/sksl/shared/SampleLocations.hlsl
+++ b/tests/sksl/shared/SampleLocations.hlsl
@@ -46,27 +46,9 @@
     float r = _77;
     float t = (float(_45) * 0.0625f) - _63;
     float b = (float(_53) * 0.0625f) + _63;
-    float _92 = 0.0f;
-    if (0 == (gl_VertexIndex % 2))
-    {
-        _92 = _73;
-    }
-    else
-    {
-        _92 = _77;
-    }
     float2 vertexpos = 0.0f.xx;
-    vertexpos.x = float(_22) + _92;
-    float _104 = 0.0f;
-    if (0 == (gl_VertexIndex / 2))
-    {
-        _104 = t;
-    }
-    else
-    {
-        _104 = b;
-    }
-    vertexpos.y = float(y) + _104;
+    vertexpos.x = float(_22) + ((0 == (gl_VertexIndex % 2)) ? _73 : _77);
+    vertexpos.y = float(y) + ((0 == (gl_VertexIndex / 2)) ? t : b);
     vcoord_Stage0.x = float((0 == (gl_VertexIndex % 2)) ? (-1) : 1);
     vcoord_Stage0.y = float((0 == (gl_VertexIndex / 2)) ? (-1) : 1);
     gl_Position = float4(vertexpos.x, vertexpos.y, 0.0f, 1.0f);
diff --git a/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag b/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag
index af37bd8..18956d4 100644
--- a/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag
+++ b/tests/sksl/shared/ScalarConversionConstructorsES2.asm.frag
@@ -53,9 +53,8 @@
 OpDecorate %74 RelaxedPrecision
 OpDecorate %75 RelaxedPrecision
 OpDecorate %76 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -82,7 +81,7 @@
 %float_1 = OpConstant %float 1
 %int_1 = OpConstant %int 1
 %float_9 = OpConstant %float 9
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -106,7 +105,6 @@
 %b1 = OpVariable %_ptr_Function_bool Function
 %b2 = OpVariable %_ptr_Function_bool Function
 %b3 = OpVariable %_ptr_Function_bool Function
-%79 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 1
@@ -151,19 +149,11 @@
 %75 = OpSelect %float %45 %float_1 %float_0
 %76 = OpFAdd %float %74 %75
 %78 = OpFOrdEqual %bool %76 %float_9
-OpSelectionMerge %83 None
-OpBranchConditional %78 %81 %82
-%81 = OpLabel
-%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%80 = OpCompositeConstruct %v4bool %78 %78 %78 %78
+%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%83 = OpLoad %v4float %82
+%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %85 = OpLoad %v4float %84
-OpStore %79 %85
-OpBranch %83
-%82 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%87 = OpLoad %v4float %86
-OpStore %79 %87
-OpBranch %83
-%83 = OpLabel
-%88 = OpLoad %v4float %79
-OpReturnValue %88
+%81 = OpSelect %v4float %80 %83 %85
+OpReturnValue %81
 OpFunctionEnd
diff --git a/tests/sksl/shared/ScalarConversionConstructorsES2.hlsl b/tests/sksl/shared/ScalarConversionConstructorsES2.hlsl
index 84f9097..d4b7d85 100644
--- a/tests/sksl/shared/ScalarConversionConstructorsES2.hlsl
+++ b/tests/sksl/shared/ScalarConversionConstructorsES2.hlsl
@@ -34,16 +34,8 @@
     bool _61 = _39 != 0;
     bool b2 = _61;
     bool b3 = _45;
-    float4 _79 = 0.0f.xxxx;
-    if (((((((((_10_colorGreen.y + _48) + _50) + float(_53)) + float(_39)) + float(_56)) + float(_59)) + float(_61)) + float(_45)) == 9.0f)
-    {
-        _79 = _10_colorGreen;
-    }
-    else
-    {
-        _79 = _10_colorRed;
-    }
-    return _79;
+    bool4 _80 = (((((((((_10_colorGreen.y + _48) + _50) + float(_53)) + float(_39)) + float(_56)) + float(_59)) + float(_61)) + float(_45)) == 9.0f).xxxx;
+    return float4(_80.x ? _10_colorGreen.x : _10_colorRed.x, _80.y ? _10_colorGreen.y : _10_colorRed.y, _80.z ? _10_colorGreen.z : _10_colorRed.z, _80.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag b/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag
index e964eb3..89f0412 100644
--- a/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag
+++ b/tests/sksl/shared/ScalarConversionConstructorsES3.asm.frag
@@ -76,9 +76,8 @@
 OpDecorate %109 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
 OpDecorate %120 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -109,7 +108,7 @@
 %uint_1 = OpConstant %uint 1
 %uint_0 = OpConstant %uint 0
 %float_16 = OpConstant %float 16
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -141,7 +140,6 @@
 %b2 = OpVariable %_ptr_Function_bool Function
 %b3 = OpVariable %_ptr_Function_bool Function
 %b4 = OpVariable %_ptr_Function_bool Function
-%114 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpCompositeExtract %float %32 1
@@ -217,19 +215,11 @@
 %110 = OpSelect %float %52 %float_1 %float_0
 %111 = OpFAdd %float %109 %110
 %113 = OpFOrdEqual %bool %111 %float_16
-OpSelectionMerge %118 None
-OpBranchConditional %113 %116 %117
-%116 = OpLabel
-%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%115 = OpCompositeConstruct %v4bool %113 %113 %113 %113
+%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%118 = OpLoad %v4float %117
+%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %120 = OpLoad %v4float %119
-OpStore %114 %120
-OpBranch %118
-%117 = OpLabel
-%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%122 = OpLoad %v4float %121
-OpStore %114 %122
-OpBranch %118
-%118 = OpLabel
-%123 = OpLoad %v4float %114
-OpReturnValue %123
+%116 = OpSelect %v4float %115 %118 %120
+OpReturnValue %116
 OpFunctionEnd
diff --git a/tests/sksl/shared/ScalarConversionConstructorsES3.hlsl b/tests/sksl/shared/ScalarConversionConstructorsES3.hlsl
index 19885ce..cb7fbc3 100644
--- a/tests/sksl/shared/ScalarConversionConstructorsES3.hlsl
+++ b/tests/sksl/shared/ScalarConversionConstructorsES3.hlsl
@@ -49,16 +49,8 @@
     bool _83 = _46 != 0u;
     bool b3 = _83;
     bool b4 = _52;
-    float4 _114 = 0.0f.xxxx;
-    if ((((((((((((((((_10_colorGreen.y + _55) + _57) + _59) + float(_62)) + float(_39)) + float(_65)) + float(_67)) + float(_70)) + float(_72)) + float(_46)) + float(_75)) + float(_79)) + float(_81)) + float(_83)) + float(_52)) == 16.0f)
-    {
-        _114 = _10_colorGreen;
-    }
-    else
-    {
-        _114 = _10_colorRed;
-    }
-    return _114;
+    bool4 _115 = ((((((((((((((((_10_colorGreen.y + _55) + _57) + _59) + float(_62)) + float(_39)) + float(_65)) + float(_67)) + float(_70)) + float(_72)) + float(_46)) + float(_75)) + float(_79)) + float(_81)) + float(_83)) + float(_52)) == 16.0f).xxxx;
+    return float4(_115.x ? _10_colorGreen.x : _10_colorRed.x, _115.y ? _10_colorGreen.y : _10_colorRed.y, _115.z ? _10_colorGreen.z : _10_colorRed.z, _115.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/ScopedSymbol.asm.frag b/tests/sksl/shared/ScopedSymbol.asm.frag
index 6f7811e..591c7c9 100644
--- a/tests/sksl/shared/ScopedSymbol.asm.frag
+++ b/tests/sksl/shared/ScopedSymbol.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %17 Binding 0
 OpDecorate %17 DescriptorSet 0
 OpMemberDecorate %S_0 0 Offset 0
+OpDecorate %77 RelaxedPrecision
 OpDecorate %79 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -65,7 +64,7 @@
 %_ptr_Function_int = OpTypePointer Function %int
 %52 = OpTypeFunction %v4float %_ptr_Function_v2float
 %false = OpConstantFalse %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %22
 %23 = OpLabel
@@ -106,7 +105,6 @@
 %main = OpFunction %v4float None %52
 %53 = OpFunctionParameter %_ptr_Function_v2float
 %54 = OpLabel
-%72 = OpVariable %_ptr_Function_v4float Function
 OpStore %glob %int_2
 OpSelectionMerge %57 None
 OpBranchConditional %true %56 %57
@@ -136,19 +134,11 @@
 OpBranch %69
 %69 = OpLabel
 %71 = OpPhi %bool %false %65 %70 %68
-OpSelectionMerge %76 None
-OpBranchConditional %71 %74 %75
-%74 = OpLabel
-%77 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0
-%79 = OpLoad %v4float %77
-OpStore %72 %79
-OpBranch %76
-%75 = OpLabel
-%80 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1
-%81 = OpLoad %v4float %80
-OpStore %72 %81
-OpBranch %76
-%76 = OpLabel
-%82 = OpLoad %v4float %72
-OpReturnValue %82
+%73 = OpCompositeConstruct %v4bool %71 %71 %71 %71
+%75 = OpAccessChain %_ptr_Uniform_v4float %17 %int_0
+%77 = OpLoad %v4float %75
+%78 = OpAccessChain %_ptr_Uniform_v4float %17 %int_1
+%79 = OpLoad %v4float %78
+%74 = OpSelect %v4float %73 %77 %79
+OpReturnValue %74
 OpFunctionEnd
diff --git a/tests/sksl/shared/ScopedSymbol.hlsl b/tests/sksl/shared/ScopedSymbol.hlsl
index 683e5c0..74c1dfc 100644
--- a/tests/sksl/shared/ScopedSymbol.hlsl
+++ b/tests/sksl/shared/ScopedSymbol.hlsl
@@ -82,16 +82,8 @@
     {
         _71 = false;
     }
-    float4 _72 = 0.0f.xxxx;
-    if (_71)
-    {
-        _72 = _17_colorGreen;
-    }
-    else
-    {
-        _72 = _17_colorRed;
-    }
-    return _72;
+    bool4 _73 = _71.xxxx;
+    return float4(_73.x ? _17_colorGreen.x : _17_colorRed.x, _73.y ? _17_colorGreen.y : _17_colorRed.y, _73.z ? _17_colorGreen.z : _17_colorRed.z, _73.w ? _17_colorGreen.w : _17_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/StructComparison.asm.frag b/tests/sksl/shared/StructComparison.asm.frag
index ea5349b..f513b39 100644
--- a/tests/sksl/shared/StructComparison.asm.frag
+++ b/tests/sksl/shared/StructComparison.asm.frag
@@ -44,9 +44,8 @@
 OpDecorate %63 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
 OpDecorate %105 RelaxedPrecision
-OpDecorate %107 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -88,7 +87,7 @@
 %false = OpConstantFalse %bool
 %true = OpConstantTrue %bool
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %18
@@ -106,7 +105,6 @@
 %s1 = OpVariable %_ptr_Function_S Function
 %s2 = OpVariable %_ptr_Function_S Function
 %s3 = OpVariable %_ptr_Function_S Function
-%97 = OpVariable %_ptr_Function_v4float Function
 %36 = OpCompositeConstruct %_arr_float_int_5 %float_1 %float_2 %float_3 %float_4 %float_5
 OpStore %array %36
 %46 = OpCompositeConstruct %S %int_1 %int_2 %45 %36
@@ -157,19 +155,11 @@
 OpBranch %83
 %83 = OpLabel
 %96 = OpPhi %bool %false %28 %95 %82
-OpSelectionMerge %101 None
-OpBranchConditional %96 %99 %100
-%99 = OpLabel
-%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%105 = OpLoad %v4float %102
-OpStore %97 %105
-OpBranch %101
-%100 = OpLabel
-%106 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%107 = OpLoad %v4float %106
-OpStore %97 %107
-OpBranch %101
-%101 = OpLabel
-%108 = OpLoad %v4float %97
-OpReturnValue %108
+%98 = OpCompositeConstruct %v4bool %96 %96 %96 %96
+%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%103 = OpLoad %v4float %100
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%105 = OpLoad %v4float %104
+%99 = OpSelect %v4float %98 %103 %105
+OpReturnValue %99
 OpFunctionEnd
diff --git a/tests/sksl/shared/StructComparison.hlsl b/tests/sksl/shared/StructComparison.hlsl
index e6bc15f..8ea8ce4 100644
--- a/tests/sksl/shared/StructComparison.hlsl
+++ b/tests/sksl/shared/StructComparison.hlsl
@@ -40,16 +40,8 @@
     {
         _96 = false;
     }
-    float4 _97 = 0.0f.xxxx;
-    if (_96)
-    {
-        _97 = _10_colorGreen;
-    }
-    else
-    {
-        _97 = _10_colorRed;
-    }
-    return _97;
+    bool4 _98 = _96.xxxx;
+    return float4(_98.x ? _10_colorGreen.x : _10_colorRed.x, _98.y ? _10_colorGreen.y : _10_colorRed.y, _98.z ? _10_colorGreen.z : _10_colorRed.z, _98.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/StructIndexStore.asm.frag b/tests/sksl/shared/StructIndexStore.asm.frag
index e39beb3..e049394 100644
--- a/tests/sksl/shared/StructIndexStore.asm.frag
+++ b/tests/sksl/shared/StructIndexStore.asm.frag
@@ -42,9 +42,8 @@
 OpMemberDecorate %Root 0 Offset 0
 OpMemberDecorate %Root 1 Offset 16
 OpMemberDecorate %Root 1 RelaxedPrecision
+OpDecorate %196 RelaxedPrecision
 OpDecorate %198 RelaxedPrecision
-OpDecorate %200 RelaxedPrecision
-OpDecorate %201 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -118,7 +117,7 @@
 %float_90 = OpConstant %float 90
 %float_900 = OpConstant %float 900
 %187 = OpConstantComposite %v3float %float_9 %float_90 %float_900
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -137,7 +136,6 @@
 %j = OpVariable %_ptr_Function_int Function
 %k = OpVariable %_ptr_Function_int Function
 %ok = OpVariable %_ptr_Function_bool Function
-%191 = OpVariable %_ptr_Function_v4float Function
 %38 = OpAccessChain %_ptr_Function_int %data %int_0
 OpStore %38 %int_1234
 OpStore %values %42
@@ -297,19 +295,11 @@
 %181 = OpLabel
 %190 = OpPhi %bool %false %170 %189 %180
 OpStore %ok %190
-OpSelectionMerge %195 None
-OpBranchConditional %190 %193 %194
-%193 = OpLabel
-%196 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%198 = OpLoad %v4float %196
-OpStore %191 %198
-OpBranch %195
-%194 = OpLabel
-%199 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%200 = OpLoad %v4float %199
-OpStore %191 %200
-OpBranch %195
-%195 = OpLabel
-%201 = OpLoad %v4float %191
-OpReturnValue %201
+%192 = OpCompositeConstruct %v4bool %190 %190 %190 %190
+%194 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%196 = OpLoad %v4float %194
+%197 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%198 = OpLoad %v4float %197
+%193 = OpSelect %v4float %192 %196 %198
+OpReturnValue %193
 OpFunctionEnd
diff --git a/tests/sksl/shared/StructIndexStore.hlsl b/tests/sksl/shared/StructIndexStore.hlsl
index 772740e..b3ab40f 100644
--- a/tests/sksl/shared/StructIndexStore.hlsl
+++ b/tests/sksl/shared/StructIndexStore.hlsl
@@ -126,16 +126,8 @@
         _190 = false;
     }
     bool ok = _190;
-    float4 _191 = 0.0f.xxxx;
-    if (_190)
-    {
-        _191 = _10_colorGreen;
-    }
-    else
-    {
-        _191 = _10_colorRed;
-    }
-    return _191;
+    bool4 _192 = _190.xxxx;
+    return float4(_192.x ? _10_colorGreen.x : _10_colorRed.x, _192.y ? _10_colorGreen.y : _10_colorRed.y, _192.z ? _10_colorGreen.z : _10_colorRed.z, _192.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/StructsInFunctions.asm.frag b/tests/sksl/shared/StructsInFunctions.asm.frag
index 2161068..983696c 100644
--- a/tests/sksl/shared/StructsInFunctions.asm.frag
+++ b/tests/sksl/shared/StructsInFunctions.asm.frag
@@ -70,9 +70,8 @@
 OpDecorate %195 RelaxedPrecision
 OpDecorate %196 RelaxedPrecision
 OpDecorate %219 RelaxedPrecision
-OpDecorate %257 RelaxedPrecision
-OpDecorate %259 RelaxedPrecision
-OpDecorate %260 RelaxedPrecision
+OpDecorate %254 RelaxedPrecision
+OpDecorate %256 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -121,7 +120,6 @@
 %false = OpConstantFalse %bool
 %v4bool = OpTypeVector %bool 4
 %true = OpConstantTrue %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %19
 %20 = OpLabel
 %24 = OpVariable %_ptr_Function_v2float Function
@@ -185,7 +183,6 @@
 %c2 = OpVariable %_ptr_Function_Compound Function
 %c3 = OpVariable %_ptr_Function_Compound Function
 %valid = OpVariable %_ptr_Function_bool Function
-%251 = OpVariable %_ptr_Function_v4float Function
 %68 = OpFunctionCall %S %returns_a_struct_S
 OpStore %s_0 %68
 OpStore %70 %68
@@ -386,19 +383,11 @@
 %246 = OpLabel
 %250 = OpPhi %bool %false %238 %249 %245
 OpStore %valid %250
-OpSelectionMerge %255 None
-OpBranchConditional %250 %253 %254
-%253 = OpLabel
-%256 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
-%257 = OpLoad %v4float %256
-OpStore %251 %257
-OpBranch %255
-%254 = OpLabel
-%258 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
-%259 = OpLoad %v4float %258
-OpStore %251 %259
-OpBranch %255
-%255 = OpLabel
-%260 = OpLoad %v4float %251
-OpReturnValue %260
+%251 = OpCompositeConstruct %v4bool %250 %250 %250 %250
+%253 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
+%254 = OpLoad %v4float %253
+%255 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
+%256 = OpLoad %v4float %255
+%252 = OpSelect %v4float %251 %254 %256
+OpReturnValue %252
 OpFunctionEnd
diff --git a/tests/sksl/shared/StructsInFunctions.hlsl b/tests/sksl/shared/StructsInFunctions.hlsl
index ebbf13c..8f8bf9a 100644
--- a/tests/sksl/shared/StructsInFunctions.hlsl
+++ b/tests/sksl/shared/StructsInFunctions.hlsl
@@ -177,16 +177,8 @@
         _250 = false;
     }
     bool valid = _250;
-    float4 _251 = 0.0f.xxxx;
-    if (_250)
-    {
-        _251 = _14_colorGreen;
-    }
-    else
-    {
-        _251 = _14_colorRed;
-    }
-    return _251;
+    bool4 _251 = _250.xxxx;
+    return float4(_251.x ? _14_colorGreen.x : _14_colorRed.x, _251.y ? _14_colorGreen.y : _14_colorRed.y, _251.z ? _14_colorGreen.z : _14_colorRed.z, _251.w ? _14_colorGreen.w : _14_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag b/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag
index 0169413..e74b795 100644
--- a/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag
+++ b/tests/sksl/shared/SwitchWithEarlyReturn.asm.frag
@@ -49,9 +49,8 @@
 OpDecorate %24 DescriptorSet 0
 OpDecorate %194 RelaxedPrecision
 OpDecorate %195 RelaxedPrecision
+OpDecorate %268 RelaxedPrecision
 OpDecorate %270 RelaxedPrecision
-OpDecorate %272 RelaxedPrecision
-OpDecorate %273 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -78,7 +77,7 @@
 %int_5 = OpConstant %int 5
 %188 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %29
 %30 = OpLabel
 %34 = OpVariable %_ptr_Function_v2float Function
@@ -374,7 +373,6 @@
 %251 = OpVariable %_ptr_Function_int Function
 %256 = OpVariable %_ptr_Function_int Function
 %261 = OpVariable %_ptr_Function_int Function
-%264 = OpVariable %_ptr_Function_v4float Function
 %192 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0
 %194 = OpLoad %v4float %192
 %195 = OpCompositeExtract %float %194 1
@@ -486,19 +484,11 @@
 OpBranch %260
 %260 = OpLabel
 %263 = OpPhi %bool %false %255 %262 %259
-OpSelectionMerge %268 None
-OpBranchConditional %263 %266 %267
-%266 = OpLabel
-%269 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0
+%265 = OpCompositeConstruct %v4bool %263 %263 %263 %263
+%267 = OpAccessChain %_ptr_Uniform_v4float %24 %int_0
+%268 = OpLoad %v4float %267
+%269 = OpAccessChain %_ptr_Uniform_v4float %24 %int_1
 %270 = OpLoad %v4float %269
-OpStore %264 %270
-OpBranch %268
-%267 = OpLabel
-%271 = OpAccessChain %_ptr_Uniform_v4float %24 %int_1
-%272 = OpLoad %v4float %271
-OpStore %264 %272
-OpBranch %268
-%268 = OpLabel
-%273 = OpLoad %v4float %264
-OpReturnValue %273
+%266 = OpSelect %v4float %265 %268 %270
+OpReturnValue %266
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwitchWithEarlyReturn.hlsl b/tests/sksl/shared/SwitchWithEarlyReturn.hlsl
index daa0e5c..0454caa 100644
--- a/tests/sksl/shared/SwitchWithEarlyReturn.hlsl
+++ b/tests/sksl/shared/SwitchWithEarlyReturn.hlsl
@@ -399,16 +399,8 @@
     {
         _263 = false;
     }
-    float4 _264 = 0.0f.xxxx;
-    if (_263)
-    {
-        _264 = _24_colorGreen;
-    }
-    else
-    {
-        _264 = _24_colorRed;
-    }
-    return _264;
+    bool4 _265 = _263.xxxx;
+    return float4(_265.x ? _24_colorGreen.x : _24_colorRed.x, _265.y ? _24_colorGreen.y : _24_colorRed.y, _265.z ? _24_colorGreen.z : _24_colorRed.z, _265.w ? _24_colorGreen.w : _24_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwitchWithFallthrough.asm.frag b/tests/sksl/shared/SwitchWithFallthrough.asm.frag
index f800695..a82782f 100644
--- a/tests/sksl/shared/SwitchWithFallthrough.asm.frag
+++ b/tests/sksl/shared/SwitchWithFallthrough.asm.frag
@@ -29,9 +29,8 @@
 OpDecorate %48 RelaxedPrecision
 OpDecorate %49 RelaxedPrecision
 OpDecorate %57 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %72 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -57,7 +56,7 @@
 %41 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %16
 %17 = OpLabel
@@ -92,7 +91,6 @@
 %x = OpVariable %_ptr_Function_int Function
 %_0_ok = OpVariable %_ptr_Function_bool Function
 %60 = OpVariable %_ptr_Function_int Function
-%63 = OpVariable %_ptr_Function_v4float Function
 %45 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %48 = OpLoad %v4float %45
 %49 = OpCompositeExtract %float %48 1
@@ -118,19 +116,11 @@
 OpBranch %59
 %59 = OpLabel
 %62 = OpPhi %bool %false %52 %61 %58
-OpSelectionMerge %67 None
-OpBranchConditional %62 %65 %66
-%65 = OpLabel
-%68 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%69 = OpLoad %v4float %68
-OpStore %63 %69
-OpBranch %67
-%66 = OpLabel
-%70 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%72 = OpLoad %v4float %70
-OpStore %63 %72
-OpBranch %67
-%67 = OpLabel
-%73 = OpLoad %v4float %63
-OpReturnValue %73
+%64 = OpCompositeConstruct %v4bool %62 %62 %62 %62
+%66 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%67 = OpLoad %v4float %66
+%68 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%70 = OpLoad %v4float %68
+%65 = OpSelect %v4float %64 %67 %70
+OpReturnValue %65
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwitchWithLoops.asm.frag b/tests/sksl/shared/SwitchWithLoops.asm.frag
index b5013ee..74dafcd 100644
--- a/tests/sksl/shared/SwitchWithLoops.asm.frag
+++ b/tests/sksl/shared/SwitchWithLoops.asm.frag
@@ -32,9 +32,8 @@
 OpDecorate %12 DescriptorSet 0
 OpDecorate %86 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
-OpDecorate %130 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -63,7 +62,7 @@
 %80 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_2 = OpConstant %int 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %17
 %18 = OpLabel
 %22 = OpVariable %_ptr_Function_v2float Function
@@ -162,7 +161,6 @@
 %_1_i = OpVariable %_ptr_Function_int Function
 %113 = OpVariable %_ptr_Function_int Function
 %119 = OpVariable %_ptr_Function_int Function
-%122 = OpVariable %_ptr_Function_v4float Function
 %84 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
 %86 = OpLoad %v4float %84
 %87 = OpCompositeExtract %float %86 1
@@ -219,19 +217,11 @@
 OpBranch %117
 %117 = OpLabel
 %121 = OpPhi %bool %false %111 %120 %116
-OpSelectionMerge %126 None
-OpBranchConditional %121 %124 %125
-%124 = OpLabel
-%127 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%123 = OpCompositeConstruct %v4bool %121 %121 %121 %121
+%125 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%126 = OpLoad %v4float %125
+%127 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
 %128 = OpLoad %v4float %127
-OpStore %122 %128
-OpBranch %126
-%125 = OpLabel
-%129 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%130 = OpLoad %v4float %129
-OpStore %122 %130
-OpBranch %126
-%126 = OpLabel
-%131 = OpLoad %v4float %122
-OpReturnValue %131
+%124 = OpSelect %v4float %123 %126 %128
+OpReturnValue %124
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleAsLValue.asm.frag b/tests/sksl/shared/SwizzleAsLValue.asm.frag
index a7f791d..abc9715 100644
--- a/tests/sksl/shared/SwizzleAsLValue.asm.frag
+++ b/tests/sksl/shared/SwizzleAsLValue.asm.frag
@@ -23,9 +23,8 @@
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
 OpDecorate %32 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
+OpDecorate %77 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -59,7 +58,7 @@
 %float_0_75 = OpConstant %float 0.75
 %55 = OpConstantComposite %v4float %float_0_25 %float_0 %float_0 %float_0_75
 %float_1 = OpConstant %float 1
-%72 = OpConstantComposite %v4float %float_1 %float_1 %float_0_25 %float_1
+%68 = OpConstantComposite %v4float %float_1 %float_1 %float_0_25 %float_1
 %v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -73,8 +72,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %color = OpVariable %_ptr_Function_v4float Function
-%64 = OpVariable %_ptr_Function_float Function
-%76 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %34 = OpVectorTimesScalar %v4float %32 %float_0_5
@@ -101,35 +98,18 @@
 %60 = OpLoad %float %59
 %61 = OpCompositeExtract %float %58 3
 %63 = OpFOrdLessThanEqual %bool %61 %float_1
-OpSelectionMerge %67 None
-OpBranchConditional %63 %65 %66
-%65 = OpLabel
-%68 = OpCompositeExtract %float %58 2
-OpStore %64 %68
-OpBranch %67
-%66 = OpLabel
-OpStore %64 %float_0
-OpBranch %67
-%67 = OpLabel
-%69 = OpLoad %float %64
-%70 = OpFAdd %float %60 %69
-OpStore %59 %70
-%71 = OpLoad %v4float %color
-%73 = OpFOrdEqual %v4bool %71 %72
-%75 = OpAll %bool %73
-OpSelectionMerge %79 None
-OpBranchConditional %75 %77 %78
-%77 = OpLabel
-%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%81 = OpLoad %v4float %80
-OpStore %76 %81
-OpBranch %79
-%78 = OpLabel
-%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%83 = OpLoad %v4float %82
-OpStore %76 %83
-OpBranch %79
-%79 = OpLabel
-%84 = OpLoad %v4float %76
-OpReturnValue %84
+%65 = OpCompositeExtract %float %58 2
+%64 = OpSelect %float %63 %65 %float_0
+%66 = OpFAdd %float %60 %64
+OpStore %59 %66
+%67 = OpLoad %v4float %color
+%69 = OpFOrdEqual %v4bool %67 %68
+%71 = OpAll %bool %69
+%72 = OpCompositeConstruct %v4bool %71 %71 %71 %71
+%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%75 = OpLoad %v4float %74
+%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%77 = OpLoad %v4float %76
+%73 = OpSelect %v4float %72 %75 %77
+OpReturnValue %73
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleAsLValue.hlsl b/tests/sksl/shared/SwizzleAsLValue.hlsl
index f55cece..c769191 100644
--- a/tests/sksl/shared/SwizzleAsLValue.hlsl
+++ b/tests/sksl/shared/SwizzleAsLValue.hlsl
@@ -24,26 +24,9 @@
     float4 _57 = color;
     float4 _58 = float4(_56.w, _56.y, _56.x, _56.z);
     color = _58;
-    float _64 = 0.0f;
-    if (_58.w <= 1.0f)
-    {
-        _64 = _58.z;
-    }
-    else
-    {
-        _64 = 0.0f;
-    }
-    color.x += _64;
-    float4 _76 = 0.0f.xxxx;
-    if (all(bool4(color.x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, color.y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, color.z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, color.w == float4(1.0f, 1.0f, 0.25f, 1.0f).w)))
-    {
-        _76 = _10_colorGreen;
-    }
-    else
-    {
-        _76 = _10_colorRed;
-    }
-    return _76;
+    color.x += ((_58.w <= 1.0f) ? _58.z : 0.0f);
+    bool4 _72 = all(bool4(color.x == float4(1.0f, 1.0f, 0.25f, 1.0f).x, color.y == float4(1.0f, 1.0f, 0.25f, 1.0f).y, color.z == float4(1.0f, 1.0f, 0.25f, 1.0f).z, color.w == float4(1.0f, 1.0f, 0.25f, 1.0f).w)).xxxx;
+    return float4(_72.x ? _10_colorGreen.x : _10_colorRed.x, _72.y ? _10_colorGreen.y : _10_colorRed.y, _72.z ? _10_colorGreen.z : _10_colorRed.z, _72.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleBoolConstants.asm.frag b/tests/sksl/shared/SwizzleBoolConstants.asm.frag
index 55f664a..92781b5 100644
--- a/tests/sksl/shared/SwizzleBoolConstants.asm.frag
+++ b/tests/sksl/shared/SwizzleBoolConstants.asm.frag
@@ -25,9 +25,8 @@
 OpDecorate %10 DescriptorSet 0
 OpDecorate %33 RelaxedPrecision
 OpDecorate %34 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
 OpDecorate %113 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -54,7 +53,6 @@
 %v2bool = OpTypeVector %bool 2
 %false = OpConstantFalse %bool
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -69,7 +67,6 @@
 %25 = OpLabel
 %v = OpVariable %_ptr_Function_v4bool Function
 %result = OpVariable %_ptr_Function_v4bool Function
-%107 = OpVariable %_ptr_Function_v4float Function
 %29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %33 = OpLoad %v4float %29
 %34 = OpCompositeExtract %float %33 1
@@ -167,19 +164,11 @@
 %105 = OpCompositeConstruct %v4bool %false %true %true %77
 OpStore %result %105
 %106 = OpAny %bool %105
-OpSelectionMerge %111 None
-OpBranchConditional %106 %109 %110
-%109 = OpLabel
-%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%113 = OpLoad %v4float %112
-OpStore %107 %113
-OpBranch %111
-%110 = OpLabel
-%114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%116 = OpLoad %v4float %114
-OpStore %107 %116
-OpBranch %111
-%111 = OpLabel
-%117 = OpLoad %v4float %107
-OpReturnValue %117
+%107 = OpCompositeConstruct %v4bool %106 %106 %106 %106
+%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%110 = OpLoad %v4float %109
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%113 = OpLoad %v4float %111
+%108 = OpSelect %v4float %107 %110 %113
+OpReturnValue %108
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleBoolConstants.hlsl b/tests/sksl/shared/SwizzleBoolConstants.hlsl
index 07c250c..857ad26 100644
--- a/tests/sksl/shared/SwizzleBoolConstants.hlsl
+++ b/tests/sksl/shared/SwizzleBoolConstants.hlsl
@@ -48,16 +48,8 @@
     result = bool4(false, false, _60, true);
     bool4 _105 = bool4(false, true, true, _77);
     result = _105;
-    float4 _107 = 0.0f.xxxx;
-    if (any(_105))
-    {
-        _107 = _10_colorGreen;
-    }
-    else
-    {
-        _107 = _10_colorRed;
-    }
-    return _107;
+    bool4 _107 = any(_105).xxxx;
+    return float4(_107.x ? _10_colorGreen.x : _10_colorRed.x, _107.y ? _10_colorGreen.y : _10_colorRed.y, _107.z ? _10_colorGreen.z : _10_colorRed.z, _107.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
index cd12a04..13182a0 100644
--- a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
+++ b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
@@ -63,9 +63,8 @@
 OpDecorate %b RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
 OpDecorate %c RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -124,7 +123,6 @@
 %_12_w = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_v4float Function
 %c = OpVariable %_ptr_Function_v4float Function
-%84 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 OpStore %_0_v %32
@@ -173,19 +171,11 @@
 OpBranch %81
 %81 = OpLabel
 %83 = OpPhi %bool %false %76 %true %80
-OpSelectionMerge %87 None
-OpBranchConditional %83 %85 %86
-%85 = OpLabel
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%90 = OpLoad %v4float %88
-OpStore %84 %90
-OpBranch %87
-%86 = OpLabel
-%91 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %91
-OpStore %84 %93
-OpBranch %87
-%87 = OpLabel
-%94 = OpLoad %v4float %84
-OpReturnValue %94
+%84 = OpCompositeConstruct %v4bool %83 %83 %83 %83
+%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%88 = OpLoad %v4float %86
+%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%91 = OpLoad %v4float %89
+%85 = OpSelect %v4float %84 %88 %91
+OpReturnValue %85
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleByConstantIndex.hlsl b/tests/sksl/shared/SwizzleByConstantIndex.hlsl
index efb5c1f..e5e4e41 100644
--- a/tests/sksl/shared/SwizzleByConstantIndex.hlsl
+++ b/tests/sksl/shared/SwizzleByConstantIndex.hlsl
@@ -47,16 +47,8 @@
     {
         _83 = false;
     }
-    float4 _84 = 0.0f.xxxx;
-    if (_83)
-    {
-        _84 = _10_colorGreen;
-    }
-    else
-    {
-        _84 = _10_colorRed;
-    }
-    return _84;
+    bool4 _84 = _83.xxxx;
+    return float4(_84.x ? _10_colorGreen.x : _10_colorRed.x, _84.y ? _10_colorGreen.y : _10_colorRed.y, _84.z ? _10_colorGreen.z : _10_colorRed.z, _84.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleByIndex.asm.frag b/tests/sksl/shared/SwizzleByIndex.asm.frag
index 0b419d3..5258c5a 100644
--- a/tests/sksl/shared/SwizzleByIndex.asm.frag
+++ b/tests/sksl/shared/SwizzleByIndex.asm.frag
@@ -45,9 +45,8 @@
 OpDecorate %_4_z RelaxedPrecision
 OpDecorate %_5_w RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -95,7 +94,6 @@
 %_3_y = OpVariable %_ptr_Function_float Function
 %_4_z = OpVariable %_ptr_Function_float Function
 %_5_w = OpVariable %_ptr_Function_float Function
-%67 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 OpStore %_0_v %32
@@ -126,19 +124,11 @@
 %61 = OpCompositeConstruct %v4float %51 %54 %57 %60
 %64 = OpFOrdEqual %v4bool %61 %63
 %66 = OpAll %bool %64
-OpSelectionMerge %70 None
-OpBranchConditional %66 %68 %69
-%68 = OpLabel
-%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%73 = OpLoad %v4float %71
-OpStore %67 %73
-OpBranch %70
-%69 = OpLabel
-%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%76 = OpLoad %v4float %74
-OpStore %67 %76
-OpBranch %70
-%70 = OpLabel
-%77 = OpLoad %v4float %67
-OpReturnValue %77
+%67 = OpCompositeConstruct %v4bool %66 %66 %66 %66
+%69 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%71 = OpLoad %v4float %69
+%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%74 = OpLoad %v4float %72
+%68 = OpSelect %v4float %67 %71 %74
+OpReturnValue %68
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleByIndex.hlsl b/tests/sksl/shared/SwizzleByIndex.hlsl
index 42982fe..9e4c041 100644
--- a/tests/sksl/shared/SwizzleByIndex.hlsl
+++ b/tests/sksl/shared/SwizzleByIndex.hlsl
@@ -28,16 +28,8 @@
     float _60 = _10_testInputs[_47.w];
     float _RESERVED_IDENTIFIER_FIXUP_5_w = _60;
     float4 _61 = float4(_51, _54, _57, _60);
-    float4 _67 = 0.0f.xxxx;
-    if (all(bool4(_61.x == float4(-1.25f, -1.25f, -1.25f, 0.0f).x, _61.y == float4(-1.25f, -1.25f, -1.25f, 0.0f).y, _61.z == float4(-1.25f, -1.25f, -1.25f, 0.0f).z, _61.w == float4(-1.25f, -1.25f, -1.25f, 0.0f).w)))
-    {
-        _67 = _10_colorGreen;
-    }
-    else
-    {
-        _67 = _10_colorRed;
-    }
-    return _67;
+    bool4 _67 = all(bool4(_61.x == float4(-1.25f, -1.25f, -1.25f, 0.0f).x, _61.y == float4(-1.25f, -1.25f, -1.25f, 0.0f).y, _61.z == float4(-1.25f, -1.25f, -1.25f, 0.0f).z, _61.w == float4(-1.25f, -1.25f, -1.25f, 0.0f).w)).xxxx;
+    return float4(_67.x ? _10_colorGreen.x : _10_colorRed.x, _67.y ? _10_colorGreen.y : _10_colorRed.y, _67.z ? _10_colorGreen.z : _10_colorRed.z, _67.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleConstants.asm.frag b/tests/sksl/shared/SwizzleConstants.asm.frag
index b14d3a8..cdecc8c 100644
--- a/tests/sksl/shared/SwizzleConstants.asm.frag
+++ b/tests/sksl/shared/SwizzleConstants.asm.frag
@@ -86,9 +86,8 @@
 OpDecorate %93 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
-OpDecorate %107 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -115,6 +114,8 @@
 %v3float = OpTypeVector %float 3
 %59 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %true = OpConstantTrue %bool
+%v4bool = OpTypeVector %bool 4
+%98 = OpConstantComposite %v4bool %true %true %true %true
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %15
@@ -129,7 +130,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %v = OpVariable %_ptr_Function_v4float Function
-%97 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 OpStore %v %32
@@ -217,19 +217,10 @@
 %95 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %float_1
 OpStore %v %95
 OpStore %v %41
-OpSelectionMerge %100 None
-OpBranchConditional %true %98 %99
-%98 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%103 = OpLoad %v4float %101
-OpStore %97 %103
-OpBranch %100
-%99 = OpLabel
-%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%106 = OpLoad %v4float %104
-OpStore %97 %106
-OpBranch %100
-%100 = OpLabel
-%107 = OpLoad %v4float %97
-OpReturnValue %107
+%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%102 = OpLoad %v4float %100
+%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%105 = OpLoad %v4float %103
+%99 = OpSelect %v4float %98 %102 %105
+OpReturnValue %99
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleConstants.hlsl b/tests/sksl/shared/SwizzleConstants.hlsl
index 51e7eed..6d1e26d 100644
--- a/tests/sksl/shared/SwizzleConstants.hlsl
+++ b/tests/sksl/shared/SwizzleConstants.hlsl
@@ -64,16 +64,7 @@
     v = float4(0.0f, 0.0f, _92, _91.y);
     v = float4(0.0f, 0.0f, _92, 1.0f);
     v = float4(0.0f, 1.0f, 1.0f, 1.0f);
-    float4 _97 = 0.0f.xxxx;
-    if (true)
-    {
-        _97 = _10_colorGreen;
-    }
-    else
-    {
-        _97 = _10_colorRed;
-    }
-    return _97;
+    return float4(bool4(true, true, true, true).x ? _10_colorGreen.x : _10_colorRed.x, bool4(true, true, true, true).y ? _10_colorGreen.y : _10_colorRed.y, bool4(true, true, true, true).z ? _10_colorGreen.z : _10_colorRed.z, bool4(true, true, true, true).w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleIndexLookup.asm.frag b/tests/sksl/shared/SwizzleIndexLookup.asm.frag
index 1d55f98..3a29c5b 100644
--- a/tests/sksl/shared/SwizzleIndexLookup.asm.frag
+++ b/tests/sksl/shared/SwizzleIndexLookup.asm.frag
@@ -39,9 +39,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
-OpDecorate %143 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
-OpDecorate %146 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -86,6 +85,7 @@
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %126 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
 %130 = OpTypeFunction %v4float %_ptr_Function_v2float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %20
 %21 = OpLabel
 %25 = OpVariable %_ptr_Function_v2float Function
@@ -225,7 +225,6 @@
 %main = OpFunction %v4float None %130
 %131 = OpFunctionParameter %_ptr_Function_v2float
 %132 = OpLabel
-%138 = OpVariable %_ptr_Function_v4float Function
 %133 = OpFunctionCall %bool %test3x3_b
 OpSelectionMerge %135 None
 OpBranchConditional %133 %134 %135
@@ -234,19 +233,11 @@
 OpBranch %135
 %135 = OpLabel
 %137 = OpPhi %bool %false %132 %136 %134
-OpSelectionMerge %141 None
-OpBranchConditional %137 %139 %140
-%139 = OpLabel
-%142 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
-%143 = OpLoad %v4float %142
-OpStore %138 %143
-OpBranch %141
-%140 = OpLabel
-%144 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%145 = OpLoad %v4float %144
-OpStore %138 %145
-OpBranch %141
-%141 = OpLabel
-%146 = OpLoad %v4float %138
-OpReturnValue %146
+%139 = OpCompositeConstruct %v4bool %137 %137 %137 %137
+%141 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%142 = OpLoad %v4float %141
+%143 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
+%144 = OpLoad %v4float %143
+%140 = OpSelect %v4float %139 %142 %144
+OpReturnValue %140
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleIndexLookup.hlsl b/tests/sksl/shared/SwizzleIndexLookup.hlsl
index f7fdc47..c9c9fc6 100644
--- a/tests/sksl/shared/SwizzleIndexLookup.hlsl
+++ b/tests/sksl/shared/SwizzleIndexLookup.hlsl
@@ -61,16 +61,8 @@
     {
         _137 = false;
     }
-    float4 _138 = 0.0f.xxxx;
-    if (_137)
-    {
-        _138 = _12_colorGreen;
-    }
-    else
-    {
-        _138 = _12_colorRed;
-    }
-    return _138;
+    bool4 _139 = _137.xxxx;
+    return float4(_139.x ? _12_colorGreen.x : _12_colorRed.x, _139.y ? _12_colorGreen.y : _12_colorRed.y, _139.z ? _12_colorGreen.z : _12_colorRed.z, _139.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleIndexStore.asm.frag b/tests/sksl/shared/SwizzleIndexStore.asm.frag
index fa9ef69..b793a03 100644
--- a/tests/sksl/shared/SwizzleIndexStore.asm.frag
+++ b/tests/sksl/shared/SwizzleIndexStore.asm.frag
@@ -39,9 +39,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %12 Binding 0
 OpDecorate %12 DescriptorSet 0
+OpDecorate %150 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
-OpDecorate %155 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -234,7 +233,6 @@
 %main = OpFunction %v4float None %139
 %140 = OpFunctionParameter %_ptr_Function_v2float
 %141 = OpLabel
-%147 = OpVariable %_ptr_Function_v4float Function
 %142 = OpFunctionCall %bool %test3x3_b
 OpSelectionMerge %144 None
 OpBranchConditional %142 %143 %144
@@ -243,19 +241,11 @@
 OpBranch %144
 %144 = OpLabel
 %146 = OpPhi %bool %false %141 %145 %143
-OpSelectionMerge %150 None
-OpBranchConditional %146 %148 %149
-%148 = OpLabel
-%151 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%147 = OpCompositeConstruct %v4bool %146 %146 %146 %146
+%149 = OpAccessChain %_ptr_Uniform_v4float %12 %int_0
+%150 = OpLoad %v4float %149
+%151 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
 %152 = OpLoad %v4float %151
-OpStore %147 %152
-OpBranch %150
-%149 = OpLabel
-%153 = OpAccessChain %_ptr_Uniform_v4float %12 %int_1
-%154 = OpLoad %v4float %153
-OpStore %147 %154
-OpBranch %150
-%150 = OpLabel
-%155 = OpLoad %v4float %147
-OpReturnValue %155
+%148 = OpSelect %v4float %147 %150 %152
+OpReturnValue %148
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleIndexStore.hlsl b/tests/sksl/shared/SwizzleIndexStore.hlsl
index 7c4b0b4..d68ed83 100644
--- a/tests/sksl/shared/SwizzleIndexStore.hlsl
+++ b/tests/sksl/shared/SwizzleIndexStore.hlsl
@@ -63,16 +63,8 @@
     {
         _146 = false;
     }
-    float4 _147 = 0.0f.xxxx;
-    if (_146)
-    {
-        _147 = _12_colorGreen;
-    }
-    else
-    {
-        _147 = _12_colorRed;
-    }
-    return _147;
+    bool4 _147 = _146.xxxx;
+    return float4(_147.x ? _12_colorGreen.x : _12_colorRed.x, _147.y ? _12_colorGreen.y : _12_colorRed.y, _147.z ? _12_colorGreen.z : _12_colorRed.z, _147.w ? _12_colorGreen.w : _12_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/SwizzleOpt.asm.frag b/tests/sksl/shared/SwizzleOpt.asm.frag
index 10e9ec8..7889da7 100644
--- a/tests/sksl/shared/SwizzleOpt.asm.frag
+++ b/tests/sksl/shared/SwizzleOpt.asm.frag
@@ -87,9 +87,8 @@
 OpDecorate %127 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
+OpDecorate %137 RelaxedPrecision
 OpDecorate %139 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %142 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -167,7 +166,6 @@
 %88 = OpVariable %_ptr_Function_v4float Function
 %91 = OpVariable %_ptr_Function_v4float Function
 %95 = OpVariable %_ptr_Function_v4float Function
-%134 = OpVariable %_ptr_Function_v4float Function
 %48 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2
 %50 = OpLoad %v4float %48
 OpStore %v %50
@@ -262,19 +260,11 @@
 OpStore %v %129
 %131 = OpFOrdEqual %v4bool %129 %130
 %133 = OpAll %bool %131
-OpSelectionMerge %137 None
-OpBranchConditional %133 %135 %136
-%135 = OpLabel
-%138 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%134 = OpCompositeConstruct %v4bool %133 %133 %133 %133
+%136 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%137 = OpLoad %v4float %136
+%138 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %139 = OpLoad %v4float %138
-OpStore %134 %139
-OpBranch %137
-%136 = OpLabel
-%140 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%141 = OpLoad %v4float %140
-OpStore %134 %141
-OpBranch %137
-%137 = OpLabel
-%142 = OpLoad %v4float %134
-OpReturnValue %142
+%135 = OpSelect %v4float %134 %137 %139
+OpReturnValue %135
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleOpt.hlsl b/tests/sksl/shared/SwizzleOpt.hlsl
index 8682952..5c86ba1 100644
--- a/tests/sksl/shared/SwizzleOpt.hlsl
+++ b/tests/sksl/shared/SwizzleOpt.hlsl
@@ -68,16 +68,8 @@
     float4 _128 = v;
     float4 _129 = float4(_127.z, _127.y, _127.x, _128.w);
     v = _129;
-    float4 _134 = 0.0f.xxxx;
-    if (all(bool4(_129.x == 1.0f.xxxx.x, _129.y == 1.0f.xxxx.y, _129.z == 1.0f.xxxx.z, _129.w == 1.0f.xxxx.w)))
-    {
-        _134 = _11_colorGreen;
-    }
-    else
-    {
-        _134 = _11_colorRed;
-    }
-    return _134;
+    bool4 _134 = all(bool4(_129.x == 1.0f.xxxx.x, _129.y == 1.0f.xxxx.y, _129.z == 1.0f.xxxx.z, _129.w == 1.0f.xxxx.w)).xxxx;
+    return float4(_134.x ? _11_colorGreen.x : _11_colorRed.x, _134.y ? _11_colorGreen.y : _11_colorRed.y, _134.z ? _11_colorGreen.z : _11_colorRed.z, _134.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/TernaryComplexNesting.asm.frag b/tests/sksl/shared/TernaryComplexNesting.asm.frag
index fdf5e83..4ae8e0e 100644
--- a/tests/sksl/shared/TernaryComplexNesting.asm.frag
+++ b/tests/sksl/shared/TernaryComplexNesting.asm.frag
@@ -45,15 +45,12 @@
 OpDecorate %62 RelaxedPrecision
 OpDecorate %result RelaxedPrecision
 OpDecorate %66 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %112 RelaxedPrecision
 OpDecorate %113 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
-OpDecorate %121 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -107,19 +104,16 @@
 %70 = OpVariable %_ptr_Function_v4float Function
 %74 = OpVariable %_ptr_Function_v4float Function
 %75 = OpVariable %_ptr_Function_v4float Function
-%77 = OpVariable %_ptr_Function_v4float Function
-%83 = OpVariable %_ptr_Function_v4float Function
-%84 = OpVariable %_ptr_Function_v4float Function
-%86 = OpVariable %_ptr_Function_v4float Function
-%94 = OpVariable %_ptr_Function_v4float Function
-%95 = OpVariable %_ptr_Function_v4float Function
-%97 = OpVariable %_ptr_Function_v4float Function
-%104 = OpVariable %_ptr_Function_v4float Function
+%80 = OpVariable %_ptr_Function_v4float Function
+%81 = OpVariable %_ptr_Function_v4float Function
+%88 = OpVariable %_ptr_Function_v4float Function
+%89 = OpVariable %_ptr_Function_v4float Function
+%91 = OpVariable %_ptr_Function_v4float Function
+%98 = OpVariable %_ptr_Function_v4float Function
+%99 = OpVariable %_ptr_Function_v4float Function
+%101 = OpVariable %_ptr_Function_v4float Function
 %105 = OpVariable %_ptr_Function_v4float Function
-%107 = OpVariable %_ptr_Function_v4float Function
-%111 = OpVariable %_ptr_Function_v4float Function
-%114 = OpVariable %_ptr_Function_v4float Function
-%116 = OpVariable %_ptr_Function_v4float Function
+%108 = OpVariable %_ptr_Function_v4float Function
 %38 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %42 = OpLoad %v4float %38
 %43 = OpVectorShuffle %v2float %42 %42 2 3
@@ -155,83 +149,59 @@
 OpStore %74 %54
 OpStore %75 %62
 %76 = OpFunctionCall %bool %IsEqual_bh4h4 %74 %75
-OpSelectionMerge %80 None
-OpBranchConditional %76 %78 %79
-%78 = OpLabel
-OpStore %77 %62
-OpBranch %80
-%79 = OpLabel
-OpStore %77 %54
-OpBranch %80
-%80 = OpLabel
-%81 = OpLoad %v4float %77
-OpStore %70 %81
+%77 = OpCompositeConstruct %v4bool %76 %76 %76 %76
+%78 = OpSelect %v4float %77 %62 %54
+OpStore %70 %78
 OpBranch %73
 %72 = OpLabel
-OpStore %83 %62
-OpStore %84 %54
-%85 = OpFunctionCall %bool %IsEqual_bh4h4 %83 %84
-%82 = OpLogicalNot %bool %85
-OpSelectionMerge %89 None
-OpBranchConditional %82 %87 %88
-%87 = OpLabel
-OpStore %86 %46
-OpBranch %89
-%88 = OpLabel
-%90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%91 = OpLoad %v4float %90
-OpStore %86 %91
-OpBranch %89
-%89 = OpLabel
-%92 = OpLoad %v4float %86
-OpStore %70 %92
+OpStore %80 %62
+OpStore %81 %54
+%82 = OpFunctionCall %bool %IsEqual_bh4h4 %80 %81
+%79 = OpLogicalNot %bool %82
+%83 = OpCompositeConstruct %v4bool %79 %79 %79 %79
+%85 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%86 = OpLoad %v4float %85
+%84 = OpSelect %v4float %83 %46 %86
+OpStore %70 %84
 OpBranch %73
 %73 = OpLabel
-%93 = OpLoad %v4float %70
-OpStore %result %93
-OpStore %94 %62
-OpStore %95 %46
-%96 = OpFunctionCall %bool %IsEqual_bh4h4 %94 %95
-OpSelectionMerge %100 None
-OpBranchConditional %96 %98 %99
-%98 = OpLabel
-%101 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%102 = OpLoad %v4float %101
-OpStore %97 %102
-OpBranch %100
-%99 = OpLabel
-OpStore %104 %62
-OpStore %105 %54
-%106 = OpFunctionCall %bool %IsEqual_bh4h4 %104 %105
-%103 = OpLogicalNot %bool %106
-OpSelectionMerge %110 None
-OpBranchConditional %103 %108 %109
-%108 = OpLabel
-OpStore %107 %93
-OpBranch %110
-%109 = OpLabel
-OpStore %111 %62
-%112 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%113 = OpLoad %v4float %112
-OpStore %114 %113
-%115 = OpFunctionCall %bool %IsEqual_bh4h4 %111 %114
-OpSelectionMerge %119 None
-OpBranchConditional %115 %117 %118
-%117 = OpLabel
-OpStore %116 %46
-OpBranch %119
-%118 = OpLabel
-OpStore %116 %62
-OpBranch %119
-%119 = OpLabel
-%120 = OpLoad %v4float %116
-OpStore %107 %120
-OpBranch %110
-%110 = OpLabel
-%121 = OpLoad %v4float %107
-OpStore %97 %121
-OpBranch %100
-%100 = OpLabel
-%122 = OpLoad %v4float %97
-OpReturnValue %122
+%87 = OpLoad %v4float %70
+OpStore %result %87
+OpStore %88 %62
+OpStore %89 %46
+%90 = OpFunctionCall %bool %IsEqual_bh4h4 %88 %89
+OpSelectionMerge %94 None
+OpBranchConditional %90 %92 %93
+%92 = OpLabel
+%95 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%96 = OpLoad %v4float %95
+OpStore %91 %96
+OpBranch %94
+%93 = OpLabel
+OpStore %98 %62
+OpStore %99 %54
+%100 = OpFunctionCall %bool %IsEqual_bh4h4 %98 %99
+%97 = OpLogicalNot %bool %100
+OpSelectionMerge %104 None
+OpBranchConditional %97 %102 %103
+%102 = OpLabel
+OpStore %101 %87
+OpBranch %104
+%103 = OpLabel
+OpStore %105 %62
+%106 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%107 = OpLoad %v4float %106
+OpStore %108 %107
+%109 = OpFunctionCall %bool %IsEqual_bh4h4 %105 %108
+%110 = OpCompositeConstruct %v4bool %109 %109 %109 %109
+%111 = OpSelect %v4float %110 %46 %62
+OpStore %101 %111
+OpBranch %104
+%104 = OpLabel
+%112 = OpLoad %v4float %101
+OpStore %91 %112
+OpBranch %94
+%94 = OpLabel
+%113 = OpLoad %v4float %91
+OpReturnValue %113
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryComplexNesting.hlsl b/tests/sksl/shared/TernaryComplexNesting.hlsl
index b3c8892..c0b0fdb 100644
--- a/tests/sksl/shared/TernaryComplexNesting.hlsl
+++ b/tests/sksl/shared/TernaryComplexNesting.hlsl
@@ -31,67 +31,43 @@
     {
         float4 _74 = _54;
         float4 _75 = _62;
-        float4 _77 = 0.0f.xxxx;
-        if (IsEqual_bh4h4(_74, _75))
-        {
-            _77 = _62;
-        }
-        else
-        {
-            _77 = _54;
-        }
-        _70 = _77;
+        bool4 _77 = IsEqual_bh4h4(_74, _75).xxxx;
+        _70 = float4(_77.x ? _62.x : _54.x, _77.y ? _62.y : _54.y, _77.z ? _62.z : _54.z, _77.w ? _62.w : _54.w);
     }
     else
     {
-        float4 _83 = _62;
-        float4 _84 = _54;
-        float4 _86 = 0.0f.xxxx;
-        if (!IsEqual_bh4h4(_83, _84))
-        {
-            _86 = _46;
-        }
-        else
-        {
-            _86 = _11_colorWhite;
-        }
-        _70 = _86;
+        float4 _80 = _62;
+        float4 _81 = _54;
+        bool4 _83 = (!IsEqual_bh4h4(_80, _81)).xxxx;
+        _70 = float4(_83.x ? _46.x : _11_colorWhite.x, _83.y ? _46.y : _11_colorWhite.y, _83.z ? _46.z : _11_colorWhite.z, _83.w ? _46.w : _11_colorWhite.w);
     }
     float4 result = _70;
-    float4 _94 = _62;
-    float4 _95 = _46;
-    float4 _97 = 0.0f.xxxx;
-    if (IsEqual_bh4h4(_94, _95))
+    float4 _88 = _62;
+    float4 _89 = _46;
+    float4 _91 = 0.0f.xxxx;
+    if (IsEqual_bh4h4(_88, _89))
     {
-        _97 = _11_colorWhite;
+        _91 = _11_colorWhite;
     }
     else
     {
-        float4 _104 = _62;
-        float4 _105 = _54;
-        float4 _107 = 0.0f.xxxx;
-        if (!IsEqual_bh4h4(_104, _105))
+        float4 _98 = _62;
+        float4 _99 = _54;
+        float4 _101 = 0.0f.xxxx;
+        if (!IsEqual_bh4h4(_98, _99))
         {
-            _107 = _70;
+            _101 = _70;
         }
         else
         {
-            float4 _111 = _62;
-            float4 _114 = _11_colorWhite;
-            float4 _116 = 0.0f.xxxx;
-            if (IsEqual_bh4h4(_111, _114))
-            {
-                _116 = _46;
-            }
-            else
-            {
-                _116 = _62;
-            }
-            _107 = _116;
+            float4 _105 = _62;
+            float4 _108 = _11_colorWhite;
+            bool4 _110 = IsEqual_bh4h4(_105, _108).xxxx;
+            _101 = float4(_110.x ? _46.x : _62.x, _110.y ? _46.y : _62.y, _110.z ? _46.z : _62.z, _110.w ? _46.w : _62.w);
         }
-        _97 = _107;
+        _91 = _101;
     }
-    return _97;
+    return _91;
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/TernaryExpression.asm.frag b/tests/sksl/shared/TernaryExpression.asm.frag
index 924ffc9..712e1b6 100644
--- a/tests/sksl/shared/TernaryExpression.asm.frag
+++ b/tests/sksl/shared/TernaryExpression.asm.frag
@@ -34,9 +34,8 @@
 OpDecorate %58 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
 OpDecorate %61 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
 OpDecorate %73 RelaxedPrecision
-OpDecorate %75 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -61,7 +60,7 @@
 %float_1 = OpConstant %float 1
 %int_1 = OpConstant %int 1
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -74,7 +73,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %check = OpVariable %_ptr_Function_int Function
-%67 = OpVariable %_ptr_Function_v4float Function
 OpStore %check %int_0
 %30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %30
@@ -113,19 +111,11 @@
 %65 = OpIAdd %int %55 %64
 OpStore %check %65
 %66 = OpIEqual %bool %65 %int_0
-OpSelectionMerge %71 None
-OpBranchConditional %66 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpCompositeConstruct %v4bool %66 %66 %66 %66
+%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%71 = OpLoad %v4float %70
+%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %73 = OpLoad %v4float %72
-OpStore %67 %73
-OpBranch %71
-%70 = OpLabel
-%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%75 = OpLoad %v4float %74
-OpStore %67 %75
-OpBranch %71
-%71 = OpLabel
-%76 = OpLoad %v4float %67
-OpReturnValue %76
+%69 = OpSelect %v4float %68 %71 %73
+OpReturnValue %69
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryExpression.hlsl b/tests/sksl/shared/TernaryExpression.hlsl
index 4502876..7a27173 100644
--- a/tests/sksl/shared/TernaryExpression.hlsl
+++ b/tests/sksl/shared/TernaryExpression.hlsl
@@ -23,16 +23,8 @@
     check = _55;
     int _65 = _55 + int(any(bool2(_10_colorGreen.yx.x != _10_colorRed.xy.x, _10_colorGreen.yx.y != _10_colorRed.xy.y)));
     check = _65;
-    float4 _67 = 0.0f.xxxx;
-    if (_65 == 0)
-    {
-        _67 = _10_colorGreen;
-    }
-    else
-    {
-        _67 = _10_colorRed;
-    }
-    return _67;
+    bool4 _68 = (_65 == 0).xxxx;
+    return float4(_68.x ? _10_colorGreen.x : _10_colorRed.x, _68.y ? _10_colorGreen.y : _10_colorRed.y, _68.z ? _10_colorGreen.z : _10_colorRed.z, _68.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/TernaryNesting.asm.frag b/tests/sksl/shared/TernaryNesting.asm.frag
index a080373..31b1b63 100644
--- a/tests/sksl/shared/TernaryNesting.asm.frag
+++ b/tests/sksl/shared/TernaryNesting.asm.frag
@@ -42,15 +42,12 @@
 OpDecorate %52 RelaxedPrecision
 OpDecorate %result RelaxedPrecision
 OpDecorate %55 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -89,11 +86,8 @@
 %colorRed = OpVariable %_ptr_Function_v4float Function
 %result = OpVariable %_ptr_Function_v4float Function
 %59 = OpVariable %_ptr_Function_v4float Function
-%65 = OpVariable %_ptr_Function_v4float Function
-%72 = OpVariable %_ptr_Function_v4float Function
-%82 = OpVariable %_ptr_Function_v4float Function
-%90 = OpVariable %_ptr_Function_v4float Function
-%98 = OpVariable %_ptr_Function_v4float Function
+%76 = OpVariable %_ptr_Function_v4float Function
+%84 = OpVariable %_ptr_Function_v4float Function
 %28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %32 = OpLoad %v4float %28
 %33 = OpVectorShuffle %v2float %32 %32 2 3
@@ -126,77 +120,53 @@
 %60 = OpLabel
 %63 = OpFOrdEqual %v4bool %44 %52
 %64 = OpAll %bool %63
-OpSelectionMerge %68 None
-OpBranchConditional %64 %66 %67
-%66 = OpLabel
-OpStore %65 %52
-OpBranch %68
-%67 = OpLabel
-OpStore %65 %44
-OpBranch %68
-%68 = OpLabel
-%69 = OpLoad %v4float %65
-OpStore %59 %69
+%65 = OpCompositeConstruct %v4bool %64 %64 %64 %64
+%66 = OpSelect %v4float %65 %52 %44
+OpStore %59 %66
 OpBranch %62
 %61 = OpLabel
-%70 = OpFUnordNotEqual %v4bool %52 %44
-%71 = OpAny %bool %70
-OpSelectionMerge %75 None
-OpBranchConditional %71 %73 %74
-%73 = OpLabel
-OpStore %72 %36
-OpBranch %75
-%74 = OpLabel
-%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%77 = OpLoad %v4float %76
-OpStore %72 %77
-OpBranch %75
-%75 = OpLabel
-%78 = OpLoad %v4float %72
-OpStore %59 %78
+%67 = OpFUnordNotEqual %v4bool %52 %44
+%68 = OpAny %bool %67
+%69 = OpCompositeConstruct %v4bool %68 %68 %68 %68
+%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%72 = OpLoad %v4float %71
+%70 = OpSelect %v4float %69 %36 %72
+OpStore %59 %70
 OpBranch %62
 %62 = OpLabel
-%79 = OpLoad %v4float %59
-OpStore %result %79
-%80 = OpFOrdEqual %v4bool %52 %36
-%81 = OpAll %bool %80
-OpSelectionMerge %85 None
-OpBranchConditional %81 %83 %84
-%83 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%87 = OpLoad %v4float %86
-OpStore %82 %87
-OpBranch %85
-%84 = OpLabel
-%88 = OpFUnordNotEqual %v4bool %52 %44
-%89 = OpAny %bool %88
-OpSelectionMerge %93 None
-OpBranchConditional %89 %91 %92
-%91 = OpLabel
-OpStore %90 %79
-OpBranch %93
-%92 = OpLabel
-%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%95 = OpLoad %v4float %94
-%96 = OpFOrdEqual %v4bool %52 %95
-%97 = OpAll %bool %96
-OpSelectionMerge %101 None
-OpBranchConditional %97 %99 %100
-%99 = OpLabel
-OpStore %98 %36
-OpBranch %101
-%100 = OpLabel
-OpStore %98 %52
-OpBranch %101
-%101 = OpLabel
-%102 = OpLoad %v4float %98
-OpStore %90 %102
-OpBranch %93
-%93 = OpLabel
-%103 = OpLoad %v4float %90
-OpStore %82 %103
-OpBranch %85
+%73 = OpLoad %v4float %59
+OpStore %result %73
+%74 = OpFOrdEqual %v4bool %52 %36
+%75 = OpAll %bool %74
+OpSelectionMerge %79 None
+OpBranchConditional %75 %77 %78
+%77 = OpLabel
+%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%81 = OpLoad %v4float %80
+OpStore %76 %81
+OpBranch %79
+%78 = OpLabel
+%82 = OpFUnordNotEqual %v4bool %52 %44
+%83 = OpAny %bool %82
+OpSelectionMerge %87 None
+OpBranchConditional %83 %85 %86
 %85 = OpLabel
-%104 = OpLoad %v4float %82
-OpReturnValue %104
+OpStore %84 %73
+OpBranch %87
+%86 = OpLabel
+%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%89 = OpLoad %v4float %88
+%90 = OpFOrdEqual %v4bool %52 %89
+%91 = OpAll %bool %90
+%92 = OpCompositeConstruct %v4bool %91 %91 %91 %91
+%93 = OpSelect %v4float %92 %36 %52
+OpStore %84 %93
+OpBranch %87
+%87 = OpLabel
+%94 = OpLoad %v4float %84
+OpStore %76 %94
+OpBranch %79
+%79 = OpLabel
+%95 = OpLoad %v4float %76
+OpReturnValue %95
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryNesting.hlsl b/tests/sksl/shared/TernaryNesting.hlsl
index b5d0b39..e6cf808 100644
--- a/tests/sksl/shared/TernaryNesting.hlsl
+++ b/tests/sksl/shared/TernaryNesting.hlsl
@@ -22,59 +22,35 @@
     float4 _59 = 0.0f.xxxx;
     if (any(bool4(_10_colorWhite.x != _36.x, _10_colorWhite.y != _36.y, _10_colorWhite.z != _36.z, _10_colorWhite.w != _36.w)))
     {
-        float4 _65 = 0.0f.xxxx;
-        if (all(bool4(_44.x == _52.x, _44.y == _52.y, _44.z == _52.z, _44.w == _52.w)))
-        {
-            _65 = _52;
-        }
-        else
-        {
-            _65 = _44;
-        }
-        _59 = _65;
+        bool4 _65 = all(bool4(_44.x == _52.x, _44.y == _52.y, _44.z == _52.z, _44.w == _52.w)).xxxx;
+        _59 = float4(_65.x ? _52.x : _44.x, _65.y ? _52.y : _44.y, _65.z ? _52.z : _44.z, _65.w ? _52.w : _44.w);
     }
     else
     {
-        float4 _72 = 0.0f.xxxx;
-        if (any(bool4(_52.x != _44.x, _52.y != _44.y, _52.z != _44.z, _52.w != _44.w)))
-        {
-            _72 = _36;
-        }
-        else
-        {
-            _72 = _10_colorWhite;
-        }
-        _59 = _72;
+        bool4 _69 = any(bool4(_52.x != _44.x, _52.y != _44.y, _52.z != _44.z, _52.w != _44.w)).xxxx;
+        _59 = float4(_69.x ? _36.x : _10_colorWhite.x, _69.y ? _36.y : _10_colorWhite.y, _69.z ? _36.z : _10_colorWhite.z, _69.w ? _36.w : _10_colorWhite.w);
     }
     float4 result = _59;
-    float4 _82 = 0.0f.xxxx;
+    float4 _76 = 0.0f.xxxx;
     if (all(bool4(_52.x == _36.x, _52.y == _36.y, _52.z == _36.z, _52.w == _36.w)))
     {
-        _82 = _10_colorWhite;
+        _76 = _10_colorWhite;
     }
     else
     {
-        float4 _90 = 0.0f.xxxx;
+        float4 _84 = 0.0f.xxxx;
         if (any(bool4(_52.x != _44.x, _52.y != _44.y, _52.z != _44.z, _52.w != _44.w)))
         {
-            _90 = _59;
+            _84 = _59;
         }
         else
         {
-            float4 _98 = 0.0f.xxxx;
-            if (all(bool4(_52.x == _10_colorWhite.x, _52.y == _10_colorWhite.y, _52.z == _10_colorWhite.z, _52.w == _10_colorWhite.w)))
-            {
-                _98 = _36;
-            }
-            else
-            {
-                _98 = _52;
-            }
-            _90 = _98;
+            bool4 _92 = all(bool4(_52.x == _10_colorWhite.x, _52.y == _10_colorWhite.y, _52.z == _10_colorWhite.z, _52.w == _10_colorWhite.w)).xxxx;
+            _84 = float4(_92.x ? _36.x : _52.x, _92.y ? _36.y : _52.y, _92.z ? _36.z : _52.z, _92.w ? _36.w : _52.w);
         }
-        _82 = _90;
+        _76 = _84;
     }
-    return _82;
+    return _76;
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/TernarySideEffects.asm.frag b/tests/sksl/shared/TernarySideEffects.asm.frag
index e934a76..3ca48b2 100644
--- a/tests/sksl/shared/TernarySideEffects.asm.frag
+++ b/tests/sksl/shared/TernarySideEffects.asm.frag
@@ -75,13 +75,12 @@
 OpDecorate %119 RelaxedPrecision
 OpDecorate %121 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %142 RelaxedPrecision
-OpDecorate %147 RelaxedPrecision
-OpDecorate %157 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
-OpDecorate %160 RelaxedPrecision
-OpDecorate %161 RelaxedPrecision
+OpDecorate %137 RelaxedPrecision
+OpDecorate %138 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
+OpDecorate %152 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %155 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -115,6 +114,7 @@
 %int_1 = OpConstant %int 1
 %float_8 = OpConstant %float 8
 %float_17 = OpConstant %float 17
+%v4bool = OpTypeVector %bool 4
 %int_0 = OpConstant %int 0
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
@@ -139,9 +139,7 @@
 %114 = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_bool Function
 %c = OpVariable %_ptr_Function_bool Function
-%127 = OpVariable %_ptr_Function_bool Function
-%132 = OpVariable %_ptr_Function_v4float Function
-%151 = OpVariable %_ptr_Function_v4float Function
+%128 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_1
 OpSelectionMerge %34 None
@@ -285,52 +283,35 @@
 %122 = OpLoad %float %114
 OpStore %b %true
 OpStore %b %false
-OpSelectionMerge %130 None
-OpBranchConditional %false %128 %129
-%128 = OpLabel
-OpStore %127 %false
-OpBranch %130
-%129 = OpLabel
-OpStore %127 %false
-OpBranch %130
+%127 = OpSelect %bool %false %false %false
+OpStore %c %127
+OpSelectionMerge %132 None
+OpBranchConditional %127 %130 %131
 %130 = OpLabel
-%131 = OpLoad %bool %127
-OpStore %c %131
-OpSelectionMerge %136 None
-OpBranchConditional %131 %134 %135
-%134 = OpLabel
-%137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%141 = OpLoad %v4float %137
-OpStore %132 %141
-OpBranch %136
-%135 = OpLabel
-%142 = OpLoad %float %x
-%144 = OpFOrdEqual %bool %142 %float_8
-OpSelectionMerge %146 None
-OpBranchConditional %144 %145 %146
-%145 = OpLabel
-%147 = OpLoad %float %y
-%149 = OpFOrdEqual %bool %147 %float_17
-OpBranch %146
-%146 = OpLabel
-%150 = OpPhi %bool %false %135 %149 %145
-OpSelectionMerge %154 None
-OpBranchConditional %150 %152 %153
-%152 = OpLabel
-%155 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%157 = OpLoad %v4float %155
-OpStore %151 %157
-OpBranch %154
-%153 = OpLabel
-%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%159 = OpLoad %v4float %158
-OpStore %151 %159
-OpBranch %154
-%154 = OpLabel
-%160 = OpLoad %v4float %151
-OpStore %132 %160
-OpBranch %136
-%136 = OpLabel
-%161 = OpLoad %v4float %132
-OpReturnValue %161
+%133 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%137 = OpLoad %v4float %133
+OpStore %128 %137
+OpBranch %132
+%131 = OpLabel
+%138 = OpLoad %float %x
+%140 = OpFOrdEqual %bool %138 %float_8
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+%143 = OpLoad %float %y
+%145 = OpFOrdEqual %bool %143 %float_17
+OpBranch %142
+%142 = OpLabel
+%146 = OpPhi %bool %false %131 %145 %141
+%148 = OpCompositeConstruct %v4bool %146 %146 %146 %146
+%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%152 = OpLoad %v4float %150
+%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%154 = OpLoad %v4float %153
+%149 = OpSelect %v4float %148 %152 %154
+OpStore %128 %149
+OpBranch %132
+%132 = OpLabel
+%155 = OpLoad %v4float %128
+OpReturnValue %155
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernarySideEffects.hlsl b/tests/sksl/shared/TernarySideEffects.hlsl
index 18d8c44..33bfcfe 100644
--- a/tests/sksl/shared/TernarySideEffects.hlsl
+++ b/tests/sksl/shared/TernarySideEffects.hlsl
@@ -124,44 +124,28 @@
     }
     bool b = true;
     b = false;
-    bool _127 = false;
-    if (false)
-    {
-        _127 = false;
-    }
-    else
-    {
-        _127 = false;
-    }
+    bool _127 = false ? false : false;
     bool c = _127;
-    float4 _132 = 0.0f.xxxx;
+    float4 _128 = 0.0f.xxxx;
     if (_127)
     {
-        _132 = _10_colorRed;
+        _128 = _10_colorRed;
     }
     else
     {
-        bool _150 = false;
+        bool _146 = false;
         if (x == 8.0f)
         {
-            _150 = y == 17.0f;
+            _146 = y == 17.0f;
         }
         else
         {
-            _150 = false;
+            _146 = false;
         }
-        float4 _151 = 0.0f.xxxx;
-        if (_150)
-        {
-            _151 = _10_colorGreen;
-        }
-        else
-        {
-            _151 = _10_colorRed;
-        }
-        _132 = _151;
+        bool4 _148 = _146.xxxx;
+        _128 = float4(_148.x ? _10_colorGreen.x : _10_colorRed.x, _148.y ? _10_colorGreen.y : _10_colorRed.y, _148.z ? _10_colorGreen.z : _10_colorRed.z, _148.w ? _10_colorGreen.w : _10_colorRed.w);
     }
-    return _132;
+    return _128;
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag b/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag
index 888ac8c..dbc113a 100644
--- a/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag
+++ b/tests/sksl/shared/TernaryTrueFalseOptimization.asm.frag
@@ -50,9 +50,8 @@
 OpDecorate %109 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
 OpDecorate %112 RelaxedPrecision
+OpDecorate %120 RelaxedPrecision
 OpDecorate %122 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -79,7 +78,7 @@
 %float_1 = OpConstant %float 1
 %int_1 = OpConstant %int 1
 %v2bool = OpTypeVector %bool 2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -92,7 +91,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
-%116 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 OpSelectionMerge %31 None
 OpBranchConditional %true %30 %31
@@ -204,19 +202,11 @@
 %96 = OpLabel
 %115 = OpPhi %bool %false %75 %114 %106
 OpStore %ok %115
-OpSelectionMerge %120 None
-OpBranchConditional %115 %118 %119
-%118 = OpLabel
-%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%117 = OpCompositeConstruct %v4bool %115 %115 %115 %115
+%119 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%120 = OpLoad %v4float %119
+%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %122 = OpLoad %v4float %121
-OpStore %116 %122
-OpBranch %120
-%119 = OpLabel
-%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%124 = OpLoad %v4float %123
-OpStore %116 %124
-OpBranch %120
-%120 = OpLabel
-%125 = OpLoad %v4float %116
-OpReturnValue %125
+%118 = OpSelect %v4float %117 %120 %122
+OpReturnValue %118
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryTrueFalseOptimization.hlsl b/tests/sksl/shared/TernaryTrueFalseOptimization.hlsl
index 865ff4f..2ff4692 100644
--- a/tests/sksl/shared/TernaryTrueFalseOptimization.hlsl
+++ b/tests/sksl/shared/TernaryTrueFalseOptimization.hlsl
@@ -93,16 +93,8 @@
         _115 = false;
     }
     ok = _115;
-    float4 _116 = 0.0f.xxxx;
-    if (_115)
-    {
-        _116 = _10_colorGreen;
-    }
-    else
-    {
-        _116 = _10_colorRed;
-    }
-    return _116;
+    bool4 _117 = _115.xxxx;
+    return float4(_117.x ? _10_colorGreen.x : _10_colorRed.x, _117.y ? _10_colorGreen.y : _10_colorRed.y, _117.z ? _10_colorGreen.z : _10_colorRed.z, _117.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/UnaryPositiveNegative.asm.frag b/tests/sksl/shared/UnaryPositiveNegative.asm.frag
index ebb57bf..b72f7ad 100644
--- a/tests/sksl/shared/UnaryPositiveNegative.asm.frag
+++ b/tests/sksl/shared/UnaryPositiveNegative.asm.frag
@@ -107,9 +107,8 @@
 OpDecorate %229 RelaxedPrecision
 OpDecorate %238 RelaxedPrecision
 OpDecorate %239 RelaxedPrecision
+OpDecorate %283 RelaxedPrecision
 OpDecorate %286 RelaxedPrecision
-OpDecorate %289 RelaxedPrecision
-OpDecorate %290 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -183,7 +182,6 @@
 %232 = OpTypeFunction %v4float %_ptr_Function_v2float
 %_ptr_Function_float = OpTypePointer Function %float
 %false = OpConstantFalse %bool
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint_v = OpFunction %void None %29
@@ -395,7 +393,6 @@
 %233 = OpFunctionParameter %_ptr_Function_v2float
 %234 = OpLabel
 %_0_x = OpVariable %_ptr_Function_float Function
-%279 = OpVariable %_ptr_Function_v4float Function
 %237 = OpAccessChain %_ptr_Uniform_v4float %19 %int_0
 %238 = OpLoad %v4float %237
 %239 = OpCompositeExtract %float %238 0
@@ -466,19 +463,11 @@
 OpBranch %276
 %276 = OpLabel
 %278 = OpPhi %bool %false %272 %277 %275
-OpSelectionMerge %283 None
-OpBranchConditional %278 %281 %282
-%281 = OpLabel
-%284 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1
+%279 = OpCompositeConstruct %v4bool %278 %278 %278 %278
+%281 = OpAccessChain %_ptr_Uniform_v4float %19 %int_1
+%283 = OpLoad %v4float %281
+%284 = OpAccessChain %_ptr_Uniform_v4float %19 %int_2
 %286 = OpLoad %v4float %284
-OpStore %279 %286
-OpBranch %283
-%282 = OpLabel
-%287 = OpAccessChain %_ptr_Uniform_v4float %19 %int_2
-%289 = OpLoad %v4float %287
-OpStore %279 %289
-OpBranch %283
-%283 = OpLabel
-%290 = OpLoad %v4float %279
-OpReturnValue %290
+%280 = OpSelect %v4float %279 %283 %286
+OpReturnValue %280
 OpFunctionEnd
diff --git a/tests/sksl/shared/UnaryPositiveNegative.hlsl b/tests/sksl/shared/UnaryPositiveNegative.hlsl
index 740b526..af90e56 100644
--- a/tests/sksl/shared/UnaryPositiveNegative.hlsl
+++ b/tests/sksl/shared/UnaryPositiveNegative.hlsl
@@ -194,16 +194,8 @@
     {
         _278 = false;
     }
-    float4 _279 = 0.0f.xxxx;
-    if (_278)
-    {
-        _279 = _19_colorGreen;
-    }
-    else
-    {
-        _279 = _19_colorRed;
-    }
-    return _279;
+    bool4 _279 = _278.xxxx;
+    return float4(_279.x ? _19_colorGreen.x : _19_colorRed.x, _279.y ? _19_colorGreen.y : _19_colorRed.y, _279.z ? _19_colorGreen.z : _19_colorRed.z, _279.w ? _19_colorGreen.w : _19_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/UniformMatrixResize.asm.frag b/tests/sksl/shared/UniformMatrixResize.asm.frag
index f8b60ba..bb36510 100644
--- a/tests/sksl/shared/UniformMatrixResize.asm.frag
+++ b/tests/sksl/shared/UniformMatrixResize.asm.frag
@@ -26,9 +26,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %90 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -67,7 +66,7 @@
 %69 = OpConstantComposite %v3float %float_4 %float_5 %float_0
 %70 = OpConstantComposite %mat3v3float %68 %69 %66
 %v3bool = OpTypeVector %bool 3
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
@@ -93,7 +92,6 @@
 %main = OpFunction %v4float None %40
 %41 = OpFunctionParameter %_ptr_Function_v2float
 %42 = OpLabel
-%81 = OpVariable %_ptr_Function_v4float Function
 %44 = OpFunctionCall %mat2v2float %resizeMatrix_f22
 %52 = OpCompositeExtract %v2float %44 0
 %53 = OpFOrdEqual %v2bool %52 %48
@@ -122,19 +120,11 @@
 OpBranch %60
 %60 = OpLabel
 %80 = OpPhi %bool %false %42 %79 %59
-OpSelectionMerge %85 None
-OpBranchConditional %80 %83 %84
-%83 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%89 = OpLoad %v4float %86
-OpStore %81 %89
-OpBranch %85
-%84 = OpLabel
-%90 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2
-%92 = OpLoad %v4float %90
-OpStore %81 %92
-OpBranch %85
-%85 = OpLabel
-%93 = OpLoad %v4float %81
-OpReturnValue %93
+%82 = OpCompositeConstruct %v4bool %80 %80 %80 %80
+%84 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%87 = OpLoad %v4float %84
+%88 = OpAccessChain %_ptr_Uniform_v4float %11 %int_2
+%90 = OpLoad %v4float %88
+%83 = OpSelect %v4float %82 %87 %90
+OpReturnValue %83
 OpFunctionEnd
diff --git a/tests/sksl/shared/UniformMatrixResize.hlsl b/tests/sksl/shared/UniformMatrixResize.hlsl
index 16ef81f..05680e7 100644
--- a/tests/sksl/shared/UniformMatrixResize.hlsl
+++ b/tests/sksl/shared/UniformMatrixResize.hlsl
@@ -35,16 +35,8 @@
     {
         _80 = false;
     }
-    float4 _81 = 0.0f.xxxx;
-    if (_80)
-    {
-        _81 = _11_colorGreen;
-    }
-    else
-    {
-        _81 = _11_colorRed;
-    }
-    return _81;
+    bool4 _82 = _80.xxxx;
+    return float4(_82.x ? _11_colorGreen.x : _11_colorRed.x, _82.y ? _11_colorGreen.y : _11_colorRed.y, _82.z ? _11_colorGreen.z : _11_colorRed.z, _82.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/VectorConstructors.asm.frag b/tests/sksl/shared/VectorConstructors.asm.frag
index 5c4fea4..8326e80 100644
--- a/tests/sksl/shared/VectorConstructors.asm.frag
+++ b/tests/sksl/shared/VectorConstructors.asm.frag
@@ -71,9 +71,8 @@
 OpDecorate %115 RelaxedPrecision
 OpDecorate %118 RelaxedPrecision
 OpDecorate %119 RelaxedPrecision
+OpDecorate %195 RelaxedPrecision
 OpDecorate %197 RelaxedPrecision
-OpDecorate %199 RelaxedPrecision
-OpDecorate %200 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -260,7 +259,6 @@
 %186 = OpVariable %_ptr_Function_v2bool Function
 %187 = OpVariable %_ptr_Function_v3bool Function
 %188 = OpVariable %_ptr_Function_v4int Function
-%190 = OpVariable %_ptr_Function_v4float Function
 OpStore %v1 %126
 OpStore %v2 %129
 OpStore %v3 %126
@@ -307,19 +305,11 @@
 OpStore %187 %168
 OpStore %188 %170
 %189 = OpFunctionCall %bool %check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4 %171 %172 %173 %174 %175 %176 %177 %178 %179 %180 %181 %182 %183 %184 %185 %186 %187 %188
-OpSelectionMerge %193 None
-OpBranchConditional %189 %191 %192
-%191 = OpLabel
-%194 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%197 = OpLoad %v4float %194
-OpStore %190 %197
-OpBranch %193
-%192 = OpLabel
-%198 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%199 = OpLoad %v4float %198
-OpStore %190 %199
-OpBranch %193
-%193 = OpLabel
-%200 = OpLoad %v4float %190
-OpReturnValue %200
+%190 = OpCompositeConstruct %v4bool %189 %189 %189 %189
+%192 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%195 = OpLoad %v4float %192
+%196 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%197 = OpLoad %v4float %196
+%191 = OpSelect %v4float %190 %195 %197
+OpReturnValue %191
 OpFunctionEnd
diff --git a/tests/sksl/shared/VectorConstructors.hlsl b/tests/sksl/shared/VectorConstructors.hlsl
index c8e5324..ba40c25 100644
--- a/tests/sksl/shared/VectorConstructors.hlsl
+++ b/tests/sksl/shared/VectorConstructors.hlsl
@@ -59,16 +59,8 @@
     bool2 _186 = bool2(true, true);
     bool3 _187 = bool3(true, true, true);
     int4 _188 = int4(1, 1, 1, 1);
-    float4 _190 = 0.0f.xxxx;
-    if (check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4(_171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188))
-    {
-        _190 = _11_colorGreen;
-    }
-    else
-    {
-        _190 = _11_colorRed;
-    }
-    return _190;
+    bool4 _190 = check_bf2f2f2f3i2i2f2f2f4i2b4f2f2f2b2b2b3i4(_171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, _183, _184, _185, _186, _187, _188).xxxx;
+    return float4(_190.x ? _11_colorGreen.x : _11_colorRed.x, _190.y ? _11_colorGreen.y : _11_colorRed.y, _190.z ? _11_colorGreen.z : _11_colorRed.z, _190.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/VectorScalarMath.asm.frag b/tests/sksl/shared/VectorScalarMath.asm.frag
index 1bbd2c4..f4b3286 100644
--- a/tests/sksl/shared/VectorScalarMath.asm.frag
+++ b/tests/sksl/shared/VectorScalarMath.asm.frag
@@ -88,9 +88,8 @@
 OpDecorate %351 RelaxedPrecision
 OpDecorate %352 RelaxedPrecision
 OpDecorate %353 RelaxedPrecision
+OpDecorate %366 RelaxedPrecision
 OpDecorate %368 RelaxedPrecision
-OpDecorate %370 RelaxedPrecision
-OpDecorate %371 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -419,7 +418,6 @@
 %_1_inputRed = OpVariable %_ptr_Function_v4float Function
 %_2_inputGreen = OpVariable %_ptr_Function_v4float Function
 %_3_x = OpVariable %_ptr_Function_v4float Function
-%363 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
 %212 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %213 = OpLoad %v4float %212
@@ -620,19 +618,11 @@
 OpBranch %360
 %360 = OpLabel
 %362 = OpPhi %bool %false %355 %361 %359
-OpSelectionMerge %366 None
-OpBranchConditional %362 %364 %365
-%364 = OpLabel
-%367 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%363 = OpCompositeConstruct %v4bool %362 %362 %362 %362
+%365 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%366 = OpLoad %v4float %365
+%367 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
 %368 = OpLoad %v4float %367
-OpStore %363 %368
-OpBranch %366
-%365 = OpLabel
-%369 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%370 = OpLoad %v4float %369
-OpStore %363 %370
-OpBranch %366
-%366 = OpLabel
-%371 = OpLoad %v4float %363
-OpReturnValue %371
+%364 = OpSelect %v4float %363 %366 %368
+OpReturnValue %364
 OpFunctionEnd
diff --git a/tests/sksl/shared/VectorScalarMath.hlsl b/tests/sksl/shared/VectorScalarMath.hlsl
index 0c916ec..be1110a 100644
--- a/tests/sksl/shared/VectorScalarMath.hlsl
+++ b/tests/sksl/shared/VectorScalarMath.hlsl
@@ -413,16 +413,8 @@
     {
         _362 = false;
     }
-    float4 _363 = 0.0f.xxxx;
-    if (_362)
-    {
-        _363 = _11_colorGreen;
-    }
-    else
-    {
-        _363 = _11_colorRed;
-    }
-    return _363;
+    bool4 _363 = _362.xxxx;
+    return float4(_363.x ? _11_colorGreen.x : _11_colorRed.x, _363.y ? _11_colorGreen.y : _11_colorRed.y, _363.z ? _11_colorGreen.z : _11_colorRed.z, _363.w ? _11_colorGreen.w : _11_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/shared/VectorToMatrixCast.asm.frag b/tests/sksl/shared/VectorToMatrixCast.asm.frag
index acba70f..0dcfa32 100644
--- a/tests/sksl/shared/VectorToMatrixCast.asm.frag
+++ b/tests/sksl/shared/VectorToMatrixCast.asm.frag
@@ -137,9 +137,8 @@
 OpDecorate %256 RelaxedPrecision
 OpDecorate %260 RelaxedPrecision
 OpDecorate %262 RelaxedPrecision
-OpDecorate %272 RelaxedPrecision
-OpDecorate %274 RelaxedPrecision
-OpDecorate %275 RelaxedPrecision
+OpDecorate %269 RelaxedPrecision
+OpDecorate %271 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -186,7 +185,6 @@
 %float_6 = OpConstant %float 6
 %258 = OpConstantComposite %v2float %float_5 %float_6
 %259 = OpConstantComposite %mat2v2float %258 %258
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %20 = OpVariable %_ptr_Function_v2float Function
@@ -199,7 +197,6 @@
 %24 = OpFunctionParameter %_ptr_Function_v2float
 %25 = OpLabel
 %ok = OpVariable %_ptr_Function_bool Function
-%266 = OpVariable %_ptr_Function_v4float Function
 OpStore %ok %true
 OpSelectionMerge %31 None
 OpBranchConditional %true %30 %31
@@ -451,19 +448,11 @@
 %244 = OpLabel
 %265 = OpPhi %bool %false %220 %264 %243
 OpStore %ok %265
-OpSelectionMerge %270 None
-OpBranchConditional %265 %268 %269
-%268 = OpLabel
-%271 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%272 = OpLoad %v4float %271
-OpStore %266 %272
-OpBranch %270
-%269 = OpLabel
-%273 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%274 = OpLoad %v4float %273
-OpStore %266 %274
-OpBranch %270
-%270 = OpLabel
-%275 = OpLoad %v4float %266
-OpReturnValue %275
+%266 = OpCompositeConstruct %v4bool %265 %265 %265 %265
+%268 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%269 = OpLoad %v4float %268
+%270 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%271 = OpLoad %v4float %270
+%267 = OpSelect %v4float %266 %269 %271
+OpReturnValue %267
 OpFunctionEnd
diff --git a/tests/sksl/shared/VectorToMatrixCast.hlsl b/tests/sksl/shared/VectorToMatrixCast.hlsl
index bda499e..d472358 100644
--- a/tests/sksl/shared/VectorToMatrixCast.hlsl
+++ b/tests/sksl/shared/VectorToMatrixCast.hlsl
@@ -142,16 +142,8 @@
         _265 = false;
     }
     ok = _265;
-    float4 _266 = 0.0f.xxxx;
-    if (_265)
-    {
-        _266 = _10_colorGreen;
-    }
-    else
-    {
-        _266 = _10_colorRed;
-    }
-    return _266;
+    bool4 _266 = _265.xxxx;
+    return float4(_266.x ? _10_colorGreen.x : _10_colorRed.x, _266.y ? _10_colorGreen.y : _10_colorRed.y, _266.z ? _10_colorGreen.z : _10_colorRed.z, _266.w ? _10_colorGreen.w : _10_colorRed.w);
 }
 
 void frag_main()
diff --git a/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag b/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag
index 720aa2f..d439a5e 100644
--- a/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag
+++ b/tests/sksl/spirv/ArrayStrideInDifferentLayouts.asm.frag
@@ -23,7 +23,6 @@
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
-OpDecorate %61 RelaxedPrecision
 %float = OpTypeFloat 32
 %int = OpTypeInt 32 1
 %int_2 = OpConstant %int 2
@@ -50,14 +49,13 @@
 %int_0 = OpConstant %int 0
 %_ptr_Uniform__arr_float_int_2_0 = OpTypePointer Uniform %_arr_float_int_2_0
 %_ptr_PushConstant__arr_float_int_2 = OpTypePointer PushConstant %_arr_float_int_2
-%_ptr_Function_v4float = OpTypePointer Function %v4float
-%58 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%v4bool = OpTypeVector %bool 4
+%56 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %float_0 = OpConstant %float 0
-%60 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%58 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %21
 %22 = OpLabel
 %localArray = OpVariable %_ptr_Function__arr_float_int_2_0 Function
-%53 = OpVariable %_ptr_Function_v4float Function
 %27 = OpCompositeConstruct %_arr_float_int_2_0 %float_1 %float_2
 OpStore %localArray %27
 %30 = OpAccessChain %_ptr_Uniform__arr_float_int_2_0 %10 %int_0
@@ -84,16 +82,8 @@
 OpBranch %39
 %39 = OpLabel
 %52 = OpPhi %bool %false %22 %51 %38
-OpSelectionMerge %57 None
-OpBranchConditional %52 %55 %56
-%55 = OpLabel
-OpStore %53 %58
-OpBranch %57
-%56 = OpLabel
-OpStore %53 %60
-OpBranch %57
-%57 = OpLabel
-%61 = OpLoad %v4float %53
-OpStore %sk_FragColor %61
+%54 = OpCompositeConstruct %v4bool %52 %52 %52 %52
+%55 = OpSelect %v4float %54 %56 %58
+OpStore %sk_FragColor %55
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/spirv/Ossfuzz53202.asm.frag b/tests/sksl/spirv/Ossfuzz53202.asm.frag
index 01b6c70..b57ecac 100644
--- a/tests/sksl/spirv/Ossfuzz53202.asm.frag
+++ b/tests/sksl/spirv/Ossfuzz53202.asm.frag
@@ -18,9 +18,8 @@
 OpDecorate %colorR RelaxedPrecision
 OpDecorate %colorGreen RelaxedPrecision
 OpDecorate %_arr_float_int_2 ArrayStride 16
-OpDecorate %49 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
-OpDecorate %51 RelaxedPrecision
+OpDecorate %47 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -44,7 +43,7 @@
 %int_1 = OpConstant %int 1
 %_ptr_Function_float = OpTypePointer Function %float
 %int_0 = OpConstant %int 0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %_entrypoint_v = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -55,7 +54,6 @@
 %19 = OpLabel
 %_0_ok = OpVariable %_ptr_Function_int Function
 %_1_d = OpVariable %_ptr_Function__arr_float_int_2 Function
-%44 = OpVariable %_ptr_Function_v4float Function
 %29 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_1
 OpStore %_1_d %29
 OpBranch %30
@@ -75,17 +73,9 @@
 %34 = OpLabel
 %41 = OpLoad %int %_0_ok
 %43 = OpIEqual %bool %41 %int_0
-OpSelectionMerge %48 None
-OpBranchConditional %43 %46 %47
-%46 = OpLabel
-%49 = OpLoad %v4float %colorGreen
-OpStore %44 %49
-OpBranch %48
-%47 = OpLabel
-%50 = OpLoad %v4float %colorR
-OpStore %44 %50
-OpBranch %48
-%48 = OpLabel
-%51 = OpLoad %v4float %44
-OpReturnValue %51
+%45 = OpCompositeConstruct %v4bool %43 %43 %43 %43
+%47 = OpLoad %v4float %colorGreen
+%48 = OpLoad %v4float %colorR
+%46 = OpSelect %v4float %45 %47 %48
+OpReturnValue %46
 OpFunctionEnd
diff --git a/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag b/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag
index 2ab5637..456fe789 100644
--- a/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag
+++ b/tests/sksl/spirv/StructArrayMemberInDifferentLayouts.asm.frag
@@ -32,7 +32,6 @@
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpMemberDecorate %S 0 Offset 0
-OpDecorate %52 RelaxedPrecision
 %float = OpTypeFloat 32
 %int = OpTypeInt 32 1
 %int_2 = OpConstant %int 2
@@ -57,16 +56,15 @@
 %int_0 = OpConstant %int 0
 %_ptr_PushConstant__arr_float_int_2 = OpTypePointer PushConstant %_arr_float_int_2
 %_ptr_Uniform__arr_float_int_2_0 = OpTypePointer Uniform %_arr_float_int_2_0
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v4bool = OpTypeVector %bool 4
 %float_1 = OpConstant %float 1
-%49 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%47 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %float_0 = OpConstant %float 0
-%51 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%49 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %21
 %22 = OpLabel
 %s1 = OpVariable %_ptr_Function_S Function
 %s2 = OpVariable %_ptr_Function_S Function
-%43 = OpVariable %_ptr_Function_v4float Function
 %27 = OpAccessChain %_ptr_PushConstant__arr_float_int_2 %3 %int_0
 %29 = OpLoad %_arr_float_int_2 %27
 %30 = OpCompositeConstruct %S %29
@@ -82,17 +80,9 @@
 %40 = OpCompositeExtract %float %34 1
 %41 = OpFOrdEqual %bool %39 %40
 %42 = OpLogicalAnd %bool %41 %38
-OpSelectionMerge %47 None
-OpBranchConditional %42 %45 %46
-%45 = OpLabel
-OpStore %43 %49
-OpBranch %47
-%46 = OpLabel
-OpStore %43 %51
-OpBranch %47
-%47 = OpLabel
-%52 = OpLoad %v4float %43
-OpStore %sk_FragColor %52
+%44 = OpCompositeConstruct %v4bool %42 %42 %42 %42
+%45 = OpSelect %v4float %44 %47 %49
+OpStore %sk_FragColor %45
 OpReturn
 OpFunctionEnd