Performance experiment: disable control-flow analysis.

This CL will be used to test for potential performance regressions (or
improvements) that we might cause by disabling this optimization pass.

It will be reverted in ~1 day.

Change-Id: I26b7687c341eb6d81231406381c39869cfccf6d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/381259
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp b/src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp
index 1229d78..39ef620 100644
--- a/src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp
+++ b/src/gpu/effects/generated/GrRGBToHSLFilterEffect.cpp
@@ -29,13 +29,13 @@
                 R"SkSL(half4 c = %s;
 half4 p = c.y < c.z ? half4(c.zy, -1.0, 0.66666668653488159) : half4(c.yz, 0.0, -0.3333333432674408);
 half4 q = c.x < p.x ? half4(p.x, c.x, p.yw) : half4(c.x, p.x, p.yz);
-;
+half eps = 9.9999997473787516e-05;
 half pmV = q.x;
 half pmC = pmV - min(q.y, q.z);
 half pmL = pmV - pmC * 0.5;
-half H = abs(q.w + (q.y - q.z) / (pmC * 6.0 + 9.9999997473787516e-05));
-half S = pmC / ((c.w + 9.9999997473787516e-05) - abs(pmL * 2.0 - c.w));
-half L = pmL / (c.w + 9.9999997473787516e-05);
+half H = abs(q.w + (q.y - q.z) / (pmC * 6.0 + eps));
+half S = pmC / ((c.w + eps) - abs(pmL * 2.0 - c.w));
+half L = pmL / (c.w + eps);
 return half4(H, S, L, c.w);
 )SkSL",
                 _sample0.c_str());
diff --git a/src/sksl/SkSLCompiler.cpp b/src/sksl/SkSLCompiler.cpp
index fae1562..828634d 100644
--- a/src/sksl/SkSLCompiler.cpp
+++ b/src/sksl/SkSLCompiler.cpp
@@ -76,7 +76,7 @@
 // These flags allow tools like Viewer or Nanobench to override the compiler's ProgramSettings.
 bool gSkSLOptimizer = true;
 bool gSkSLInliner = true;
-bool gSkSLControlFlowAnalysis = true;
+bool gSkSLControlFlowAnalysis = false;
 
 using RefKind = VariableReference::RefKind;
 
diff --git a/tests/SkRuntimeEffectTest.cpp b/tests/SkRuntimeEffectTest.cpp
index 46f4836..85fbdd3 100644
--- a/tests/SkRuntimeEffectTest.cpp
+++ b/tests/SkRuntimeEffectTest.cpp
@@ -96,14 +96,6 @@
                            "unknown identifier 'sk_Caps'");
 }
 
-DEF_TEST(SkRuntimeEffectInvalid_LateErrors, r) {
-    // Errors that aren't caught until later in the compilation process (during optimize())
-    test_invalid_effect(r, "half4 main() { return half4(1); return half4(0); }", "unreachable");
-    test_invalid_effect(r, "half4 badFunc() {}"
-                           "half4 main() { return badFunc(); }",
-                           "without returning");
-}
-
 DEF_TEST(SkRuntimeEffectInvalidColorFilters, r) {
     auto test = [r](const char* sksl) {
         auto [effect, errorText] = SkRuntimeEffect::Make(SkString(sksl));
diff --git a/tests/sksl/errors/InlineDivideByZero.glsl b/tests/sksl/errors/InlineDivideByZero.glsl
index d3e011f..496514d 100644
--- a/tests/sksl/errors/InlineDivideByZero.glsl
+++ b/tests/sksl/errors/InlineDivideByZero.glsl
@@ -1,6 +1,10 @@
-### Compilation failed:
 
-error: 6: division by zero
-error: 7: division by zero
-error: 8: division by zero
-3 errors
+uniform float unknownInput;
+void main() {
+    int inlineTest = 0 / 0;
+
+    inlineTest = (ivec4(0) / 0).x;
+
+    inlineTest = int(unknownInput) / 0;
+
+}
diff --git a/tests/sksl/errors/Ossfuzz26759.glsl b/tests/sksl/errors/Ossfuzz26759.glsl
index 6af751d..62565cd 100644
--- a/tests/sksl/errors/Ossfuzz26759.glsl
+++ b/tests/sksl/errors/Ossfuzz26759.glsl
@@ -1,4 +1,5 @@
-### Compilation failed:
 
-error: 1: 'i' has not been assigned
-1 error
+void main() {
+    int i;
+    ivec3(i--);
+}
diff --git a/tests/sksl/errors/StaticSwitchConditionalBreak.glsl b/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
index aca3d8a..605641e 100644
--- a/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
+++ b/tests/sksl/errors/StaticSwitchConditionalBreak.glsl
@@ -1,4 +1,2 @@
-### Compilation failed:
 
-error: 3: static switch contains non-static conditional exit
-1 error
+out vec4 sk_FragColor;
diff --git a/tests/sksl/errors/Unreachable.glsl b/tests/sksl/errors/Unreachable.glsl
index 6b6639d..0c03be4 100644
--- a/tests/sksl/errors/Unreachable.glsl
+++ b/tests/sksl/errors/Unreachable.glsl
@@ -1,7 +1,5 @@
-### Compilation failed:
 
-error: 1: unreachable
-error: 2: unreachable
-error: 3: unreachable
-error: 4: unreachable
-4 errors
+void call_after_return() {
+    return;
+    call_after_return();
+}
diff --git a/tests/sksl/errors/UseWithoutInitializeArrayIndex.glsl b/tests/sksl/errors/UseWithoutInitializeArrayIndex.glsl
index 6af751d..8b13789 100644
--- a/tests/sksl/errors/UseWithoutInitializeArrayIndex.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeArrayIndex.glsl
@@ -1,4 +1 @@
-### Compilation failed:
 
-error: 1: 'i' has not been assigned
-1 error
diff --git a/tests/sksl/errors/UseWithoutInitializeBinaryExpr.glsl b/tests/sksl/errors/UseWithoutInitializeBinaryExpr.glsl
index 236c2d1..8b13789 100644
--- a/tests/sksl/errors/UseWithoutInitializeBinaryExpr.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeBinaryExpr.glsl
@@ -1,4 +1 @@
-### Compilation failed:
 
-error: 1: 'x' has not been assigned
-1 error
diff --git a/tests/sksl/errors/UseWithoutInitializeDeadIf.glsl b/tests/sksl/errors/UseWithoutInitializeDeadIf.glsl
index 236c2d1..8b13789 100644
--- a/tests/sksl/errors/UseWithoutInitializeDeadIf.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeDeadIf.glsl
@@ -1,4 +1 @@
-### Compilation failed:
 
-error: 1: 'x' has not been assigned
-1 error
diff --git a/tests/sksl/errors/UseWithoutInitializeDeadSwitch.glsl b/tests/sksl/errors/UseWithoutInitializeDeadSwitch.glsl
index 237662d..605641e 100644
--- a/tests/sksl/errors/UseWithoutInitializeDeadSwitch.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeDeadSwitch.glsl
@@ -1,4 +1,2 @@
-### Compilation failed:
 
-error: 7: 'x' has not been assigned
-1 error
+out vec4 sk_FragColor;
diff --git a/tests/sksl/errors/UseWithoutInitializeReturnValue.glsl b/tests/sksl/errors/UseWithoutInitializeReturnValue.glsl
index 805a53f..8b13789 100644
--- a/tests/sksl/errors/UseWithoutInitializeReturnValue.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeReturnValue.glsl
@@ -1,4 +1 @@
-### Compilation failed:
 
-error: 1: 'r' has not been assigned
-1 error
diff --git a/tests/sksl/errors/UseWithoutInitializeVarDecl.glsl b/tests/sksl/errors/UseWithoutInitializeVarDecl.glsl
index 236c2d1..8b13789 100644
--- a/tests/sksl/errors/UseWithoutInitializeVarDecl.glsl
+++ b/tests/sksl/errors/UseWithoutInitializeVarDecl.glsl
@@ -1,4 +1 @@
-### Compilation failed:
 
-error: 1: 'x' has not been assigned
-1 error
diff --git a/tests/sksl/folding/AssignmentOps.glsl b/tests/sksl/folding/AssignmentOps.glsl
index 5571a81..eb65ad7 100644
--- a/tests/sksl/folding/AssignmentOps.glsl
+++ b/tests/sksl/folding/AssignmentOps.glsl
@@ -5,26 +5,26 @@
 vec4 main() {
     bool ok = true;
     int a = 1;
-    a = 2;
+    a = a + a;
     a += a;
     a = a + a;
     a += a;
     a = a + a;
-    ok = a == 32;
+    ok = ok && a == 32;
     int b = 10;
-    b = 8;
+    b = b - 2;
     b -= 2;
     b = b - 1;
     b -= 3;
     ok = ok && b == 2;
     int c = 2;
-    c = 4;
+    c = c * c;
     c *= c;
     c = c * 4;
     c *= 2;
     ok = ok && c == 128;
     int d = 256;
-    d = 128;
+    d = d / 2;
     d /= 2;
     d = d / 4;
     d /= 4;
diff --git a/tests/sksl/folding/BoolFolding.glsl b/tests/sksl/folding/BoolFolding.glsl
index f3e0c2e..3e0a60f 100644
--- a/tests/sksl/folding/BoolFolding.glsl
+++ b/tests/sksl/folding/BoolFolding.glsl
@@ -3,6 +3,16 @@
 uniform vec4 colorRed;
 uniform vec4 colorGreen;
 vec4 main() {
-    return colorGreen;
+    bool _0_a = true;
+    bool _1_b = false;
+    bool _2_c = true;
+    bool _3_d = false;
+    bool _4_e = true;
+    bool _5_f = false;
+    bool _6_g = true;
+    bool _7_h = false;
+    bool _8_i = true;
+    bool _9_j = false;
+    return ((((((((_0_a && !_1_b) && _2_c) && !_3_d) && _4_e) && !_5_f) && _6_g) && !_7_h) && _8_i) && !_9_j ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/folding/FloatFolding.glsl b/tests/sksl/folding/FloatFolding.glsl
index 4b5c4e3..3922be7 100644
--- a/tests/sksl/folding/FloatFolding.glsl
+++ b/tests/sksl/folding/FloatFolding.glsl
@@ -5,55 +5,58 @@
 vec4 main() {
     bool _0_ok = true;
     float _1_x = 34.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 34.0;
     _1_x = 30.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 30.0;
     _1_x = 64.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 64.0;
     _1_x = 16.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 16.0;
     _1_x = 19.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 19.0;
     _1_x = 1.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 1.0;
     _1_x = -2.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -2.0;
     _1_x = 3.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 3.0;
     _1_x = -4.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -4.0;
     _1_x = 5.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 5.0;
     _1_x = -6.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -6.0;
     _1_x = 7.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 7.0;
     _1_x = -8.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -8.0;
     _1_x = 9.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 9.0;
     _1_x = -10.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -10.0;
     _1_x = 11.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == 11.0;
     _1_x = -12.0;
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == -12.0;
     float _2_unknown = sqrt(4.0);
     _1_x = _2_unknown;
-    _0_ok = _1_x == _2_unknown;
+    _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = _2_unknown;
     _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = _2_unknown;
     _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = 0.0;
+    _0_ok = _0_ok && _1_x == 0.0;
     _1_x = _2_unknown;
     _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = _2_unknown;
     _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = 0.0;
+    _0_ok = _0_ok && _1_x == 0.0;
     _1_x = _2_unknown;
     _0_ok = _0_ok && _1_x == _2_unknown;
     _1_x = 0.0;
+    _0_ok = _0_ok && _1_x == 0.0;
     _1_x += 1.0;
     _0_ok = _0_ok && _1_x == 1.0;
     _0_ok = _0_ok && _1_x == 1.0;
diff --git a/tests/sksl/folding/IntFoldingES2.glsl b/tests/sksl/folding/IntFoldingES2.glsl
index 8d6c0c3..65d88b3 100644
--- a/tests/sksl/folding/IntFoldingES2.glsl
+++ b/tests/sksl/folding/IntFoldingES2.glsl
@@ -7,52 +7,55 @@
     int _0_unknown = int(unknownInput);
     bool _1_ok = true;
     int _2_x = 34;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 34;
     _2_x = 30;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 30;
     _2_x = 64;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 64;
     _2_x = 16;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 16;
     _2_x = 1;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 1;
     _2_x = -2;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -2;
     _2_x = 3;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 3;
     _2_x = -4;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -4;
     _2_x = 5;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 5;
     _2_x = -6;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -6;
     _2_x = 7;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 7;
     _2_x = -8;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -8;
     _2_x = 9;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 9;
     _2_x = -10;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -10;
     _2_x = 11;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == 11;
     _2_x = -12;
-    _1_ok = true;
+    _1_ok = _1_ok && _2_x == -12;
     _2_x = _0_unknown;
-    _1_ok = _2_x == _0_unknown;
+    _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = _0_unknown;
     _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = _0_unknown;
     _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = 0;
+    _1_ok = _1_ok && _2_x == 0;
     _2_x = _0_unknown;
     _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = _0_unknown;
     _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = 0;
+    _1_ok = _1_ok && _2_x == 0;
     _2_x = _0_unknown;
     _1_ok = _1_ok && _2_x == _0_unknown;
     _2_x = 0;
+    _1_ok = _1_ok && _2_x == 0;
     _2_x += 1;
     _1_ok = _1_ok && _2_x == 1;
     _1_ok = _1_ok && _2_x == 1;
diff --git a/tests/sksl/folding/IntFoldingES3.glsl b/tests/sksl/folding/IntFoldingES3.glsl
index f3e0c2e..cf65913 100644
--- a/tests/sksl/folding/IntFoldingES3.glsl
+++ b/tests/sksl/folding/IntFoldingES3.glsl
@@ -3,6 +3,21 @@
 uniform vec4 colorRed;
 uniform vec4 colorGreen;
 vec4 main() {
-    return colorGreen;
+    bool _0_ok = true;
+    int _1_x = 14;
+    _0_ok = _0_ok && _1_x == 14;
+    _1_x = 6;
+    _0_ok = _0_ok && _1_x == 6;
+    _1_x = 5;
+    _0_ok = _0_ok && _1_x == 5;
+    _1_x = 16;
+    _0_ok = _0_ok && _1_x == 16;
+    _1_x = -8;
+    _0_ok = _0_ok && _1_x == -8;
+    _1_x = 32;
+    _0_ok = _0_ok && _1_x == 32;
+    _1_x = 33;
+    _0_ok = _0_ok && _1_x == 33;
+    return _0_ok ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/folding/MatrixFoldingES2.glsl b/tests/sksl/folding/MatrixFoldingES2.glsl
index f3e0c2e..7e56e78 100644
--- a/tests/sksl/folding/MatrixFoldingES2.glsl
+++ b/tests/sksl/folding/MatrixFoldingES2.glsl
@@ -3,6 +3,7 @@
 uniform vec4 colorRed;
 uniform vec4 colorGreen;
 vec4 main() {
-    return colorGreen;
+    bool _0_ok = true;
+    return _0_ok ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/folding/MatrixFoldingES3.glsl b/tests/sksl/folding/MatrixFoldingES3.glsl
index f3e0c2e..7e56e78 100644
--- a/tests/sksl/folding/MatrixFoldingES3.glsl
+++ b/tests/sksl/folding/MatrixFoldingES3.glsl
@@ -3,6 +3,7 @@
 uniform vec4 colorRed;
 uniform vec4 colorGreen;
 vec4 main() {
-    return colorGreen;
+    bool _0_ok = true;
+    return _0_ok ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/folding/SelfAssignment.glsl b/tests/sksl/folding/SelfAssignment.glsl
index 2ea70dd..371bf94 100644
--- a/tests/sksl/folding/SelfAssignment.glsl
+++ b/tests/sksl/folding/SelfAssignment.glsl
@@ -8,7 +8,7 @@
 };
 vec4 main() {
     vec4 x = vec4(3.0, 2.0, 1.0, 0.0);
-    x.xyz = vec3(1.0, 2.0, 3.0);
+    x.xyz = x.zyx;
     S s;
     s.i = 2.0;
     s.j = 2.0;
diff --git a/tests/sksl/folding/VectorScalarFolding.glsl b/tests/sksl/folding/VectorScalarFolding.glsl
index 1c1afcc..8ee4217 100644
--- a/tests/sksl/folding/VectorScalarFolding.glsl
+++ b/tests/sksl/folding/VectorScalarFolding.glsl
@@ -6,30 +6,38 @@
 bool test_int() {
     bool ok = true;
     ivec4 x = ivec4(6, 6, 7, 8);
-    ok = true;
+    ok = ok && x == ivec4(6, 6, 7, 8);
     x = ivec4(7, 9, 9, 9);
-    ok = true;
+    ok = ok && x == ivec4(7, 9, 9, 9);
     x = ivec4(9, 9, 10, 10);
-    ok = true;
+    ok = ok && x == ivec4(9, 9, 10, 10);
     x.xyz = ivec3(6, 6, 6);
-    ok = x == ivec4(6, 6, 6, 10);
+    ok = ok && x == ivec4(6, 6, 6, 10);
     x.xy = ivec2(3, 3);
     ok = ok && x == ivec4(3, 3, 6, 10);
     x = ivec4(6, 6, 6, 6);
+    ok = ok && x == ivec4(6);
     x = ivec4(6, 6, 7, 8);
+    ok = ok && x == ivec4(6, 6, 7, 8);
     x = ivec4(-7, -9, -9, -9);
+    ok = ok && x == ivec4(-7, -9, -9, -9);
     x = ivec4(9, 9, 10, 10);
+    ok = ok && x == ivec4(9, 9, 10, 10);
     x.xyz = ivec3(6, 6, 6);
     ok = ok && x == ivec4(6, 6, 6, 10);
     x.xy = ivec2(8, 8);
     ok = ok && x == ivec4(8, 8, 6, 10);
     x = ivec4(200, 100, 50, 25);
+    ok = ok && x == ivec4(200, 100, 50, 25);
     x = ivec4(6, 6, 6, 6);
+    ok = ok && x == ivec4(6);
     int unknown = int(unknownInput);
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(0);
+    ok = ok && x == ivec4(0);
     x = ivec4(0);
+    ok = ok && x == ivec4(0);
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(unknown);
@@ -43,12 +51,15 @@
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(0);
+    ok = ok && x == ivec4(0);
     x = ivec4(0);
+    ok = ok && x == ivec4(0);
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(0);
+    ok = ok && x == ivec4(0);
     x = ivec4(unknown);
     ok = ok && x == ivec4(unknown);
     x = ivec4(unknown);
@@ -66,30 +77,38 @@
 vec4 main() {
     bool _0_ok = true;
     vec4 _1_x = vec4(6.0, 6.0, 7.0, 8.0);
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == vec4(6.0, 6.0, 7.0, 8.0);
     _1_x = vec4(7.0, 9.0, 9.0, 9.0);
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == vec4(7.0, 9.0, 9.0, 9.0);
     _1_x = vec4(9.0, 9.0, 10.0, 10.0);
-    _0_ok = true;
+    _0_ok = _0_ok && _1_x == vec4(9.0, 9.0, 10.0, 10.0);
     _1_x.xyz = vec3(6.0, 6.0, 6.0);
-    _0_ok = _1_x == vec4(6.0, 6.0, 6.0, 10.0);
+    _0_ok = _0_ok && _1_x == vec4(6.0, 6.0, 6.0, 10.0);
     _1_x.xy = vec2(3.0, 3.0);
     _0_ok = _0_ok && _1_x == vec4(3.0, 3.0, 6.0, 10.0);
     _1_x = vec4(6.0, 6.0, 6.0, 6.0);
+    _0_ok = _0_ok && _1_x == vec4(6.0);
     _1_x = vec4(6.0, 6.0, 7.0, 8.0);
+    _0_ok = _0_ok && _1_x == vec4(6.0, 6.0, 7.0, 8.0);
     _1_x = vec4(-7.0, -9.0, -9.0, -9.0);
+    _0_ok = _0_ok && _1_x == vec4(-7.0, -9.0, -9.0, -9.0);
     _1_x = vec4(9.0, 9.0, 10.0, 10.0);
+    _0_ok = _0_ok && _1_x == vec4(9.0, 9.0, 10.0, 10.0);
     _1_x.xyz = vec3(6.0, 6.0, 6.0);
     _0_ok = _0_ok && _1_x == vec4(6.0, 6.0, 6.0, 10.0);
     _1_x.xy = vec2(8.0, 8.0);
     _0_ok = _0_ok && _1_x == vec4(8.0, 8.0, 6.0, 10.0);
     _1_x = vec4(2.0, 1.0, 0.5, 0.25);
+    _0_ok = _0_ok && _1_x == vec4(2.0, 1.0, 0.5, 0.25);
     _1_x = vec4(6.0, 6.0, 6.0, 6.0);
+    _0_ok = _0_ok && _1_x == vec4(6.0);
     float _2_unknown = unknownInput;
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(0.0);
+    _0_ok = _0_ok && _1_x == vec4(0.0);
     _1_x = vec4(0.0);
+    _0_ok = _0_ok && _1_x == vec4(0.0);
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(_2_unknown);
@@ -103,12 +122,15 @@
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(0.0);
+    _0_ok = _0_ok && _1_x == vec4(0.0);
     _1_x = vec4(0.0);
+    _0_ok = _0_ok && _1_x == vec4(0.0);
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(0.0);
+    _0_ok = _0_ok && _1_x == vec4(0.0);
     _1_x = vec4(_2_unknown);
     _0_ok = _0_ok && _1_x == vec4(_2_unknown);
     _1_x = vec4(_2_unknown);
diff --git a/tests/sksl/folding/VectorVectorFolding.glsl b/tests/sksl/folding/VectorVectorFolding.glsl
index 8322e8f..42b7012 100644
--- a/tests/sksl/folding/VectorVectorFolding.glsl
+++ b/tests/sksl/folding/VectorVectorFolding.glsl
@@ -6,7 +6,7 @@
 bool test_int() {
     int unknown = int(unknownInput);
     bool ok = true;
-    ok = ivec4(unknown) == ivec4(unknown);
+    ok = ok && ivec4(unknown) == ivec4(unknown);
     ok = ok && ivec4(unknown) == ivec4(unknown);
     ok = ok && ivec4(unknown) == ivec4(unknown);
     ok = ok && ivec4(unknown) == ivec4(unknown);
@@ -27,7 +27,7 @@
 vec4 main() {
     float _0_unknown = unknownInput;
     bool _1_ok = true;
-    _1_ok = vec4(_0_unknown) == vec4(_0_unknown);
+    _1_ok = _1_ok && vec4(_0_unknown) == vec4(_0_unknown);
     _1_ok = _1_ok && vec4(_0_unknown) == vec4(_0_unknown);
     _1_ok = _1_ok && vec4(_0_unknown) == vec4(_0_unknown);
     _1_ok = _1_ok && vec4(_0_unknown) == vec4(_0_unknown);
diff --git a/tests/sksl/inliner/EnumsCanBeInlinedSafely.glsl b/tests/sksl/inliner/EnumsCanBeInlinedSafely.glsl
index ff6091a..8df1ec6 100644
--- a/tests/sksl/inliner/EnumsCanBeInlinedSafely.glsl
+++ b/tests/sksl/inliner/EnumsCanBeInlinedSafely.glsl
@@ -2,6 +2,32 @@
 out vec4 sk_FragColor;
 vec4 helper();
 void main() {
-    sk_FragColor = vec4(0.5, 0.5, 0.5, 1.0);
+    vec4 _0_helper;
+    for (int _1_loop = 0;_1_loop < 1; _1_loop++) {
+        int _2_temp = 1;
+        switch (_2_temp) {
+            case 0:
+                {
+                    _0_helper = vec4(0.0, 0.0, 0.0, 1.0);
+                    continue;
+                }
+            case 1:
+                {
+                    _0_helper = vec4(0.5, 0.5, 0.5, 1.0);
+                    continue;
+                }
+            case 2:
+                {
+                    _0_helper = vec4(1.0);
+                    continue;
+                }
+            default:
+                {
+                    _0_helper = vec4(1.0, 0.0, 0.0, 1.0);
+                    continue;
+                }
+        }
+    }
+    sk_FragColor = _0_helper;
 
 }
diff --git a/tests/sksl/inliner/ExponentialGrowth.glsl b/tests/sksl/inliner/ExponentialGrowth.glsl
index fc4cbe1..225881b 100644
--- a/tests/sksl/inliner/ExponentialGrowth.glsl
+++ b/tests/sksl/inliner/ExponentialGrowth.glsl
@@ -202,6 +202,7 @@
 
 
 
+    false;
 
     sk_FragColor.x = 0.0;
 
@@ -404,6 +405,7 @@
 
 
 
+    false;
 
     sk_FragColor.x = 0.0;
 
@@ -606,6 +608,7 @@
 
 
 
+    false;
 
 }
 void fn7() {
@@ -1215,6 +1218,7 @@
 
 
 
+    false;
 
     fn6();
     fn6();
diff --git a/tests/sksl/inliner/ExponentialGrowthStandaloneSettings.glsl b/tests/sksl/inliner/ExponentialGrowthStandaloneSettings.glsl
index fc4cbe1..225881b 100644
--- a/tests/sksl/inliner/ExponentialGrowthStandaloneSettings.glsl
+++ b/tests/sksl/inliner/ExponentialGrowthStandaloneSettings.glsl
@@ -202,6 +202,7 @@
 
 
 
+    false;
 
     sk_FragColor.x = 0.0;
 
@@ -404,6 +405,7 @@
 
 
 
+    false;
 
     sk_FragColor.x = 0.0;
 
@@ -606,6 +608,7 @@
 
 
 
+    false;
 
 }
 void fn7() {
@@ -1215,6 +1218,7 @@
 
 
 
+    false;
 
     fn6();
     fn6();
diff --git a/tests/sksl/inliner/InlineKeywordOverridesThreshold.glsl b/tests/sksl/inliner/InlineKeywordOverridesThreshold.glsl
index d7da8f9..0b4ef33 100644
--- a/tests/sksl/inliner/InlineKeywordOverridesThreshold.glsl
+++ b/tests/sksl/inliner/InlineKeywordOverridesThreshold.glsl
@@ -35,6 +35,7 @@
     ++y;
     ++y;
     ++y;
+    false;
 
     ++y;
     ++y;
@@ -70,5 +71,6 @@
     ++y;
     ++y;
     ++y;
+    false;
 
 }
diff --git a/tests/sksl/inliner/InlineWithInoutArgument.glsl b/tests/sksl/inliner/InlineWithInoutArgument.glsl
index 5c89479..774cab3 100644
--- a/tests/sksl/inliner/InlineWithInoutArgument.glsl
+++ b/tests/sksl/inliner/InlineWithInoutArgument.glsl
@@ -3,6 +3,7 @@
 void main() {
     float x = 1.0;
     x *= 2.0;
+    false;
 
     sk_FragColor.x = x;
 }
diff --git a/tests/sksl/inliner/InlineWithNestedBigCalls.glsl b/tests/sksl/inliner/InlineWithNestedBigCalls.glsl
index 4ad4f59..19ff37c 100644
--- a/tests/sksl/inliner/InlineWithNestedBigCalls.glsl
+++ b/tests/sksl/inliner/InlineWithNestedBigCalls.glsl
@@ -38,7 +38,7 @@
     --_0_x;
     --_0_x;
     _0_x = 456.0;
-    float _1_x = 456.0;
+    float _1_x = _0_x;
     ++_1_x;
     ++_1_x;
     ++_1_x;
@@ -74,7 +74,7 @@
     --_1_x;
     --_1_x;
     _1_x = 123.0;
-    sk_FragColor = vec4(123.0);
+    sk_FragColor = vec4(_1_x);
 
 
 }
diff --git a/tests/sksl/inliner/InlineWithNestedCalls.glsl b/tests/sksl/inliner/InlineWithNestedCalls.glsl
index 40d516d..94d4b4c 100644
--- a/tests/sksl/inliner/InlineWithNestedCalls.glsl
+++ b/tests/sksl/inliner/InlineWithNestedCalls.glsl
@@ -1,7 +1,9 @@
 
 out vec4 sk_FragColor;
 void main() {
-    float _0_y = 0.0;
+    float _1_y = 123.0;
+    float z = 0.0;
+    float _0_y = z;
     ++_0_y;
     ++_0_y;
     ++_0_y;
@@ -38,6 +40,7 @@
     --_0_y;
     _0_y = 42.0;
 
+    _0_y;
 
-    sk_FragColor.x = 0.0;
+    sk_FragColor.x = z;
 }
diff --git a/tests/sksl/inliner/InlineWithUnmodifiedArgument.glsl b/tests/sksl/inliner/InlineWithUnmodifiedArgument.glsl
index 20b4e9c..1e7e5d6 100644
--- a/tests/sksl/inliner/InlineWithUnmodifiedArgument.glsl
+++ b/tests/sksl/inliner/InlineWithUnmodifiedArgument.glsl
@@ -3,6 +3,7 @@
 void main() {
     sk_FragColor.x = 2.0;
 
-    sk_FragColor.y = 4.0;
+    float y = 2.0;
+    sk_FragColor.y = y * 2.0;
 
 }
diff --git a/tests/sksl/inliner/InlinerHonorsGLSLOutParamSemantics.glsl b/tests/sksl/inliner/InlinerHonorsGLSLOutParamSemantics.glsl
index 172af3b..ee79d41 100644
--- a/tests/sksl/inliner/InlinerHonorsGLSLOutParamSemantics.glsl
+++ b/tests/sksl/inliner/InlinerHonorsGLSLOutParamSemantics.glsl
@@ -3,6 +3,9 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return colorRed;
+    float x = 0.0;
+    x = 1.0;
+    x = 2.0;
+    return x == 1.0 && x == 2.0 ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/inliner/SwizzleCanBeInlinedDirectly.glsl b/tests/sksl/inliner/SwizzleCanBeInlinedDirectly.glsl
index 4bd1a03..d425a35 100644
--- a/tests/sksl/inliner/SwizzleCanBeInlinedDirectly.glsl
+++ b/tests/sksl/inliner/SwizzleCanBeInlinedDirectly.glsl
@@ -7,6 +7,7 @@
     sk_FragColor = color.yzyx;
 
     color = color.wzyx;
+    false;
 
     sk_FragColor = color;
 }
diff --git a/tests/sksl/inliner/TrivialArgumentsInlineDirectly.glsl b/tests/sksl/inliner/TrivialArgumentsInlineDirectly.glsl
index 96479ba..9b6ce17 100644
--- a/tests/sksl/inliner/TrivialArgumentsInlineDirectly.glsl
+++ b/tests/sksl/inliner/TrivialArgumentsInlineDirectly.glsl
@@ -19,42 +19,59 @@
     S as[1];
     as[0].ah4[0] = vec4(val);
     sk_FragColor = sk_FragColor.xxxx;
+    false;
 
     sk_FragColor = vec4(s.h);
+    false;
 
     sk_FragColor = b ? sk_FragColor.xxxx : sk_FragColor.yyyy;
+    false;
 
     sk_FragColor = s.ah4[0].ywyw;
+    false;
 
     sk_FragColor = as[0].ah4[0].xyxy;
+    false;
 
     sk_FragColor = s.h4.zzzz;
+    false;
 
     sk_FragColor = uh4.xyzx;
+    false;
 
     sk_FragColor = vec4(s.h);
+    false;
 
     sk_FragColor = vec4(s.h);
+    false;
 
     sk_FragColor = s.ah4[0].xxxy;
+    false;
 
     sk_FragColor = uh4;
+    false;
 
     sk_FragColor = sk_FragColor.yyyy;
+    false;
 
     float _0_h = -s.h;
     sk_FragColor = vec4(_0_h);
+    false;
 
     bool _1_b = !b;
     sk_FragColor = _1_b ? sk_FragColor.xxxx : sk_FragColor.yyyy;
+    false;
 
     vec2 _2_h2 = s.ah4[ui].yw;
     sk_FragColor = _2_h2.xyxy;
+    false;
 
     vec3 _3_h3 = s.h4.yyy + s.h4.zzz;
     sk_FragColor = _3_h3.xyzx;
+    false;
 
     vec4 _4_h4 = vec4(s.h4.y, 0.0, 0.0, 1.0);
     sk_FragColor = _4_h4;
+    false;
 
 }
diff --git a/tests/sksl/intrinsics/AbsFloat.asm.frag b/tests/sksl/intrinsics/AbsFloat.asm.frag
index e79d000..c763c35 100644
--- a/tests/sksl/intrinsics/AbsFloat.asm.frag
+++ b/tests/sksl/intrinsics/AbsFloat.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expected "expected"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,13 +26,17 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
-OpDecorate %74 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,23 +50,21 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_1_25 = OpConstant %float 1.25
+%float_0 = OpConstant %float 0
+%float_0_75 = OpConstant %float 0.75
+%float_2_25 = OpConstant %float 2.25
+%26 = OpConstantComposite %v4float %float_1_25 %float_0 %float_0_75 %float_2_25
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_1_25 = OpConstant %float 1.25
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%38 = OpConstantComposite %v2float %float_1_25 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%float_0_75 = OpConstant %float 0.75
-%51 = OpConstantComposite %v3float %float_1_25 %float_0 %float_0_75
 %v3bool = OpTypeVector %bool 3
-%float_2_25 = OpConstant %float 2.25
-%62 = OpConstantComposite %v4float %float_1_25 %float_0 %float_0_75 %float_2_25
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -72,60 +75,69 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%67 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 FAbs %27
-%29 = OpFOrdEqual %bool %21 %float_1_25
-OpSelectionMerge %31 None
-OpBranchConditional %29 %30 %31
-%30 = OpLabel
-%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%34 = OpLoad %v4float %33
-%35 = OpVectorShuffle %v2float %34 %34 0 1
-%32 = OpExtInst %v2float %1 FAbs %35
-%39 = OpFOrdEqual %v2bool %32 %38
-%41 = OpAll %bool %39
-OpBranch %31
-%31 = OpLabel
-%42 = OpPhi %bool %false %19 %41 %30
-OpSelectionMerge %44 None
-OpBranchConditional %42 %43 %44
-%43 = OpLabel
-%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%47 = OpLoad %v4float %46
-%48 = OpVectorShuffle %v3float %47 %47 0 1 2
-%45 = OpExtInst %v3float %1 FAbs %48
-%52 = OpFOrdEqual %v3bool %45 %51
-%54 = OpAll %bool %52
-OpBranch %44
-%44 = OpLabel
-%55 = OpPhi %bool %false %31 %54 %43
-OpSelectionMerge %57 None
-OpBranchConditional %55 %56 %57
-%56 = OpLabel
-%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%60 = OpLoad %v4float %59
-%58 = OpExtInst %v4float %1 FAbs %60
-%63 = OpFOrdEqual %v4bool %58 %62
-%65 = OpAll %bool %63
-OpBranch %57
-%57 = OpLabel
-%66 = OpPhi %bool %false %44 %65 %56
-OpSelectionMerge %71 None
-OpBranchConditional %66 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%74 = OpLoad %v4float %72
-OpStore %67 %74
-OpBranch %71
-%70 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%77 = OpLoad %v4float %75
-OpStore %67 %77
-OpBranch %71
-%71 = OpLabel
-%78 = OpLoad %v4float %67
-OpReturnValue %78
+%expected = OpVariable %_ptr_Function_v4float Function
+%74 = OpVariable %_ptr_Function_v4float Function
+OpStore %expected %26
+%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %29
+%34 = OpCompositeExtract %float %33 0
+%28 = OpExtInst %float %1 FAbs %34
+%35 = OpLoad %v4float %expected
+%36 = OpCompositeExtract %float %35 0
+%37 = OpFOrdEqual %bool %28 %36
+OpSelectionMerge %39 None
+OpBranchConditional %37 %38 %39
+%38 = OpLabel
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpVectorShuffle %v2float %42 %42 0 1
+%40 = OpExtInst %v2float %1 FAbs %43
+%45 = OpLoad %v4float %expected
+%46 = OpVectorShuffle %v2float %45 %45 0 1
+%47 = OpFOrdEqual %v2bool %40 %46
+%49 = OpAll %bool %47
+OpBranch %39
+%39 = OpLabel
+%50 = OpPhi %bool %false %19 %49 %38
+OpSelectionMerge %52 None
+OpBranchConditional %50 %51 %52
+%51 = OpLabel
+%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%55 = OpLoad %v4float %54
+%56 = OpVectorShuffle %v3float %55 %55 0 1 2
+%53 = OpExtInst %v3float %1 FAbs %56
+%58 = OpLoad %v4float %expected
+%59 = OpVectorShuffle %v3float %58 %58 0 1 2
+%60 = OpFOrdEqual %v3bool %53 %59
+%62 = OpAll %bool %60
+OpBranch %52
+%52 = OpLabel
+%63 = OpPhi %bool %false %39 %62 %51
+OpSelectionMerge %65 None
+OpBranchConditional %63 %64 %65
+%64 = OpLabel
+%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpLoad %v4float %67
+%66 = OpExtInst %v4float %1 FAbs %68
+%69 = OpLoad %v4float %expected
+%70 = OpFOrdEqual %v4bool %66 %69
+%72 = OpAll %bool %70
+OpBranch %65
+%65 = OpLabel
+%73 = OpPhi %bool %false %52 %72 %64
+OpSelectionMerge %77 None
+OpBranchConditional %73 %75 %76
+%75 = OpLabel
+%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%80 = OpLoad %v4float %78
+OpStore %74 %80
+OpBranch %77
+%76 = OpLabel
+%81 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%83 = OpLoad %v4float %81
+OpStore %74 %83
+OpBranch %77
+%77 = OpLabel
+%84 = OpLoad %v4float %74
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/AbsFloat.glsl b/tests/sksl/intrinsics/AbsFloat.glsl
index f469adc..d8ebb3f 100644
--- a/tests/sksl/intrinsics/AbsFloat.glsl
+++ b/tests/sksl/intrinsics/AbsFloat.glsl
@@ -4,5 +4,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((abs(testInputs.x) == 1.25 && abs(testInputs.xy) == vec2(1.25, 0.0)) && abs(testInputs.xyz) == vec3(1.25, 0.0, 0.75)) && abs(testInputs) == vec4(1.25, 0.0, 0.75, 2.25) ? colorGreen : colorRed;
+    vec4 expected = vec4(1.25, 0.0, 0.75, 2.25);
+    return ((abs(testInputs.x) == expected.x && abs(testInputs.xy) == expected.xy) && abs(testInputs.xyz) == expected.xyz) && abs(testInputs) == expected ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/AbsFloat.metal b/tests/sksl/intrinsics/AbsFloat.metal
index ca4b2d4..414b690 100644
--- a/tests/sksl/intrinsics/AbsFloat.metal
+++ b/tests/sksl/intrinsics/AbsFloat.metal
@@ -17,6 +17,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((abs(_uniforms.testInputs.x) == 1.25 && all(abs(_uniforms.testInputs.xy) == float2(1.25, 0.0))) && all(abs(_uniforms.testInputs.xyz) == float3(1.25, 0.0, 0.75))) && all(abs(_uniforms.testInputs) == float4(1.25, 0.0, 0.75, 2.25)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expected = float4(1.25, 0.0, 0.75, 2.25);
+    _out.sk_FragColor = ((abs(_uniforms.testInputs.x) == expected.x && all(abs(_uniforms.testInputs.xy) == expected.xy)) && all(abs(_uniforms.testInputs.xyz) == expected.xyz)) && all(abs(_uniforms.testInputs) == expected) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/AbsInt.asm.frag b/tests/sksl/intrinsics/AbsInt.asm.frag
index 4bd0401..09d62a1 100644
--- a/tests/sksl/intrinsics/AbsInt.asm.frag
+++ b/tests/sksl/intrinsics/AbsInt.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expected "expected"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,13 +26,13 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %35 RelaxedPrecision
-OpDecorate %53 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
+OpDecorate %106 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,22 +46,21 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%int = OpTypeInt 32 1
+%v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+%int_1 = OpConstant %int 1
+%int_0 = OpConstant %int 0
+%int_2 = OpConstant %int 2
+%27 = OpConstantComposite %v4int %int_1 %int_0 %int_0 %int_2
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%int = OpTypeInt 32 1
-%int_0 = OpConstant %int 0
-%int_1 = OpConstant %int 1
 %v2float = OpTypeVector %float 2
 %v2int = OpTypeVector %int 2
-%44 = OpConstantComposite %v2int %int_1 %int_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
 %v3int = OpTypeVector %int 3
-%64 = OpConstantComposite %v3int %int_1 %int_0 %int_0
 %v3bool = OpTypeVector %bool 3
-%v4int = OpTypeVector %int 4
-%int_2 = OpConstant %int 2
-%85 = OpConstantComposite %v4int %int_1 %int_0 %int_0 %int_2
 %v4bool = OpTypeVector %bool 4
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %_entrypoint = OpFunction %void None %15
@@ -71,82 +71,91 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%90 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%28 = OpConvertFToS %int %27
-%21 = OpExtInst %int %1 SAbs %28
-%30 = OpIEqual %bool %21 %int_1
-OpSelectionMerge %32 None
-OpBranchConditional %30 %31 %32
-%31 = OpLabel
-%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%35 = OpLoad %v4float %34
-%36 = OpVectorShuffle %v2float %35 %35 0 1
-%38 = OpCompositeExtract %float %36 0
-%39 = OpConvertFToS %int %38
-%40 = OpCompositeExtract %float %36 1
-%41 = OpConvertFToS %int %40
-%42 = OpCompositeConstruct %v2int %39 %41
-%33 = OpExtInst %v2int %1 SAbs %42
-%45 = OpIEqual %v2bool %33 %44
-%47 = OpAll %bool %45
-OpBranch %32
-%32 = OpLabel
-%48 = OpPhi %bool %false %19 %47 %31
-OpSelectionMerge %50 None
-OpBranchConditional %48 %49 %50
-%49 = OpLabel
-%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%53 = OpLoad %v4float %52
-%54 = OpVectorShuffle %v3float %53 %53 0 1 2
-%56 = OpCompositeExtract %float %54 0
-%57 = OpConvertFToS %int %56
-%58 = OpCompositeExtract %float %54 1
-%59 = OpConvertFToS %int %58
-%60 = OpCompositeExtract %float %54 2
-%61 = OpConvertFToS %int %60
-%62 = OpCompositeConstruct %v3int %57 %59 %61
-%51 = OpExtInst %v3int %1 SAbs %62
-%65 = OpIEqual %v3bool %51 %64
-%67 = OpAll %bool %65
-OpBranch %50
-%50 = OpLabel
-%68 = OpPhi %bool %false %32 %67 %49
-OpSelectionMerge %70 None
-OpBranchConditional %68 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%73 = OpLoad %v4float %72
-%74 = OpCompositeExtract %float %73 0
-%75 = OpConvertFToS %int %74
-%76 = OpCompositeExtract %float %73 1
-%77 = OpConvertFToS %int %76
-%78 = OpCompositeExtract %float %73 2
-%79 = OpConvertFToS %int %78
-%80 = OpCompositeExtract %float %73 3
-%81 = OpConvertFToS %int %80
-%82 = OpCompositeConstruct %v4int %75 %77 %79 %81
-%71 = OpExtInst %v4int %1 SAbs %82
-%86 = OpIEqual %v4bool %71 %85
-%88 = OpAll %bool %86
-OpBranch %70
-%70 = OpLabel
-%89 = OpPhi %bool %false %50 %88 %69
-OpSelectionMerge %94 None
-OpBranchConditional %89 %92 %93
-%92 = OpLabel
-%95 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%96 = OpLoad %v4float %95
-OpStore %90 %96
-OpBranch %94
-%93 = OpLabel
-%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%98 = OpLoad %v4float %97
-OpStore %90 %98
-OpBranch %94
-%94 = OpLabel
-%99 = OpLoad %v4float %90
-OpReturnValue %99
+%expected = OpVariable %_ptr_Function_v4int Function
+%97 = OpVariable %_ptr_Function_v4float Function
+OpStore %expected %27
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%32 = OpLoad %v4float %30
+%33 = OpCompositeExtract %float %32 0
+%34 = OpConvertFToS %int %33
+%29 = OpExtInst %int %1 SAbs %34
+%35 = OpLoad %v4int %expected
+%36 = OpCompositeExtract %int %35 0
+%37 = OpIEqual %bool %29 %36
+OpSelectionMerge %39 None
+OpBranchConditional %37 %38 %39
+%38 = OpLabel
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpVectorShuffle %v2float %42 %42 0 1
+%45 = OpCompositeExtract %float %43 0
+%46 = OpConvertFToS %int %45
+%47 = OpCompositeExtract %float %43 1
+%48 = OpConvertFToS %int %47
+%49 = OpCompositeConstruct %v2int %46 %48
+%40 = OpExtInst %v2int %1 SAbs %49
+%51 = OpLoad %v4int %expected
+%52 = OpVectorShuffle %v2int %51 %51 0 1
+%53 = OpIEqual %v2bool %40 %52
+%55 = OpAll %bool %53
+OpBranch %39
+%39 = OpLabel
+%56 = OpPhi %bool %false %19 %55 %38
+OpSelectionMerge %58 None
+OpBranchConditional %56 %57 %58
+%57 = OpLabel
+%60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%61 = OpLoad %v4float %60
+%62 = OpVectorShuffle %v3float %61 %61 0 1 2
+%64 = OpCompositeExtract %float %62 0
+%65 = OpConvertFToS %int %64
+%66 = OpCompositeExtract %float %62 1
+%67 = OpConvertFToS %int %66
+%68 = OpCompositeExtract %float %62 2
+%69 = OpConvertFToS %int %68
+%70 = OpCompositeConstruct %v3int %65 %67 %69
+%59 = OpExtInst %v3int %1 SAbs %70
+%72 = OpLoad %v4int %expected
+%73 = OpVectorShuffle %v3int %72 %72 0 1 2
+%74 = OpIEqual %v3bool %59 %73
+%76 = OpAll %bool %74
+OpBranch %58
+%58 = OpLabel
+%77 = OpPhi %bool %false %39 %76 %57
+OpSelectionMerge %79 None
+OpBranchConditional %77 %78 %79
+%78 = OpLabel
+%81 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%82 = OpLoad %v4float %81
+%83 = OpCompositeExtract %float %82 0
+%84 = OpConvertFToS %int %83
+%85 = OpCompositeExtract %float %82 1
+%86 = OpConvertFToS %int %85
+%87 = OpCompositeExtract %float %82 2
+%88 = OpConvertFToS %int %87
+%89 = OpCompositeExtract %float %82 3
+%90 = OpConvertFToS %int %89
+%91 = OpCompositeConstruct %v4int %84 %86 %88 %90
+%80 = OpExtInst %v4int %1 SAbs %91
+%92 = OpLoad %v4int %expected
+%93 = OpIEqual %v4bool %80 %92
+%95 = OpAll %bool %93
+OpBranch %79
+%79 = OpLabel
+%96 = OpPhi %bool %false %58 %95 %78
+OpSelectionMerge %101 None
+OpBranchConditional %96 %99 %100
+%99 = OpLabel
+%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%103 = OpLoad %v4float %102
+OpStore %97 %103
+OpBranch %101
+%100 = OpLabel
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%105 = OpLoad %v4float %104
+OpStore %97 %105
+OpBranch %101
+%101 = OpLabel
+%106 = OpLoad %v4float %97
+OpReturnValue %106
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/AbsInt.glsl b/tests/sksl/intrinsics/AbsInt.glsl
index 48289c9..b032933 100644
--- a/tests/sksl/intrinsics/AbsInt.glsl
+++ b/tests/sksl/intrinsics/AbsInt.glsl
@@ -4,5 +4,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((abs(int(testInputs.x)) == 1 && abs(ivec2(testInputs.xy)) == ivec2(1, 0)) && abs(ivec3(testInputs.xyz)) == ivec3(1, 0, 0)) && abs(ivec4(testInputs)) == ivec4(1, 0, 0, 2) ? colorGreen : colorRed;
+    ivec4 expected = ivec4(1, 0, 0, 2);
+    return ((abs(int(testInputs.x)) == expected.x && abs(ivec2(testInputs.xy)) == expected.xy) && abs(ivec3(testInputs.xyz)) == expected.xyz) && abs(ivec4(testInputs)) == expected ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/AbsInt.metal b/tests/sksl/intrinsics/AbsInt.metal
index 01182e8..b2e7fd4 100644
--- a/tests/sksl/intrinsics/AbsInt.metal
+++ b/tests/sksl/intrinsics/AbsInt.metal
@@ -17,6 +17,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((abs(int(_uniforms.testInputs.x)) == 1 && all(abs(int2(_uniforms.testInputs.xy)) == int2(1, 0))) && all(abs(int3(_uniforms.testInputs.xyz)) == int3(1, 0, 0))) && all(abs(int4(_uniforms.testInputs)) == int4(1, 0, 0, 2)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    int4 expected = int4(1, 0, 0, 2);
+    _out.sk_FragColor = ((abs(int(_uniforms.testInputs.x)) == expected.x && all(abs(int2(_uniforms.testInputs.xy)) == expected.xy)) && all(abs(int3(_uniforms.testInputs.xyz)) == expected.xyz)) && all(abs(int4(_uniforms.testInputs)) == expected) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Ceil.asm.frag b/tests/sksl/intrinsics/Ceil.asm.frag
index ab97776..e425ee8 100644
--- a/tests/sksl/intrinsics/Ceil.asm.frag
+++ b/tests/sksl/intrinsics/Ceil.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expected "expected"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,13 +26,17 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
-OpDecorate %74 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %78 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,23 +50,21 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_n1 = OpConstant %float -1
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
+%float_3 = OpConstant %float 3
+%26 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_3
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_n1 = OpConstant %float -1
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%38 = OpConstantComposite %v2float %float_n1 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%float_1 = OpConstant %float 1
-%51 = OpConstantComposite %v3float %float_n1 %float_0 %float_1
 %v3bool = OpTypeVector %bool 3
-%float_3 = OpConstant %float 3
-%62 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_3
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -72,60 +75,69 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%67 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 Ceil %27
-%29 = OpFOrdEqual %bool %21 %float_n1
-OpSelectionMerge %31 None
-OpBranchConditional %29 %30 %31
-%30 = OpLabel
-%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%34 = OpLoad %v4float %33
-%35 = OpVectorShuffle %v2float %34 %34 0 1
-%32 = OpExtInst %v2float %1 Ceil %35
-%39 = OpFOrdEqual %v2bool %32 %38
-%41 = OpAll %bool %39
-OpBranch %31
-%31 = OpLabel
-%42 = OpPhi %bool %false %19 %41 %30
-OpSelectionMerge %44 None
-OpBranchConditional %42 %43 %44
-%43 = OpLabel
-%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%47 = OpLoad %v4float %46
-%48 = OpVectorShuffle %v3float %47 %47 0 1 2
-%45 = OpExtInst %v3float %1 Ceil %48
-%52 = OpFOrdEqual %v3bool %45 %51
-%54 = OpAll %bool %52
-OpBranch %44
-%44 = OpLabel
-%55 = OpPhi %bool %false %31 %54 %43
-OpSelectionMerge %57 None
-OpBranchConditional %55 %56 %57
-%56 = OpLabel
-%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%60 = OpLoad %v4float %59
-%58 = OpExtInst %v4float %1 Ceil %60
-%63 = OpFOrdEqual %v4bool %58 %62
-%65 = OpAll %bool %63
-OpBranch %57
-%57 = OpLabel
-%66 = OpPhi %bool %false %44 %65 %56
-OpSelectionMerge %71 None
-OpBranchConditional %66 %69 %70
-%69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%74 = OpLoad %v4float %72
-OpStore %67 %74
-OpBranch %71
-%70 = OpLabel
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%77 = OpLoad %v4float %75
-OpStore %67 %77
-OpBranch %71
-%71 = OpLabel
-%78 = OpLoad %v4float %67
-OpReturnValue %78
+%expected = OpVariable %_ptr_Function_v4float Function
+%74 = OpVariable %_ptr_Function_v4float Function
+OpStore %expected %26
+%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %29
+%34 = OpCompositeExtract %float %33 0
+%28 = OpExtInst %float %1 Ceil %34
+%35 = OpLoad %v4float %expected
+%36 = OpCompositeExtract %float %35 0
+%37 = OpFOrdEqual %bool %28 %36
+OpSelectionMerge %39 None
+OpBranchConditional %37 %38 %39
+%38 = OpLabel
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%42 = OpLoad %v4float %41
+%43 = OpVectorShuffle %v2float %42 %42 0 1
+%40 = OpExtInst %v2float %1 Ceil %43
+%45 = OpLoad %v4float %expected
+%46 = OpVectorShuffle %v2float %45 %45 0 1
+%47 = OpFOrdEqual %v2bool %40 %46
+%49 = OpAll %bool %47
+OpBranch %39
+%39 = OpLabel
+%50 = OpPhi %bool %false %19 %49 %38
+OpSelectionMerge %52 None
+OpBranchConditional %50 %51 %52
+%51 = OpLabel
+%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%55 = OpLoad %v4float %54
+%56 = OpVectorShuffle %v3float %55 %55 0 1 2
+%53 = OpExtInst %v3float %1 Ceil %56
+%58 = OpLoad %v4float %expected
+%59 = OpVectorShuffle %v3float %58 %58 0 1 2
+%60 = OpFOrdEqual %v3bool %53 %59
+%62 = OpAll %bool %60
+OpBranch %52
+%52 = OpLabel
+%63 = OpPhi %bool %false %39 %62 %51
+OpSelectionMerge %65 None
+OpBranchConditional %63 %64 %65
+%64 = OpLabel
+%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpLoad %v4float %67
+%66 = OpExtInst %v4float %1 Ceil %68
+%69 = OpLoad %v4float %expected
+%70 = OpFOrdEqual %v4bool %66 %69
+%72 = OpAll %bool %70
+OpBranch %65
+%65 = OpLabel
+%73 = OpPhi %bool %false %52 %72 %64
+OpSelectionMerge %77 None
+OpBranchConditional %73 %75 %76
+%75 = OpLabel
+%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%80 = OpLoad %v4float %78
+OpStore %74 %80
+OpBranch %77
+%76 = OpLabel
+%81 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%83 = OpLoad %v4float %81
+OpStore %74 %83
+OpBranch %77
+%77 = OpLabel
+%84 = OpLoad %v4float %74
+OpReturnValue %84
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Ceil.glsl b/tests/sksl/intrinsics/Ceil.glsl
index 47f45e0..d58e9b3 100644
--- a/tests/sksl/intrinsics/Ceil.glsl
+++ b/tests/sksl/intrinsics/Ceil.glsl
@@ -4,5 +4,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((ceil(testInputs.x) == -1.0 && ceil(testInputs.xy) == vec2(-1.0, 0.0)) && ceil(testInputs.xyz) == vec3(-1.0, 0.0, 1.0)) && ceil(testInputs) == vec4(-1.0, 0.0, 1.0, 3.0) ? colorGreen : colorRed;
+    vec4 expected = vec4(-1.0, 0.0, 1.0, 3.0);
+    return ((ceil(testInputs.x) == expected.x && ceil(testInputs.xy) == expected.xy) && ceil(testInputs.xyz) == expected.xyz) && ceil(testInputs) == expected ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/Ceil.metal b/tests/sksl/intrinsics/Ceil.metal
index 917a695..5bcaf82 100644
--- a/tests/sksl/intrinsics/Ceil.metal
+++ b/tests/sksl/intrinsics/Ceil.metal
@@ -17,6 +17,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((ceil(_uniforms.testInputs.x) == -1.0 && all(ceil(_uniforms.testInputs.xy) == float2(-1.0, 0.0))) && all(ceil(_uniforms.testInputs.xyz) == float3(-1.0, 0.0, 1.0))) && all(ceil(_uniforms.testInputs) == float4(-1.0, 0.0, 1.0, 3.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expected = float4(-1.0, 0.0, 1.0, 3.0);
+    _out.sk_FragColor = ((ceil(_uniforms.testInputs.x) == expected.x && all(ceil(_uniforms.testInputs.xy) == expected.xy)) && all(ceil(_uniforms.testInputs.xyz) == expected.xyz)) && all(ceil(_uniforms.testInputs) == expected) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/ClampFloat.asm.frag b/tests/sksl/intrinsics/ClampFloat.asm.frag
index f4b43eb..8598f0a 100644
--- a/tests/sksl/intrinsics/ClampFloat.asm.frag
+++ b/tests/sksl/intrinsics/ClampFloat.asm.frag
@@ -11,6 +11,10 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expectedA "expectedA"
+OpName %clampLow "clampLow"
+OpName %expectedB "expectedB"
+OpName %clampHigh "clampHigh"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,23 +29,39 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %35 RelaxedPrecision
-OpDecorate %38 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
 OpDecorate %53 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %66 RelaxedPrecision
-OpDecorate %67 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
+OpDecorate %56 RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
 OpDecorate %85 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
+OpDecorate %109 RelaxedPrecision
 OpDecorate %111 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %115 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
 OpDecorate %130 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
+OpDecorate %141 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %152 RelaxedPrecision
+OpDecorate %155 RelaxedPrecision
+OpDecorate %156 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -55,36 +75,29 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_n1 = OpConstant %float -1
+%float_0 = OpConstant %float 0
+%float_0_75 = OpConstant %float 0.75
+%float_1 = OpConstant %float 1
+%26 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_75 %float_1
+%float_n2 = OpConstant %float -2
+%29 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n2 %float_1
+%float_0_5 = OpConstant %float 0.5
+%float_2_25 = OpConstant %float 2.25
+%33 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_5 %float_2_25
+%float_2 = OpConstant %float 2
+%float_3 = OpConstant %float 3
+%37 = OpConstantComposite %v4float %float_1 %float_2 %float_0_5 %float_3
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_n1 = OpConstant %float -1
-%float_1 = OpConstant %float 1
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%41 = OpConstantComposite %v2float %float_n1 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%float_0_75 = OpConstant %float 0.75
-%56 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_75
 %v3bool = OpTypeVector %bool 3
-%68 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_75 %float_1
 %v4bool = OpTypeVector %bool 4
-%float_n2 = OpConstant %float -2
-%88 = OpConstantComposite %v2float %float_n1 %float_n2
-%float_2 = OpConstant %float 2
-%90 = OpConstantComposite %v2float %float_1 %float_2
-%100 = OpConstantComposite %v3float %float_n1 %float_n2 %float_n2
-%float_0_5 = OpConstant %float 0.5
-%102 = OpConstantComposite %v3float %float_1 %float_2 %float_0_5
-%103 = OpConstantComposite %v3float %float_n1 %float_0 %float_0_5
-%112 = OpConstantComposite %v4float %float_n1 %float_n2 %float_n2 %float_1
-%float_3 = OpConstant %float 3
-%114 = OpConstantComposite %v4float %float_1 %float_2 %float_0_5 %float_3
-%float_2_25 = OpConstant %float 2.25
-%116 = OpConstantComposite %v4float %float_n1 %float_0 %float_0_5 %float_2_25
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -95,112 +108,148 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%120 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 FClamp %27 %float_n1 %float_1
-%30 = OpFOrdEqual %bool %21 %float_n1
-OpSelectionMerge %32 None
-OpBranchConditional %30 %31 %32
-%31 = OpLabel
-%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%35 = OpLoad %v4float %34
-%36 = OpVectorShuffle %v2float %35 %35 0 1
-%38 = OpCompositeConstruct %v2float %float_n1 %float_n1
-%39 = OpCompositeConstruct %v2float %float_1 %float_1
-%33 = OpExtInst %v2float %1 FClamp %36 %38 %39
-%42 = OpFOrdEqual %v2bool %33 %41
-%44 = OpAll %bool %42
-OpBranch %32
-%32 = OpLabel
-%45 = OpPhi %bool %false %19 %44 %31
-OpSelectionMerge %47 None
-OpBranchConditional %45 %46 %47
-%46 = OpLabel
-%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%50 = OpLoad %v4float %49
-%51 = OpVectorShuffle %v3float %50 %50 0 1 2
-%53 = OpCompositeConstruct %v3float %float_n1 %float_n1 %float_n1
-%54 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1
-%48 = OpExtInst %v3float %1 FClamp %51 %53 %54
-%57 = OpFOrdEqual %v3bool %48 %56
-%59 = OpAll %bool %57
-OpBranch %47
-%47 = OpLabel
-%60 = OpPhi %bool %false %32 %59 %46
-OpSelectionMerge %62 None
-OpBranchConditional %60 %61 %62
-%61 = OpLabel
-%64 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%65 = OpLoad %v4float %64
-%66 = OpCompositeConstruct %v4float %float_n1 %float_n1 %float_n1 %float_n1
-%67 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
-%63 = OpExtInst %v4float %1 FClamp %65 %66 %67
-%69 = OpFOrdEqual %v4bool %63 %68
-%71 = OpAll %bool %69
-OpBranch %62
-%62 = OpLabel
-%72 = OpPhi %bool %false %47 %71 %61
-OpSelectionMerge %74 None
-OpBranchConditional %72 %73 %74
-%73 = OpLabel
-%76 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%77 = OpLoad %v4float %76
-%78 = OpCompositeExtract %float %77 0
-%75 = OpExtInst %float %1 FClamp %78 %float_n1 %float_1
-%79 = OpFOrdEqual %bool %75 %float_n1
-OpBranch %74
-%74 = OpLabel
-%80 = OpPhi %bool %false %62 %79 %73
-OpSelectionMerge %82 None
-OpBranchConditional %80 %81 %82
-%81 = OpLabel
-%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%85 = OpLoad %v4float %84
-%86 = OpVectorShuffle %v2float %85 %85 0 1
-%83 = OpExtInst %v2float %1 FClamp %86 %88 %90
-%91 = OpFOrdEqual %v2bool %83 %41
-%92 = OpAll %bool %91
-OpBranch %82
-%82 = OpLabel
-%93 = OpPhi %bool %false %74 %92 %81
-OpSelectionMerge %95 None
-OpBranchConditional %93 %94 %95
-%94 = OpLabel
-%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%98 = OpLoad %v4float %97
-%99 = OpVectorShuffle %v3float %98 %98 0 1 2
-%96 = OpExtInst %v3float %1 FClamp %99 %100 %102
-%104 = OpFOrdEqual %v3bool %96 %103
-%105 = OpAll %bool %104
-OpBranch %95
-%95 = OpLabel
-%106 = OpPhi %bool %false %82 %105 %94
-OpSelectionMerge %108 None
-OpBranchConditional %106 %107 %108
-%107 = OpLabel
-%110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%111 = OpLoad %v4float %110
-%109 = OpExtInst %v4float %1 FClamp %111 %112 %114
-%117 = OpFOrdEqual %v4bool %109 %116
+%expectedA = OpVariable %_ptr_Function_v4float Function
+%clampLow = OpVariable %_ptr_Function_v4float Function
+%expectedB = OpVariable %_ptr_Function_v4float Function
+%clampHigh = OpVariable %_ptr_Function_v4float Function
+%146 = OpVariable %_ptr_Function_v4float Function
+OpStore %expectedA %26
+OpStore %clampLow %29
+OpStore %expectedB %33
+OpStore %clampHigh %37
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%44 = OpLoad %v4float %40
+%45 = OpCompositeExtract %float %44 0
+%39 = OpExtInst %float %1 FClamp %45 %float_n1 %float_1
+%46 = OpLoad %v4float %expectedA
+%47 = OpCompositeExtract %float %46 0
+%48 = OpFOrdEqual %bool %39 %47
+OpSelectionMerge %50 None
+OpBranchConditional %48 %49 %50
+%49 = OpLabel
+%52 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%53 = OpLoad %v4float %52
+%54 = OpVectorShuffle %v2float %53 %53 0 1
+%56 = OpCompositeConstruct %v2float %float_n1 %float_n1
+%57 = OpCompositeConstruct %v2float %float_1 %float_1
+%51 = OpExtInst %v2float %1 FClamp %54 %56 %57
+%58 = OpLoad %v4float %expectedA
+%59 = OpVectorShuffle %v2float %58 %58 0 1
+%60 = OpFOrdEqual %v2bool %51 %59
+%62 = OpAll %bool %60
+OpBranch %50
+%50 = OpLabel
+%63 = OpPhi %bool %false %19 %62 %49
+OpSelectionMerge %65 None
+OpBranchConditional %63 %64 %65
+%64 = OpLabel
+%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpLoad %v4float %67
+%69 = OpVectorShuffle %v3float %68 %68 0 1 2
+%71 = OpCompositeConstruct %v3float %float_n1 %float_n1 %float_n1
+%72 = OpCompositeConstruct %v3float %float_1 %float_1 %float_1
+%66 = OpExtInst %v3float %1 FClamp %69 %71 %72
+%73 = OpLoad %v4float %expectedA
+%74 = OpVectorShuffle %v3float %73 %73 0 1 2
+%75 = OpFOrdEqual %v3bool %66 %74
+%77 = OpAll %bool %75
+OpBranch %65
+%65 = OpLabel
+%78 = OpPhi %bool %false %50 %77 %64
+OpSelectionMerge %80 None
+OpBranchConditional %78 %79 %80
+%79 = OpLabel
+%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%83 = OpLoad %v4float %82
+%84 = OpCompositeConstruct %v4float %float_n1 %float_n1 %float_n1 %float_n1
+%85 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
+%81 = OpExtInst %v4float %1 FClamp %83 %84 %85
+%86 = OpLoad %v4float %expectedA
+%87 = OpFOrdEqual %v4bool %81 %86
+%89 = OpAll %bool %87
+OpBranch %80
+%80 = OpLabel
+%90 = OpPhi %bool %false %65 %89 %79
+OpSelectionMerge %92 None
+OpBranchConditional %90 %91 %92
+%91 = OpLabel
+%94 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%95 = OpLoad %v4float %94
+%96 = OpCompositeExtract %float %95 0
+%97 = OpLoad %v4float %clampLow
+%98 = OpCompositeExtract %float %97 0
+%99 = OpLoad %v4float %clampHigh
+%100 = OpCompositeExtract %float %99 0
+%93 = OpExtInst %float %1 FClamp %96 %98 %100
+%101 = OpLoad %v4float %expectedB
+%102 = OpCompositeExtract %float %101 0
+%103 = OpFOrdEqual %bool %93 %102
+OpBranch %92
+%92 = OpLabel
+%104 = OpPhi %bool %false %80 %103 %91
+OpSelectionMerge %106 None
+OpBranchConditional %104 %105 %106
+%105 = OpLabel
+%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%109 = OpLoad %v4float %108
+%110 = OpVectorShuffle %v2float %109 %109 0 1
+%111 = OpLoad %v4float %clampLow
+%112 = OpVectorShuffle %v2float %111 %111 0 1
+%113 = OpLoad %v4float %clampHigh
+%114 = OpVectorShuffle %v2float %113 %113 0 1
+%107 = OpExtInst %v2float %1 FClamp %110 %112 %114
+%115 = OpLoad %v4float %expectedB
+%116 = OpVectorShuffle %v2float %115 %115 0 1
+%117 = OpFOrdEqual %v2bool %107 %116
 %118 = OpAll %bool %117
-OpBranch %108
-%108 = OpLabel
-%119 = OpPhi %bool %false %95 %118 %107
-OpSelectionMerge %124 None
-OpBranchConditional %119 %122 %123
-%122 = OpLabel
-%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%127 = OpLoad %v4float %125
-OpStore %120 %127
-OpBranch %124
-%123 = OpLabel
-%128 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%130 = OpLoad %v4float %128
-OpStore %120 %130
-OpBranch %124
-%124 = OpLabel
-%131 = OpLoad %v4float %120
-OpReturnValue %131
+OpBranch %106
+%106 = OpLabel
+%119 = OpPhi %bool %false %92 %118 %105
+OpSelectionMerge %121 None
+OpBranchConditional %119 %120 %121
+%120 = OpLabel
+%123 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%124 = OpLoad %v4float %123
+%125 = OpVectorShuffle %v3float %124 %124 0 1 2
+%126 = OpLoad %v4float %clampLow
+%127 = OpVectorShuffle %v3float %126 %126 0 1 2
+%128 = OpLoad %v4float %clampHigh
+%129 = OpVectorShuffle %v3float %128 %128 0 1 2
+%122 = OpExtInst %v3float %1 FClamp %125 %127 %129
+%130 = OpLoad %v4float %expectedB
+%131 = OpVectorShuffle %v3float %130 %130 0 1 2
+%132 = OpFOrdEqual %v3bool %122 %131
+%133 = OpAll %bool %132
+OpBranch %121
+%121 = OpLabel
+%134 = OpPhi %bool %false %106 %133 %120
+OpSelectionMerge %136 None
+OpBranchConditional %134 %135 %136
+%135 = OpLabel
+%138 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%139 = OpLoad %v4float %138
+%140 = OpLoad %v4float %clampLow
+%141 = OpLoad %v4float %clampHigh
+%137 = OpExtInst %v4float %1 FClamp %139 %140 %141
+%142 = OpLoad %v4float %expectedB
+%143 = OpFOrdEqual %v4bool %137 %142
+%144 = OpAll %bool %143
+OpBranch %136
+%136 = OpLabel
+%145 = OpPhi %bool %false %121 %144 %135
+OpSelectionMerge %149 None
+OpBranchConditional %145 %147 %148
+%147 = OpLabel
+%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%152 = OpLoad %v4float %150
+OpStore %146 %152
+OpBranch %149
+%148 = OpLabel
+%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%155 = OpLoad %v4float %153
+OpStore %146 %155
+OpBranch %149
+%149 = OpLabel
+%156 = OpLoad %v4float %146
+OpReturnValue %156
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/ClampFloat.glsl b/tests/sksl/intrinsics/ClampFloat.glsl
index 128c64d..8591348 100644
--- a/tests/sksl/intrinsics/ClampFloat.glsl
+++ b/tests/sksl/intrinsics/ClampFloat.glsl
@@ -4,5 +4,9 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((((((clamp(testInputs.x, -1.0, 1.0) == -1.0 && clamp(testInputs.xy, -1.0, 1.0) == vec2(-1.0, 0.0)) && clamp(testInputs.xyz, -1.0, 1.0) == vec3(-1.0, 0.0, 0.75)) && clamp(testInputs, -1.0, 1.0) == vec4(-1.0, 0.0, 0.75, 1.0)) && clamp(testInputs.x, -1.0, 1.0) == -1.0) && clamp(testInputs.xy, vec2(-1.0, -2.0), vec2(1.0, 2.0)) == vec2(-1.0, 0.0)) && clamp(testInputs.xyz, vec3(-1.0, -2.0, -2.0), vec3(1.0, 2.0, 0.5)) == vec3(-1.0, 0.0, 0.5)) && clamp(testInputs, vec4(-1.0, -2.0, -2.0, 1.0), vec4(1.0, 2.0, 0.5, 3.0)) == vec4(-1.0, 0.0, 0.5, 2.25) ? colorGreen : colorRed;
+    vec4 expectedA = vec4(-1.0, 0.0, 0.75, 1.0);
+    vec4 clampLow = vec4(-1.0, -2.0, -2.0, 1.0);
+    vec4 expectedB = vec4(-1.0, 0.0, 0.5, 2.25);
+    vec4 clampHigh = vec4(1.0, 2.0, 0.5, 3.0);
+    return ((((((clamp(testInputs.x, -1.0, 1.0) == expectedA.x && clamp(testInputs.xy, -1.0, 1.0) == expectedA.xy) && clamp(testInputs.xyz, -1.0, 1.0) == expectedA.xyz) && clamp(testInputs, -1.0, 1.0) == expectedA) && clamp(testInputs.x, clampLow.x, clampHigh.x) == expectedB.x) && clamp(testInputs.xy, clampLow.xy, clampHigh.xy) == expectedB.xy) && clamp(testInputs.xyz, clampLow.xyz, clampHigh.xyz) == expectedB.xyz) && clamp(testInputs, clampLow, clampHigh) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/ClampFloat.metal b/tests/sksl/intrinsics/ClampFloat.metal
index 056c8e1..2c922cb 100644
--- a/tests/sksl/intrinsics/ClampFloat.metal
+++ b/tests/sksl/intrinsics/ClampFloat.metal
@@ -17,6 +17,10 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((((((clamp(_uniforms.testInputs.x, -1.0, 1.0) == -1.0 && all(clamp(_uniforms.testInputs.xy, -1.0, 1.0) == float2(-1.0, 0.0))) && all(clamp(_uniforms.testInputs.xyz, -1.0, 1.0) == float3(-1.0, 0.0, 0.75))) && all(clamp(_uniforms.testInputs, -1.0, 1.0) == float4(-1.0, 0.0, 0.75, 1.0))) && clamp(_uniforms.testInputs.x, -1.0, 1.0) == -1.0) && all(clamp(_uniforms.testInputs.xy, float2(-1.0, -2.0), float2(1.0, 2.0)) == float2(-1.0, 0.0))) && all(clamp(_uniforms.testInputs.xyz, float3(-1.0, -2.0, -2.0), float3(1.0, 2.0, 0.5)) == float3(-1.0, 0.0, 0.5))) && all(clamp(_uniforms.testInputs, float4(-1.0, -2.0, -2.0, 1.0), float4(1.0, 2.0, 0.5, 3.0)) == float4(-1.0, 0.0, 0.5, 2.25)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expectedA = float4(-1.0, 0.0, 0.75, 1.0);
+    float4 clampLow = float4(-1.0, -2.0, -2.0, 1.0);
+    float4 expectedB = float4(-1.0, 0.0, 0.5, 2.25);
+    float4 clampHigh = float4(1.0, 2.0, 0.5, 3.0);
+    _out.sk_FragColor = ((((((clamp(_uniforms.testInputs.x, -1.0, 1.0) == expectedA.x && all(clamp(_uniforms.testInputs.xy, -1.0, 1.0) == expectedA.xy)) && all(clamp(_uniforms.testInputs.xyz, -1.0, 1.0) == expectedA.xyz)) && all(clamp(_uniforms.testInputs, -1.0, 1.0) == expectedA)) && clamp(_uniforms.testInputs.x, clampLow.x, clampHigh.x) == expectedB.x) && all(clamp(_uniforms.testInputs.xy, clampLow.xy, clampHigh.xy) == expectedB.xy)) && all(clamp(_uniforms.testInputs.xyz, clampLow.xyz, clampHigh.xyz) == expectedB.xyz)) && all(clamp(_uniforms.testInputs, clampLow, clampHigh) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/ClampInt.asm.frag b/tests/sksl/intrinsics/ClampInt.asm.frag
index f41597f..92dc3a7 100644
--- a/tests/sksl/intrinsics/ClampInt.asm.frag
+++ b/tests/sksl/intrinsics/ClampInt.asm.frag
@@ -11,7 +11,11 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expectedA "expectedA"
 OpName %intValues "intValues"
+OpName %clampLow "clampLow"
+OpName %expectedB "expectedB"
+OpName %clampHigh "clampHigh"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -26,10 +30,10 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %27 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %163 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -46,34 +50,27 @@
 %int = OpTypeInt 32 1
 %v4int = OpTypeVector %int 4
 %_ptr_Function_v4int = OpTypePointer Function %v4int
-%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%int_0 = OpConstant %int 0
-%float_100 = OpConstant %float 100
-%false = OpConstantFalse %bool
 %int_n100 = OpConstant %int -100
+%int_0 = OpConstant %int 0
+%int_75 = OpConstant %int 75
 %int_100 = OpConstant %int 100
+%28 = OpConstantComposite %v4int %int_n100 %int_0 %int_75 %int_100
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%float_100 = OpConstant %float 100
+%int_n200 = OpConstant %int -200
+%46 = OpConstantComposite %v4int %int_n100 %int_n200 %int_n200 %int_100
+%int_50 = OpConstant %int 50
+%int_225 = OpConstant %int 225
+%50 = OpConstantComposite %v4int %int_n100 %int_0 %int_50 %int_225
+%int_200 = OpConstant %int 200
+%int_300 = OpConstant %int 300
+%54 = OpConstantComposite %v4int %int_100 %int_200 %int_50 %int_300
+%false = OpConstantFalse %bool
 %v2int = OpTypeVector %int 2
-%54 = OpConstantComposite %v2int %int_n100 %int_0
 %v2bool = OpTypeVector %bool 2
 %v3int = OpTypeVector %int 3
-%int_75 = OpConstant %int 75
-%68 = OpConstantComposite %v3int %int_n100 %int_0 %int_75
 %v3bool = OpTypeVector %bool 3
-%79 = OpConstantComposite %v4int %int_n100 %int_0 %int_75 %int_100
 %v4bool = OpTypeVector %bool 4
-%int_n200 = OpConstant %int -200
-%97 = OpConstantComposite %v2int %int_n100 %int_n200
-%int_200 = OpConstant %int 200
-%99 = OpConstantComposite %v2int %int_100 %int_200
-%108 = OpConstantComposite %v3int %int_n100 %int_n200 %int_n200
-%int_50 = OpConstant %int 50
-%110 = OpConstantComposite %v3int %int_100 %int_200 %int_50
-%111 = OpConstantComposite %v3int %int_n100 %int_0 %int_50
-%119 = OpConstantComposite %v4int %int_n100 %int_n200 %int_n200 %int_100
-%int_300 = OpConstant %int 300
-%121 = OpConstantComposite %v4int %int_100 %int_200 %int_50 %int_300
-%int_225 = OpConstant %int 225
-%123 = OpConstantComposite %v4int %int_n100 %int_0 %int_50 %int_225
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
@@ -85,118 +82,154 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
+%expectedA = OpVariable %_ptr_Function_v4int Function
 %intValues = OpVariable %_ptr_Function_v4int Function
-%127 = OpVariable %_ptr_Function_v4float Function
-%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%27 = OpLoad %v4float %24
-%29 = OpVectorTimesScalar %v4float %27 %float_100
-%30 = OpCompositeExtract %float %29 0
-%31 = OpConvertFToS %int %30
-%32 = OpCompositeExtract %float %29 1
-%33 = OpConvertFToS %int %32
-%34 = OpCompositeExtract %float %29 2
-%35 = OpConvertFToS %int %34
-%36 = OpCompositeExtract %float %29 3
-%37 = OpConvertFToS %int %36
-%38 = OpCompositeConstruct %v4int %31 %33 %35 %37
-OpStore %intValues %38
-%41 = OpLoad %v4int %intValues
-%42 = OpCompositeExtract %int %41 0
-%40 = OpExtInst %int %1 SClamp %42 %int_n100 %int_100
-%45 = OpIEqual %bool %40 %int_n100
-OpSelectionMerge %47 None
-OpBranchConditional %45 %46 %47
-%46 = OpLabel
-%49 = OpLoad %v4int %intValues
-%50 = OpVectorShuffle %v2int %49 %49 0 1
-%52 = OpCompositeConstruct %v2int %int_n100 %int_n100
-%53 = OpCompositeConstruct %v2int %int_100 %int_100
-%48 = OpExtInst %v2int %1 SClamp %50 %52 %53
-%55 = OpIEqual %v2bool %48 %54
-%57 = OpAll %bool %55
-OpBranch %47
-%47 = OpLabel
-%58 = OpPhi %bool %false %19 %57 %46
-OpSelectionMerge %60 None
-OpBranchConditional %58 %59 %60
-%59 = OpLabel
-%62 = OpLoad %v4int %intValues
-%63 = OpVectorShuffle %v3int %62 %62 0 1 2
-%65 = OpCompositeConstruct %v3int %int_n100 %int_n100 %int_n100
-%66 = OpCompositeConstruct %v3int %int_100 %int_100 %int_100
-%61 = OpExtInst %v3int %1 SClamp %63 %65 %66
-%69 = OpIEqual %v3bool %61 %68
-%71 = OpAll %bool %69
-OpBranch %60
-%60 = OpLabel
-%72 = OpPhi %bool %false %47 %71 %59
-OpSelectionMerge %74 None
-OpBranchConditional %72 %73 %74
-%73 = OpLabel
-%76 = OpLoad %v4int %intValues
-%77 = OpCompositeConstruct %v4int %int_n100 %int_n100 %int_n100 %int_n100
-%78 = OpCompositeConstruct %v4int %int_100 %int_100 %int_100 %int_100
-%75 = OpExtInst %v4int %1 SClamp %76 %77 %78
-%80 = OpIEqual %v4bool %75 %79
-%82 = OpAll %bool %80
-OpBranch %74
-%74 = OpLabel
-%83 = OpPhi %bool %false %60 %82 %73
-OpSelectionMerge %85 None
-OpBranchConditional %83 %84 %85
-%84 = OpLabel
-%87 = OpLoad %v4int %intValues
-%88 = OpCompositeExtract %int %87 0
-%86 = OpExtInst %int %1 SClamp %88 %int_n100 %int_100
-%89 = OpIEqual %bool %86 %int_n100
-OpBranch %85
-%85 = OpLabel
-%90 = OpPhi %bool %false %74 %89 %84
-OpSelectionMerge %92 None
-OpBranchConditional %90 %91 %92
+%clampLow = OpVariable %_ptr_Function_v4int Function
+%expectedB = OpVariable %_ptr_Function_v4int Function
+%clampHigh = OpVariable %_ptr_Function_v4int Function
+%152 = OpVariable %_ptr_Function_v4float Function
+OpStore %expectedA %28
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%32 = OpLoad %v4float %30
+%34 = OpVectorTimesScalar %v4float %32 %float_100
+%35 = OpCompositeExtract %float %34 0
+%36 = OpConvertFToS %int %35
+%37 = OpCompositeExtract %float %34 1
+%38 = OpConvertFToS %int %37
+%39 = OpCompositeExtract %float %34 2
+%40 = OpConvertFToS %int %39
+%41 = OpCompositeExtract %float %34 3
+%42 = OpConvertFToS %int %41
+%43 = OpCompositeConstruct %v4int %36 %38 %40 %42
+OpStore %intValues %43
+OpStore %clampLow %46
+OpStore %expectedB %50
+OpStore %clampHigh %54
+%57 = OpLoad %v4int %intValues
+%58 = OpCompositeExtract %int %57 0
+%56 = OpExtInst %int %1 SClamp %58 %int_n100 %int_100
+%59 = OpLoad %v4int %expectedA
+%60 = OpCompositeExtract %int %59 0
+%61 = OpIEqual %bool %56 %60
+OpSelectionMerge %63 None
+OpBranchConditional %61 %62 %63
+%62 = OpLabel
+%65 = OpLoad %v4int %intValues
+%66 = OpVectorShuffle %v2int %65 %65 0 1
+%68 = OpCompositeConstruct %v2int %int_n100 %int_n100
+%69 = OpCompositeConstruct %v2int %int_100 %int_100
+%64 = OpExtInst %v2int %1 SClamp %66 %68 %69
+%70 = OpLoad %v4int %expectedA
+%71 = OpVectorShuffle %v2int %70 %70 0 1
+%72 = OpIEqual %v2bool %64 %71
+%74 = OpAll %bool %72
+OpBranch %63
+%63 = OpLabel
+%75 = OpPhi %bool %false %19 %74 %62
+OpSelectionMerge %77 None
+OpBranchConditional %75 %76 %77
+%76 = OpLabel
+%79 = OpLoad %v4int %intValues
+%80 = OpVectorShuffle %v3int %79 %79 0 1 2
+%82 = OpCompositeConstruct %v3int %int_n100 %int_n100 %int_n100
+%83 = OpCompositeConstruct %v3int %int_100 %int_100 %int_100
+%78 = OpExtInst %v3int %1 SClamp %80 %82 %83
+%84 = OpLoad %v4int %expectedA
+%85 = OpVectorShuffle %v3int %84 %84 0 1 2
+%86 = OpIEqual %v3bool %78 %85
+%88 = OpAll %bool %86
+OpBranch %77
+%77 = OpLabel
+%89 = OpPhi %bool %false %63 %88 %76
+OpSelectionMerge %91 None
+OpBranchConditional %89 %90 %91
+%90 = OpLabel
+%93 = OpLoad %v4int %intValues
+%94 = OpCompositeConstruct %v4int %int_n100 %int_n100 %int_n100 %int_n100
+%95 = OpCompositeConstruct %v4int %int_100 %int_100 %int_100 %int_100
+%92 = OpExtInst %v4int %1 SClamp %93 %94 %95
+%96 = OpLoad %v4int %expectedA
+%97 = OpIEqual %v4bool %92 %96
+%99 = OpAll %bool %97
+OpBranch %91
 %91 = OpLabel
-%94 = OpLoad %v4int %intValues
-%95 = OpVectorShuffle %v2int %94 %94 0 1
-%93 = OpExtInst %v2int %1 SClamp %95 %97 %99
-%100 = OpIEqual %v2bool %93 %54
-%101 = OpAll %bool %100
-OpBranch %92
-%92 = OpLabel
-%102 = OpPhi %bool %false %85 %101 %91
-OpSelectionMerge %104 None
-OpBranchConditional %102 %103 %104
-%103 = OpLabel
-%106 = OpLoad %v4int %intValues
-%107 = OpVectorShuffle %v3int %106 %106 0 1 2
-%105 = OpExtInst %v3int %1 SClamp %107 %108 %110
-%112 = OpIEqual %v3bool %105 %111
-%113 = OpAll %bool %112
-OpBranch %104
-%104 = OpLabel
-%114 = OpPhi %bool %false %92 %113 %103
-OpSelectionMerge %116 None
-OpBranchConditional %114 %115 %116
+%100 = OpPhi %bool %false %77 %99 %90
+OpSelectionMerge %102 None
+OpBranchConditional %100 %101 %102
+%101 = OpLabel
+%104 = OpLoad %v4int %intValues
+%105 = OpCompositeExtract %int %104 0
+%106 = OpLoad %v4int %clampLow
+%107 = OpCompositeExtract %int %106 0
+%108 = OpLoad %v4int %clampHigh
+%109 = OpCompositeExtract %int %108 0
+%103 = OpExtInst %int %1 SClamp %105 %107 %109
+%110 = OpLoad %v4int %expectedB
+%111 = OpCompositeExtract %int %110 0
+%112 = OpIEqual %bool %103 %111
+OpBranch %102
+%102 = OpLabel
+%113 = OpPhi %bool %false %91 %112 %101
+OpSelectionMerge %115 None
+OpBranchConditional %113 %114 %115
+%114 = OpLabel
+%117 = OpLoad %v4int %intValues
+%118 = OpVectorShuffle %v2int %117 %117 0 1
+%119 = OpLoad %v4int %clampLow
+%120 = OpVectorShuffle %v2int %119 %119 0 1
+%121 = OpLoad %v4int %clampHigh
+%122 = OpVectorShuffle %v2int %121 %121 0 1
+%116 = OpExtInst %v2int %1 SClamp %118 %120 %122
+%123 = OpLoad %v4int %expectedB
+%124 = OpVectorShuffle %v2int %123 %123 0 1
+%125 = OpIEqual %v2bool %116 %124
+%126 = OpAll %bool %125
+OpBranch %115
 %115 = OpLabel
-%118 = OpLoad %v4int %intValues
-%117 = OpExtInst %v4int %1 SClamp %118 %119 %121
-%124 = OpIEqual %v4bool %117 %123
-%125 = OpAll %bool %124
-OpBranch %116
-%116 = OpLabel
-%126 = OpPhi %bool %false %104 %125 %115
-OpSelectionMerge %131 None
-OpBranchConditional %126 %129 %130
+%127 = OpPhi %bool %false %102 %126 %114
+OpSelectionMerge %129 None
+OpBranchConditional %127 %128 %129
+%128 = OpLabel
+%131 = OpLoad %v4int %intValues
+%132 = OpVectorShuffle %v3int %131 %131 0 1 2
+%133 = OpLoad %v4int %clampLow
+%134 = OpVectorShuffle %v3int %133 %133 0 1 2
+%135 = OpLoad %v4int %clampHigh
+%136 = OpVectorShuffle %v3int %135 %135 0 1 2
+%130 = OpExtInst %v3int %1 SClamp %132 %134 %136
+%137 = OpLoad %v4int %expectedB
+%138 = OpVectorShuffle %v3int %137 %137 0 1 2
+%139 = OpIEqual %v3bool %130 %138
+%140 = OpAll %bool %139
+OpBranch %129
 %129 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%134 = OpLoad %v4float %132
-OpStore %127 %134
-OpBranch %131
-%130 = OpLabel
-%135 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%137 = OpLoad %v4float %135
-OpStore %127 %137
-OpBranch %131
-%131 = OpLabel
-%138 = OpLoad %v4float %127
-OpReturnValue %138
+%141 = OpPhi %bool %false %115 %140 %128
+OpSelectionMerge %143 None
+OpBranchConditional %141 %142 %143
+%142 = OpLabel
+%145 = OpLoad %v4int %intValues
+%146 = OpLoad %v4int %clampLow
+%147 = OpLoad %v4int %clampHigh
+%144 = OpExtInst %v4int %1 SClamp %145 %146 %147
+%148 = OpLoad %v4int %expectedB
+%149 = OpIEqual %v4bool %144 %148
+%150 = OpAll %bool %149
+OpBranch %143
+%143 = OpLabel
+%151 = OpPhi %bool %false %129 %150 %142
+OpSelectionMerge %156 None
+OpBranchConditional %151 %154 %155
+%154 = OpLabel
+%157 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%159 = OpLoad %v4float %157
+OpStore %152 %159
+OpBranch %156
+%155 = OpLabel
+%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%162 = OpLoad %v4float %160
+OpStore %152 %162
+OpBranch %156
+%156 = OpLabel
+%163 = OpLoad %v4float %152
+OpReturnValue %163
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/ClampInt.glsl b/tests/sksl/intrinsics/ClampInt.glsl
index 0d8de21..e80560e 100644
--- a/tests/sksl/intrinsics/ClampInt.glsl
+++ b/tests/sksl/intrinsics/ClampInt.glsl
@@ -4,6 +4,10 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
+    ivec4 expectedA = ivec4(-100, 0, 75, 100);
     ivec4 intValues = ivec4(testInputs * 100.0);
-    return ((((((clamp(intValues.x, -100, 100) == -100 && clamp(intValues.xy, -100, 100) == ivec2(-100, 0)) && clamp(intValues.xyz, -100, 100) == ivec3(-100, 0, 75)) && clamp(intValues, -100, 100) == ivec4(-100, 0, 75, 100)) && clamp(intValues.x, -100, 100) == -100) && clamp(intValues.xy, ivec2(-100, -200), ivec2(100, 200)) == ivec2(-100, 0)) && clamp(intValues.xyz, ivec3(-100, -200, -200), ivec3(100, 200, 50)) == ivec3(-100, 0, 50)) && clamp(intValues, ivec4(-100, -200, -200, 100), ivec4(100, 200, 50, 300)) == ivec4(-100, 0, 50, 225) ? colorGreen : colorRed;
+    ivec4 clampLow = ivec4(-100, -200, -200, 100);
+    ivec4 expectedB = ivec4(-100, 0, 50, 225);
+    ivec4 clampHigh = ivec4(100, 200, 50, 300);
+    return ((((((clamp(intValues.x, -100, 100) == expectedA.x && clamp(intValues.xy, -100, 100) == expectedA.xy) && clamp(intValues.xyz, -100, 100) == expectedA.xyz) && clamp(intValues, -100, 100) == expectedA) && clamp(intValues.x, clampLow.x, clampHigh.x) == expectedB.x) && clamp(intValues.xy, clampLow.xy, clampHigh.xy) == expectedB.xy) && clamp(intValues.xyz, clampLow.xyz, clampHigh.xyz) == expectedB.xyz) && clamp(intValues, clampLow, clampHigh) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/ClampInt.metal b/tests/sksl/intrinsics/ClampInt.metal
index fb8bf82..1d7510f 100644
--- a/tests/sksl/intrinsics/ClampInt.metal
+++ b/tests/sksl/intrinsics/ClampInt.metal
@@ -17,7 +17,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    int4 expectedA = int4(-100, 0, 75, 100);
     int4 intValues = int4(_uniforms.testInputs * 100.0);
-    _out.sk_FragColor = ((((((clamp(intValues.x, -100, 100) == -100 && all(clamp(intValues.xy, -100, 100) == int2(-100, 0))) && all(clamp(intValues.xyz, -100, 100) == int3(-100, 0, 75))) && all(clamp(intValues, -100, 100) == int4(-100, 0, 75, 100))) && clamp(intValues.x, -100, 100) == -100) && all(clamp(intValues.xy, int2(-100, -200), int2(100, 200)) == int2(-100, 0))) && all(clamp(intValues.xyz, int3(-100, -200, -200), int3(100, 200, 50)) == int3(-100, 0, 50))) && all(clamp(intValues, int4(-100, -200, -200, 100), int4(100, 200, 50, 300)) == int4(-100, 0, 50, 225)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    int4 clampLow = int4(-100, -200, -200, 100);
+    int4 expectedB = int4(-100, 0, 50, 225);
+    int4 clampHigh = int4(100, 200, 50, 300);
+    _out.sk_FragColor = ((((((clamp(intValues.x, -100, 100) == expectedA.x && all(clamp(intValues.xy, -100, 100) == expectedA.xy)) && all(clamp(intValues.xyz, -100, 100) == expectedA.xyz)) && all(clamp(intValues, -100, 100) == expectedA)) && clamp(intValues.x, clampLow.x, clampHigh.x) == expectedB.x) && all(clamp(intValues.xy, clampLow.xy, clampHigh.xy) == expectedB.xy)) && all(clamp(intValues.xyz, clampLow.xyz, clampHigh.xyz) == expectedB.xyz)) && all(clamp(intValues, clampLow, clampHigh) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/Floor.asm.frag b/tests/sksl/intrinsics/Floor.asm.frag
index ed15ec9..1fd3c45 100644
--- a/tests/sksl/intrinsics/Floor.asm.frag
+++ b/tests/sksl/intrinsics/Floor.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expected "expected"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,13 +26,17 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
 OpDecorate %34 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %59 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,22 +50,20 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_n2 = OpConstant %float -2
+%float_0 = OpConstant %float 0
+%float_2 = OpConstant %float 2
+%25 = OpConstantComposite %v4float %float_n2 %float_0 %float_0 %float_2
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_n2 = OpConstant %float -2
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%38 = OpConstantComposite %v2float %float_n2 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%50 = OpConstantComposite %v3float %float_n2 %float_0 %float_0
 %v3bool = OpTypeVector %bool 3
-%float_2 = OpConstant %float 2
-%61 = OpConstantComposite %v4float %float_n2 %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 = OpFunction %void None %15
@@ -71,60 +74,69 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%66 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 Floor %27
-%29 = OpFOrdEqual %bool %21 %float_n2
-OpSelectionMerge %31 None
-OpBranchConditional %29 %30 %31
-%30 = OpLabel
-%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%34 = OpLoad %v4float %33
-%35 = OpVectorShuffle %v2float %34 %34 0 1
-%32 = OpExtInst %v2float %1 Floor %35
-%39 = OpFOrdEqual %v2bool %32 %38
-%41 = OpAll %bool %39
-OpBranch %31
-%31 = OpLabel
-%42 = OpPhi %bool %false %19 %41 %30
-OpSelectionMerge %44 None
-OpBranchConditional %42 %43 %44
-%43 = OpLabel
-%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%47 = OpLoad %v4float %46
-%48 = OpVectorShuffle %v3float %47 %47 0 1 2
-%45 = OpExtInst %v3float %1 Floor %48
-%51 = OpFOrdEqual %v3bool %45 %50
-%53 = OpAll %bool %51
-OpBranch %44
-%44 = OpLabel
-%54 = OpPhi %bool %false %31 %53 %43
-OpSelectionMerge %56 None
-OpBranchConditional %54 %55 %56
-%55 = OpLabel
-%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%59 = OpLoad %v4float %58
-%57 = OpExtInst %v4float %1 Floor %59
-%62 = OpFOrdEqual %v4bool %57 %61
-%64 = OpAll %bool %62
-OpBranch %56
-%56 = OpLabel
-%65 = OpPhi %bool %false %44 %64 %55
-OpSelectionMerge %70 None
-OpBranchConditional %65 %68 %69
-%68 = OpLabel
-%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%73 = OpLoad %v4float %71
-OpStore %66 %73
-OpBranch %70
-%69 = OpLabel
-%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%76 = OpLoad %v4float %74
-OpStore %66 %76
-OpBranch %70
-%70 = OpLabel
-%77 = OpLoad %v4float %66
-OpReturnValue %77
+%expected = OpVariable %_ptr_Function_v4float Function
+%73 = OpVariable %_ptr_Function_v4float Function
+OpStore %expected %25
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%32 = OpLoad %v4float %28
+%33 = OpCompositeExtract %float %32 0
+%27 = OpExtInst %float %1 Floor %33
+%34 = OpLoad %v4float %expected
+%35 = OpCompositeExtract %float %34 0
+%36 = OpFOrdEqual %bool %27 %35
+OpSelectionMerge %38 None
+OpBranchConditional %36 %37 %38
+%37 = OpLabel
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%41 = OpLoad %v4float %40
+%42 = OpVectorShuffle %v2float %41 %41 0 1
+%39 = OpExtInst %v2float %1 Floor %42
+%44 = OpLoad %v4float %expected
+%45 = OpVectorShuffle %v2float %44 %44 0 1
+%46 = OpFOrdEqual %v2bool %39 %45
+%48 = OpAll %bool %46
+OpBranch %38
+%38 = OpLabel
+%49 = OpPhi %bool %false %19 %48 %37
+OpSelectionMerge %51 None
+OpBranchConditional %49 %50 %51
+%50 = OpLabel
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%54 = OpLoad %v4float %53
+%55 = OpVectorShuffle %v3float %54 %54 0 1 2
+%52 = OpExtInst %v3float %1 Floor %55
+%57 = OpLoad %v4float %expected
+%58 = OpVectorShuffle %v3float %57 %57 0 1 2
+%59 = OpFOrdEqual %v3bool %52 %58
+%61 = OpAll %bool %59
+OpBranch %51
+%51 = OpLabel
+%62 = OpPhi %bool %false %38 %61 %50
+OpSelectionMerge %64 None
+OpBranchConditional %62 %63 %64
+%63 = OpLabel
+%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%67 = OpLoad %v4float %66
+%65 = OpExtInst %v4float %1 Floor %67
+%68 = OpLoad %v4float %expected
+%69 = OpFOrdEqual %v4bool %65 %68
+%71 = OpAll %bool %69
+OpBranch %64
+%64 = OpLabel
+%72 = OpPhi %bool %false %51 %71 %63
+OpSelectionMerge %76 None
+OpBranchConditional %72 %74 %75
+%74 = OpLabel
+%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%79 = OpLoad %v4float %77
+OpStore %73 %79
+OpBranch %76
+%75 = OpLabel
+%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%82 = OpLoad %v4float %80
+OpStore %73 %82
+OpBranch %76
+%76 = OpLabel
+%83 = OpLoad %v4float %73
+OpReturnValue %83
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/Floor.glsl b/tests/sksl/intrinsics/Floor.glsl
index 8a06bd8..b6dbe04 100644
--- a/tests/sksl/intrinsics/Floor.glsl
+++ b/tests/sksl/intrinsics/Floor.glsl
@@ -4,5 +4,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((floor(testInputs.x) == -2.0 && floor(testInputs.xy) == vec2(-2.0, 0.0)) && floor(testInputs.xyz) == vec3(-2.0, 0.0, 0.0)) && floor(testInputs) == vec4(-2.0, 0.0, 0.0, 2.0) ? colorGreen : colorRed;
+    vec4 expected = vec4(-2.0, 0.0, 0.0, 2.0);
+    return ((floor(testInputs.x) == expected.x && floor(testInputs.xy) == expected.xy) && floor(testInputs.xyz) == expected.xyz) && floor(testInputs) == expected ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/Floor.metal b/tests/sksl/intrinsics/Floor.metal
index 7ec9118..53069d9 100644
--- a/tests/sksl/intrinsics/Floor.metal
+++ b/tests/sksl/intrinsics/Floor.metal
@@ -17,6 +17,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((floor(_uniforms.testInputs.x) == -2.0 && all(floor(_uniforms.testInputs.xy) == float2(-2.0, 0.0))) && all(floor(_uniforms.testInputs.xyz) == float3(-2.0, 0.0, 0.0))) && all(floor(_uniforms.testInputs) == float4(-2.0, 0.0, 0.0, 2.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expected = float4(-2.0, 0.0, 0.0, 2.0);
+    _out.sk_FragColor = ((floor(_uniforms.testInputs.x) == expected.x && all(floor(_uniforms.testInputs.xy) == expected.xy)) && all(floor(_uniforms.testInputs.xyz) == expected.xyz)) && all(floor(_uniforms.testInputs) == expected) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/MaxFloat.asm.frag b/tests/sksl/intrinsics/MaxFloat.asm.frag
index 9be31ec..ba40aa2 100644
--- a/tests/sksl/intrinsics/MaxFloat.asm.frag
+++ b/tests/sksl/intrinsics/MaxFloat.asm.frag
@@ -11,6 +11,8 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expectedA "expectedA"
+OpName %expectedB "expectedB"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,24 +27,32 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %34 RelaxedPrecision
-OpDecorate %37 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
-OpDecorate %61 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %49 RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
+OpDecorate %63 RelaxedPrecision
 OpDecorate %73 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %90 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
+OpDecorate %112 RelaxedPrecision
 OpDecorate %115 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
 OpDecorate %126 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
 OpDecorate %129 RelaxedPrecision
-OpDecorate %130 RelaxedPrecision
+OpDecorate %138 RelaxedPrecision
+OpDecorate %141 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -56,28 +66,24 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_0_5 = OpConstant %float 0.5
+%float_0_75 = OpConstant %float 0.75
+%float_2_25 = OpConstant %float 2.25
+%25 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_75 %float_2_25
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
+%29 = OpConstantComposite %v4float %float_0 %float_1 %float_0_75 %float_2_25
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_0_5 = OpConstant %float 0.5
 %v2float = OpTypeVector %float 2
-%38 = OpConstantComposite %v2float %float_0_5 %float_0_5
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%float_0_75 = OpConstant %float 0.75
-%52 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_75
 %v3bool = OpTypeVector %bool 3
-%float_2_25 = OpConstant %float 2.25
-%64 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_75 %float_2_25
 %v4bool = OpTypeVector %bool 4
 %int_1 = OpConstant %int 1
-%float_0 = OpConstant %float 0
-%float_1 = OpConstant %float 1
-%92 = OpConstantComposite %v2float %float_0 %float_1
-%105 = OpConstantComposite %v3float %float_0 %float_1 %float_0_75
-%116 = OpConstantComposite %v4float %float_0 %float_1 %float_0_75 %float_2_25
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
@@ -87,120 +93,138 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%120 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 FMax %27 %float_0_5
-%29 = OpFOrdEqual %bool %21 %float_0_5
-OpSelectionMerge %31 None
-OpBranchConditional %29 %30 %31
-%30 = OpLabel
-%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%34 = OpLoad %v4float %33
-%35 = OpVectorShuffle %v2float %34 %34 0 1
-%37 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
-%32 = OpExtInst %v2float %1 FMax %35 %37
-%39 = OpFOrdEqual %v2bool %32 %38
-%41 = OpAll %bool %39
-OpBranch %31
-%31 = OpLabel
-%42 = OpPhi %bool %false %19 %41 %30
-OpSelectionMerge %44 None
-OpBranchConditional %42 %43 %44
-%43 = OpLabel
-%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%47 = OpLoad %v4float %46
-%48 = OpVectorShuffle %v3float %47 %47 0 1 2
-%50 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
-%45 = OpExtInst %v3float %1 FMax %48 %50
-%53 = OpFOrdEqual %v3bool %45 %52
-%55 = OpAll %bool %53
-OpBranch %44
-%44 = OpLabel
-%56 = OpPhi %bool %false %31 %55 %43
-OpSelectionMerge %58 None
-OpBranchConditional %56 %57 %58
-%57 = OpLabel
-%60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%61 = OpLoad %v4float %60
-%62 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
-%59 = OpExtInst %v4float %1 FMax %61 %62
-%65 = OpFOrdEqual %v4bool %59 %64
+%expectedA = OpVariable %_ptr_Function_v4float Function
+%expectedB = OpVariable %_ptr_Function_v4float Function
+%133 = OpVariable %_ptr_Function_v4float Function
+OpStore %expectedA %25
+OpStore %expectedB %29
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%36 = OpLoad %v4float %32
+%37 = OpCompositeExtract %float %36 0
+%31 = OpExtInst %float %1 FMax %37 %float_0_5
+%38 = OpLoad %v4float %expectedA
+%39 = OpCompositeExtract %float %38 0
+%40 = OpFOrdEqual %bool %31 %39
+OpSelectionMerge %42 None
+OpBranchConditional %40 %41 %42
+%41 = OpLabel
+%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%45 = OpLoad %v4float %44
+%46 = OpVectorShuffle %v2float %45 %45 0 1
+%48 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
+%43 = OpExtInst %v2float %1 FMax %46 %48
+%49 = OpLoad %v4float %expectedA
+%50 = OpVectorShuffle %v2float %49 %49 0 1
+%51 = OpFOrdEqual %v2bool %43 %50
+%53 = OpAll %bool %51
+OpBranch %42
+%42 = OpLabel
+%54 = OpPhi %bool %false %19 %53 %41
+OpSelectionMerge %56 None
+OpBranchConditional %54 %55 %56
+%55 = OpLabel
+%58 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%59 = OpLoad %v4float %58
+%60 = OpVectorShuffle %v3float %59 %59 0 1 2
+%62 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
+%57 = OpExtInst %v3float %1 FMax %60 %62
+%63 = OpLoad %v4float %expectedA
+%64 = OpVectorShuffle %v3float %63 %63 0 1 2
+%65 = OpFOrdEqual %v3bool %57 %64
 %67 = OpAll %bool %65
-OpBranch %58
-%58 = OpLabel
-%68 = OpPhi %bool %false %44 %67 %57
+OpBranch %56
+%56 = OpLabel
+%68 = OpPhi %bool %false %42 %67 %55
 OpSelectionMerge %70 None
 OpBranchConditional %68 %69 %70
 %69 = OpLabel
 %72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %73 = OpLoad %v4float %72
-%74 = OpCompositeExtract %float %73 0
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%77 = OpLoad %v4float %75
-%78 = OpCompositeExtract %float %77 0
-%71 = OpExtInst %float %1 FMax %74 %78
-%80 = OpFOrdEqual %bool %71 %float_0
+%74 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
+%71 = OpExtInst %v4float %1 FMax %73 %74
+%75 = OpLoad %v4float %expectedA
+%76 = OpFOrdEqual %v4bool %71 %75
+%78 = OpAll %bool %76
 OpBranch %70
 %70 = OpLabel
-%81 = OpPhi %bool %false %58 %80 %69
-OpSelectionMerge %83 None
-OpBranchConditional %81 %82 %83
-%82 = OpLabel
-%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%86 = OpLoad %v4float %85
-%87 = OpVectorShuffle %v2float %86 %86 0 1
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%89 = OpLoad %v4float %88
-%90 = OpVectorShuffle %v2float %89 %89 0 1
-%84 = OpExtInst %v2float %1 FMax %87 %90
-%93 = OpFOrdEqual %v2bool %84 %92
-%94 = OpAll %bool %93
-OpBranch %83
-%83 = OpLabel
-%95 = OpPhi %bool %false %70 %94 %82
-OpSelectionMerge %97 None
-OpBranchConditional %95 %96 %97
-%96 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%100 = OpLoad %v4float %99
-%101 = OpVectorShuffle %v3float %100 %100 0 1 2
-%102 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%103 = OpLoad %v4float %102
-%104 = OpVectorShuffle %v3float %103 %103 0 1 2
-%98 = OpExtInst %v3float %1 FMax %101 %104
-%106 = OpFOrdEqual %v3bool %98 %105
-%107 = OpAll %bool %106
-OpBranch %97
-%97 = OpLabel
-%108 = OpPhi %bool %false %83 %107 %96
-OpSelectionMerge %110 None
-OpBranchConditional %108 %109 %110
-%109 = OpLabel
-%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%113 = OpLoad %v4float %112
+%79 = OpPhi %bool %false %56 %78 %69
+OpSelectionMerge %81 None
+OpBranchConditional %79 %80 %81
+%80 = OpLabel
+%83 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%84 = OpLoad %v4float %83
+%85 = OpCompositeExtract %float %84 0
+%86 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%88 = OpLoad %v4float %86
+%89 = OpCompositeExtract %float %88 0
+%82 = OpExtInst %float %1 FMax %85 %89
+%90 = OpLoad %v4float %expectedB
+%91 = OpCompositeExtract %float %90 0
+%92 = OpFOrdEqual %bool %82 %91
+OpBranch %81
+%81 = OpLabel
+%93 = OpPhi %bool %false %70 %92 %80
+OpSelectionMerge %95 None
+OpBranchConditional %93 %94 %95
+%94 = OpLabel
+%97 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%98 = OpLoad %v4float %97
+%99 = OpVectorShuffle %v2float %98 %98 0 1
+%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%101 = OpLoad %v4float %100
+%102 = OpVectorShuffle %v2float %101 %101 0 1
+%96 = OpExtInst %v2float %1 FMax %99 %102
+%103 = OpLoad %v4float %expectedB
+%104 = OpVectorShuffle %v2float %103 %103 0 1
+%105 = OpFOrdEqual %v2bool %96 %104
+%106 = OpAll %bool %105
+OpBranch %95
+%95 = OpLabel
+%107 = OpPhi %bool %false %81 %106 %94
+OpSelectionMerge %109 None
+OpBranchConditional %107 %108 %109
+%108 = OpLabel
+%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%112 = OpLoad %v4float %111
+%113 = OpVectorShuffle %v3float %112 %112 0 1 2
 %114 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %115 = OpLoad %v4float %114
-%111 = OpExtInst %v4float %1 FMax %113 %115
-%117 = OpFOrdEqual %v4bool %111 %116
-%118 = OpAll %bool %117
-OpBranch %110
-%110 = OpLabel
-%119 = OpPhi %bool %false %97 %118 %109
-OpSelectionMerge %124 None
-OpBranchConditional %119 %122 %123
+%116 = OpVectorShuffle %v3float %115 %115 0 1 2
+%110 = OpExtInst %v3float %1 FMax %113 %116
+%117 = OpLoad %v4float %expectedB
+%118 = OpVectorShuffle %v3float %117 %117 0 1 2
+%119 = OpFOrdEqual %v3bool %110 %118
+%120 = OpAll %bool %119
+OpBranch %109
+%109 = OpLabel
+%121 = OpPhi %bool %false %95 %120 %108
+OpSelectionMerge %123 None
+OpBranchConditional %121 %122 %123
 %122 = OpLabel
-%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %126 = OpLoad %v4float %125
-OpStore %120 %126
-OpBranch %124
+%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%128 = OpLoad %v4float %127
+%124 = OpExtInst %v4float %1 FMax %126 %128
+%129 = OpLoad %v4float %expectedB
+%130 = OpFOrdEqual %v4bool %124 %129
+%131 = OpAll %bool %130
+OpBranch %123
 %123 = OpLabel
-%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%129 = OpLoad %v4float %127
-OpStore %120 %129
-OpBranch %124
-%124 = OpLabel
-%130 = OpLoad %v4float %120
-OpReturnValue %130
+%132 = OpPhi %bool %false %109 %131 %122
+OpSelectionMerge %136 None
+OpBranchConditional %132 %134 %135
+%134 = OpLabel
+%137 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%138 = OpLoad %v4float %137
+OpStore %133 %138
+OpBranch %136
+%135 = OpLabel
+%139 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%141 = OpLoad %v4float %139
+OpStore %133 %141
+OpBranch %136
+%136 = OpLabel
+%142 = OpLoad %v4float %133
+OpReturnValue %142
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MaxFloat.glsl b/tests/sksl/intrinsics/MaxFloat.glsl
index 9bc7d75..340ec96 100644
--- a/tests/sksl/intrinsics/MaxFloat.glsl
+++ b/tests/sksl/intrinsics/MaxFloat.glsl
@@ -4,5 +4,7 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((((((max(testInputs.x, 0.5) == 0.5 && max(testInputs.xy, 0.5) == vec2(0.5, 0.5)) && max(testInputs.xyz, 0.5) == vec3(0.5, 0.5, 0.75)) && max(testInputs, 0.5) == vec4(0.5, 0.5, 0.75, 2.25)) && max(testInputs.x, colorGreen.x) == 0.0) && max(testInputs.xy, colorGreen.xy) == vec2(0.0, 1.0)) && max(testInputs.xyz, colorGreen.xyz) == vec3(0.0, 1.0, 0.75)) && max(testInputs, colorGreen) == vec4(0.0, 1.0, 0.75, 2.25) ? colorGreen : colorRed;
+    vec4 expectedA = vec4(0.5, 0.5, 0.75, 2.25);
+    vec4 expectedB = vec4(0.0, 1.0, 0.75, 2.25);
+    return ((((((max(testInputs.x, 0.5) == expectedA.x && max(testInputs.xy, 0.5) == expectedA.xy) && max(testInputs.xyz, 0.5) == expectedA.xyz) && max(testInputs, 0.5) == expectedA) && max(testInputs.x, colorGreen.x) == expectedB.x) && max(testInputs.xy, colorGreen.xy) == expectedB.xy) && max(testInputs.xyz, colorGreen.xyz) == expectedB.xyz) && max(testInputs, colorGreen) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MaxFloat.metal b/tests/sksl/intrinsics/MaxFloat.metal
index 6c18bfb..9a6152a 100644
--- a/tests/sksl/intrinsics/MaxFloat.metal
+++ b/tests/sksl/intrinsics/MaxFloat.metal
@@ -17,6 +17,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((((((max(_uniforms.testInputs.x, 0.5) == 0.5 && all(max(_uniforms.testInputs.xy, 0.5) == float2(0.5, 0.5))) && all(max(_uniforms.testInputs.xyz, 0.5) == float3(0.5, 0.5, 0.75))) && all(max(_uniforms.testInputs, 0.5) == float4(0.5, 0.5, 0.75, 2.25))) && max(_uniforms.testInputs.x, _uniforms.colorGreen.x) == 0.0) && all(max(_uniforms.testInputs.xy, _uniforms.colorGreen.xy) == float2(0.0, 1.0))) && all(max(_uniforms.testInputs.xyz, _uniforms.colorGreen.xyz) == float3(0.0, 1.0, 0.75))) && all(max(_uniforms.testInputs, _uniforms.colorGreen) == float4(0.0, 1.0, 0.75, 2.25)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expectedA = float4(0.5, 0.5, 0.75, 2.25);
+    float4 expectedB = float4(0.0, 1.0, 0.75, 2.25);
+    _out.sk_FragColor = ((((((max(_uniforms.testInputs.x, 0.5) == expectedA.x && all(max(_uniforms.testInputs.xy, 0.5) == expectedA.xy)) && all(max(_uniforms.testInputs.xyz, 0.5) == expectedA.xyz)) && all(max(_uniforms.testInputs, 0.5) == expectedA)) && max(_uniforms.testInputs.x, _uniforms.colorGreen.x) == expectedB.x) && all(max(_uniforms.testInputs.xy, _uniforms.colorGreen.xy) == expectedB.xy)) && all(max(_uniforms.testInputs.xyz, _uniforms.colorGreen.xyz) == expectedB.xyz)) && all(max(_uniforms.testInputs, _uniforms.colorGreen) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/MaxInt.asm.frag b/tests/sksl/intrinsics/MaxInt.asm.frag
index 5c541c0..bff952b 100644
--- a/tests/sksl/intrinsics/MaxInt.asm.frag
+++ b/tests/sksl/intrinsics/MaxInt.asm.frag
@@ -13,6 +13,8 @@
 OpName %main "main"
 OpName %intValues "intValues"
 OpName %intGreen "intGreen"
+OpName %expectedA "expectedA"
+OpName %expectedB "expectedB"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -29,9 +31,9 @@
 OpDecorate %10 DescriptorSet 0
 OpDecorate %27 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
-OpDecorate %142 RelaxedPrecision
-OpDecorate %145 RelaxedPrecision
-OpDecorate %146 RelaxedPrecision
+OpDecorate %154 RelaxedPrecision
+OpDecorate %157 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -52,22 +54,18 @@
 %int_0 = OpConstant %int 0
 %float_100 = OpConstant %float 100
 %int_1 = OpConstant %int 1
-%false = OpConstantFalse %bool
 %int_50 = OpConstant %int 50
+%int_75 = OpConstant %int 75
+%int_225 = OpConstant %int 225
+%57 = OpConstantComposite %v4int %int_50 %int_50 %int_75 %int_225
+%int_100 = OpConstant %int 100
+%60 = OpConstantComposite %v4int %int_0 %int_100 %int_75 %int_225
+%false = OpConstantFalse %bool
 %v2int = OpTypeVector %int 2
-%66 = OpConstantComposite %v2int %int_50 %int_50
 %v2bool = OpTypeVector %bool 2
 %v3int = OpTypeVector %int 3
-%int_75 = OpConstant %int 75
-%79 = OpConstantComposite %v3int %int_50 %int_50 %int_75
 %v3bool = OpTypeVector %bool 3
-%int_225 = OpConstant %int 225
-%90 = OpConstantComposite %v4int %int_50 %int_50 %int_75 %int_225
 %v4bool = OpTypeVector %bool 4
-%int_100 = OpConstant %int 100
-%112 = OpConstantComposite %v2int %int_0 %int_100
-%123 = OpConstantComposite %v3int %int_0 %int_100 %int_75
-%132 = OpConstantComposite %v4int %int_0 %int_100 %int_75 %int_225
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -80,7 +78,9 @@
 %19 = OpLabel
 %intValues = OpVariable %_ptr_Function_v4int Function
 %intGreen = OpVariable %_ptr_Function_v4int Function
-%136 = OpVariable %_ptr_Function_v4float Function
+%expectedA = OpVariable %_ptr_Function_v4int Function
+%expectedB = OpVariable %_ptr_Function_v4int Function
+%148 = OpVariable %_ptr_Function_v4float Function
 %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %27 = OpLoad %v4float %24
 %29 = OpVectorTimesScalar %v4float %27 %float_100
@@ -107,107 +107,123 @@
 %51 = OpConvertFToS %int %50
 %52 = OpCompositeConstruct %v4int %45 %47 %49 %51
 OpStore %intGreen %52
-%55 = OpLoad %v4int %intValues
-%56 = OpCompositeExtract %int %55 0
-%54 = OpExtInst %int %1 SMax %56 %int_50
-%58 = OpIEqual %bool %54 %int_50
-OpSelectionMerge %60 None
-OpBranchConditional %58 %59 %60
-%59 = OpLabel
-%62 = OpLoad %v4int %intValues
-%63 = OpVectorShuffle %v2int %62 %62 0 1
-%65 = OpCompositeConstruct %v2int %int_50 %int_50
-%61 = OpExtInst %v2int %1 SMax %63 %65
-%67 = OpIEqual %v2bool %61 %66
-%69 = OpAll %bool %67
-OpBranch %60
-%60 = OpLabel
-%70 = OpPhi %bool %false %19 %69 %59
-OpSelectionMerge %72 None
-OpBranchConditional %70 %71 %72
-%71 = OpLabel
-%74 = OpLoad %v4int %intValues
-%75 = OpVectorShuffle %v3int %74 %74 0 1 2
-%77 = OpCompositeConstruct %v3int %int_50 %int_50 %int_50
-%73 = OpExtInst %v3int %1 SMax %75 %77
-%80 = OpIEqual %v3bool %73 %79
-%82 = OpAll %bool %80
-OpBranch %72
-%72 = OpLabel
-%83 = OpPhi %bool %false %60 %82 %71
-OpSelectionMerge %85 None
-OpBranchConditional %83 %84 %85
-%84 = OpLabel
-%87 = OpLoad %v4int %intValues
-%88 = OpCompositeConstruct %v4int %int_50 %int_50 %int_50 %int_50
-%86 = OpExtInst %v4int %1 SMax %87 %88
-%91 = OpIEqual %v4bool %86 %90
-%93 = OpAll %bool %91
-OpBranch %85
-%85 = OpLabel
-%94 = OpPhi %bool %false %72 %93 %84
-OpSelectionMerge %96 None
-OpBranchConditional %94 %95 %96
+OpStore %expectedA %57
+OpStore %expectedB %60
+%63 = OpLoad %v4int %intValues
+%64 = OpCompositeExtract %int %63 0
+%62 = OpExtInst %int %1 SMax %64 %int_50
+%65 = OpLoad %v4int %expectedA
+%66 = OpCompositeExtract %int %65 0
+%67 = OpIEqual %bool %62 %66
+OpSelectionMerge %69 None
+OpBranchConditional %67 %68 %69
+%68 = OpLabel
+%71 = OpLoad %v4int %intValues
+%72 = OpVectorShuffle %v2int %71 %71 0 1
+%74 = OpCompositeConstruct %v2int %int_50 %int_50
+%70 = OpExtInst %v2int %1 SMax %72 %74
+%75 = OpLoad %v4int %expectedA
+%76 = OpVectorShuffle %v2int %75 %75 0 1
+%77 = OpIEqual %v2bool %70 %76
+%79 = OpAll %bool %77
+OpBranch %69
+%69 = OpLabel
+%80 = OpPhi %bool %false %19 %79 %68
+OpSelectionMerge %82 None
+OpBranchConditional %80 %81 %82
+%81 = OpLabel
+%84 = OpLoad %v4int %intValues
+%85 = OpVectorShuffle %v3int %84 %84 0 1 2
+%87 = OpCompositeConstruct %v3int %int_50 %int_50 %int_50
+%83 = OpExtInst %v3int %1 SMax %85 %87
+%88 = OpLoad %v4int %expectedA
+%89 = OpVectorShuffle %v3int %88 %88 0 1 2
+%90 = OpIEqual %v3bool %83 %89
+%92 = OpAll %bool %90
+OpBranch %82
+%82 = OpLabel
+%93 = OpPhi %bool %false %69 %92 %81
+OpSelectionMerge %95 None
+OpBranchConditional %93 %94 %95
+%94 = OpLabel
+%97 = OpLoad %v4int %intValues
+%98 = OpCompositeConstruct %v4int %int_50 %int_50 %int_50 %int_50
+%96 = OpExtInst %v4int %1 SMax %97 %98
+%99 = OpLoad %v4int %expectedA
+%100 = OpIEqual %v4bool %96 %99
+%102 = OpAll %bool %100
+OpBranch %95
 %95 = OpLabel
-%98 = OpLoad %v4int %intValues
-%99 = OpCompositeExtract %int %98 0
-%100 = OpLoad %v4int %intGreen
-%101 = OpCompositeExtract %int %100 0
-%97 = OpExtInst %int %1 SMax %99 %101
-%102 = OpIEqual %bool %97 %int_0
-OpBranch %96
-%96 = OpLabel
-%103 = OpPhi %bool %false %85 %102 %95
+%103 = OpPhi %bool %false %82 %102 %94
 OpSelectionMerge %105 None
 OpBranchConditional %103 %104 %105
 %104 = OpLabel
 %107 = OpLoad %v4int %intValues
-%108 = OpVectorShuffle %v2int %107 %107 0 1
+%108 = OpCompositeExtract %int %107 0
 %109 = OpLoad %v4int %intGreen
-%110 = OpVectorShuffle %v2int %109 %109 0 1
-%106 = OpExtInst %v2int %1 SMax %108 %110
-%113 = OpIEqual %v2bool %106 %112
-%114 = OpAll %bool %113
+%110 = OpCompositeExtract %int %109 0
+%106 = OpExtInst %int %1 SMax %108 %110
+%111 = OpLoad %v4int %expectedB
+%112 = OpCompositeExtract %int %111 0
+%113 = OpIEqual %bool %106 %112
 OpBranch %105
 %105 = OpLabel
-%115 = OpPhi %bool %false %96 %114 %104
-OpSelectionMerge %117 None
-OpBranchConditional %115 %116 %117
-%116 = OpLabel
-%119 = OpLoad %v4int %intValues
-%120 = OpVectorShuffle %v3int %119 %119 0 1 2
-%121 = OpLoad %v4int %intGreen
-%122 = OpVectorShuffle %v3int %121 %121 0 1 2
-%118 = OpExtInst %v3int %1 SMax %120 %122
-%124 = OpIEqual %v3bool %118 %123
+%114 = OpPhi %bool %false %95 %113 %104
+OpSelectionMerge %116 None
+OpBranchConditional %114 %115 %116
+%115 = OpLabel
+%118 = OpLoad %v4int %intValues
+%119 = OpVectorShuffle %v2int %118 %118 0 1
+%120 = OpLoad %v4int %intGreen
+%121 = OpVectorShuffle %v2int %120 %120 0 1
+%117 = OpExtInst %v2int %1 SMax %119 %121
+%122 = OpLoad %v4int %expectedB
+%123 = OpVectorShuffle %v2int %122 %122 0 1
+%124 = OpIEqual %v2bool %117 %123
 %125 = OpAll %bool %124
-OpBranch %117
-%117 = OpLabel
-%126 = OpPhi %bool %false %105 %125 %116
+OpBranch %116
+%116 = OpLabel
+%126 = OpPhi %bool %false %105 %125 %115
 OpSelectionMerge %128 None
 OpBranchConditional %126 %127 %128
 %127 = OpLabel
 %130 = OpLoad %v4int %intValues
-%131 = OpLoad %v4int %intGreen
-%129 = OpExtInst %v4int %1 SMax %130 %131
-%133 = OpIEqual %v4bool %129 %132
-%134 = OpAll %bool %133
+%131 = OpVectorShuffle %v3int %130 %130 0 1 2
+%132 = OpLoad %v4int %intGreen
+%133 = OpVectorShuffle %v3int %132 %132 0 1 2
+%129 = OpExtInst %v3int %1 SMax %131 %133
+%134 = OpLoad %v4int %expectedB
+%135 = OpVectorShuffle %v3int %134 %134 0 1 2
+%136 = OpIEqual %v3bool %129 %135
+%137 = OpAll %bool %136
 OpBranch %128
 %128 = OpLabel
-%135 = OpPhi %bool %false %117 %134 %127
+%138 = OpPhi %bool %false %116 %137 %127
 OpSelectionMerge %140 None
-OpBranchConditional %135 %138 %139
-%138 = OpLabel
-%141 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%142 = OpLoad %v4float %141
-OpStore %136 %142
-OpBranch %140
+OpBranchConditional %138 %139 %140
 %139 = OpLabel
-%143 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%145 = OpLoad %v4float %143
-OpStore %136 %145
+%142 = OpLoad %v4int %intValues
+%143 = OpLoad %v4int %intGreen
+%141 = OpExtInst %v4int %1 SMax %142 %143
+%144 = OpLoad %v4int %expectedB
+%145 = OpIEqual %v4bool %141 %144
+%146 = OpAll %bool %145
 OpBranch %140
 %140 = OpLabel
-%146 = OpLoad %v4float %136
-OpReturnValue %146
+%147 = OpPhi %bool %false %128 %146 %139
+OpSelectionMerge %152 None
+OpBranchConditional %147 %150 %151
+%150 = OpLabel
+%153 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%154 = OpLoad %v4float %153
+OpStore %148 %154
+OpBranch %152
+%151 = OpLabel
+%155 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%157 = OpLoad %v4float %155
+OpStore %148 %157
+OpBranch %152
+%152 = OpLabel
+%158 = OpLoad %v4float %148
+OpReturnValue %158
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MaxInt.glsl b/tests/sksl/intrinsics/MaxInt.glsl
index 0505d41..53ef5db 100644
--- a/tests/sksl/intrinsics/MaxInt.glsl
+++ b/tests/sksl/intrinsics/MaxInt.glsl
@@ -6,5 +6,7 @@
 vec4 main() {
     ivec4 intValues = ivec4(testInputs * 100.0);
     ivec4 intGreen = ivec4(colorGreen * 100.0);
-    return ((((((max(intValues.x, 50) == 50 && max(intValues.xy, 50) == ivec2(50, 50)) && max(intValues.xyz, 50) == ivec3(50, 50, 75)) && max(intValues, 50) == ivec4(50, 50, 75, 225)) && max(intValues.x, intGreen.x) == 0) && max(intValues.xy, intGreen.xy) == ivec2(0, 100)) && max(intValues.xyz, intGreen.xyz) == ivec3(0, 100, 75)) && max(intValues, intGreen) == ivec4(0, 100, 75, 225) ? colorGreen : colorRed;
+    ivec4 expectedA = ivec4(50, 50, 75, 225);
+    ivec4 expectedB = ivec4(0, 100, 75, 225);
+    return ((((((max(intValues.x, 50) == expectedA.x && max(intValues.xy, 50) == expectedA.xy) && max(intValues.xyz, 50) == expectedA.xyz) && max(intValues, 50) == expectedA) && max(intValues.x, intGreen.x) == expectedB.x) && max(intValues.xy, intGreen.xy) == expectedB.xy) && max(intValues.xyz, intGreen.xyz) == expectedB.xyz) && max(intValues, intGreen) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MaxInt.metal b/tests/sksl/intrinsics/MaxInt.metal
index 7e862a2..7660322 100644
--- a/tests/sksl/intrinsics/MaxInt.metal
+++ b/tests/sksl/intrinsics/MaxInt.metal
@@ -19,6 +19,8 @@
     (void)_out;
     int4 intValues = int4(_uniforms.testInputs * 100.0);
     int4 intGreen = int4(_uniforms.colorGreen * 100.0);
-    _out.sk_FragColor = ((((((max(intValues.x, 50) == 50 && all(max(intValues.xy, 50) == int2(50, 50))) && all(max(intValues.xyz, 50) == int3(50, 50, 75))) && all(max(intValues, 50) == int4(50, 50, 75, 225))) && max(intValues.x, intGreen.x) == 0) && all(max(intValues.xy, intGreen.xy) == int2(0, 100))) && all(max(intValues.xyz, intGreen.xyz) == int3(0, 100, 75))) && all(max(intValues, intGreen) == int4(0, 100, 75, 225)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    int4 expectedA = int4(50, 50, 75, 225);
+    int4 expectedB = int4(0, 100, 75, 225);
+    _out.sk_FragColor = ((((((max(intValues.x, 50) == expectedA.x && all(max(intValues.xy, 50) == expectedA.xy)) && all(max(intValues.xyz, 50) == expectedA.xyz)) && all(max(intValues, 50) == expectedA)) && max(intValues.x, intGreen.x) == expectedB.x) && all(max(intValues.xy, intGreen.xy) == expectedB.xy)) && all(max(intValues.xyz, intGreen.xyz) == expectedB.xyz)) && all(max(intValues, intGreen) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/MinFloat.asm.frag b/tests/sksl/intrinsics/MinFloat.asm.frag
index 416dc90..514c518 100644
--- a/tests/sksl/intrinsics/MinFloat.asm.frag
+++ b/tests/sksl/intrinsics/MinFloat.asm.frag
@@ -11,6 +11,8 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expectedA "expectedA"
+OpName %expectedB "expectedB"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,24 +27,32 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
 OpDecorate %35 RelaxedPrecision
-OpDecorate %38 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %52 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
+OpDecorate %47 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
 OpDecorate %62 RelaxedPrecision
-OpDecorate %63 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
 OpDecorate %73 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
-OpDecorate %85 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
 OpDecorate %100 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
-OpDecorate %124 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
 OpDecorate %127 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
+OpDecorate %137 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
+OpDecorate %141 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -56,26 +66,23 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_n1_25 = OpConstant %float -1.25
+%float_0 = OpConstant %float 0
+%float_0_5 = OpConstant %float 0.5
+%25 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_5 %float_0_5
+%float_1 = OpConstant %float 1
+%28 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0 %float_1
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_0_5 = OpConstant %float 0.5
-%float_n1_25 = OpConstant %float -1.25
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%40 = OpConstantComposite %v2float %float_n1_25 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%53 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0_5
 %v3bool = OpTypeVector %bool 3
-%64 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_5 %float_0_5
 %v4bool = OpTypeVector %bool 4
 %int_1 = OpConstant %int 1
-%102 = OpConstantComposite %v3float %float_n1_25 %float_0 %float_0
-%float_1 = OpConstant %float 1
-%114 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0 %float_1
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
@@ -85,120 +92,138 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%118 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 FMin %27 %float_0_5
-%30 = OpFOrdEqual %bool %21 %float_n1_25
-OpSelectionMerge %32 None
-OpBranchConditional %30 %31 %32
-%31 = OpLabel
-%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%35 = OpLoad %v4float %34
-%36 = OpVectorShuffle %v2float %35 %35 0 1
-%38 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
-%33 = OpExtInst %v2float %1 FMin %36 %38
-%41 = OpFOrdEqual %v2bool %33 %40
-%43 = OpAll %bool %41
-OpBranch %32
-%32 = OpLabel
-%44 = OpPhi %bool %false %19 %43 %31
-OpSelectionMerge %46 None
-OpBranchConditional %44 %45 %46
-%45 = OpLabel
-%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%49 = OpLoad %v4float %48
-%50 = OpVectorShuffle %v3float %49 %49 0 1 2
-%52 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
-%47 = OpExtInst %v3float %1 FMin %50 %52
-%54 = OpFOrdEqual %v3bool %47 %53
-%56 = OpAll %bool %54
-OpBranch %46
-%46 = OpLabel
-%57 = OpPhi %bool %false %32 %56 %45
-OpSelectionMerge %59 None
-OpBranchConditional %57 %58 %59
-%58 = OpLabel
-%61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%62 = OpLoad %v4float %61
-%63 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
-%60 = OpExtInst %v4float %1 FMin %62 %63
-%65 = OpFOrdEqual %v4bool %60 %64
-%67 = OpAll %bool %65
-OpBranch %59
-%59 = OpLabel
-%68 = OpPhi %bool %false %46 %67 %58
-OpSelectionMerge %70 None
-OpBranchConditional %68 %69 %70
+%expectedA = OpVariable %_ptr_Function_v4float Function
+%expectedB = OpVariable %_ptr_Function_v4float Function
+%132 = OpVariable %_ptr_Function_v4float Function
+OpStore %expectedA %25
+OpStore %expectedB %28
+%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%35 = OpLoad %v4float %31
+%36 = OpCompositeExtract %float %35 0
+%30 = OpExtInst %float %1 FMin %36 %float_0_5
+%37 = OpLoad %v4float %expectedA
+%38 = OpCompositeExtract %float %37 0
+%39 = OpFOrdEqual %bool %30 %38
+OpSelectionMerge %41 None
+OpBranchConditional %39 %40 %41
+%40 = OpLabel
+%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%44 = OpLoad %v4float %43
+%45 = OpVectorShuffle %v2float %44 %44 0 1
+%47 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
+%42 = OpExtInst %v2float %1 FMin %45 %47
+%48 = OpLoad %v4float %expectedA
+%49 = OpVectorShuffle %v2float %48 %48 0 1
+%50 = OpFOrdEqual %v2bool %42 %49
+%52 = OpAll %bool %50
+OpBranch %41
+%41 = OpLabel
+%53 = OpPhi %bool %false %19 %52 %40
+OpSelectionMerge %55 None
+OpBranchConditional %53 %54 %55
+%54 = OpLabel
+%57 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%58 = OpLoad %v4float %57
+%59 = OpVectorShuffle %v3float %58 %58 0 1 2
+%61 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
+%56 = OpExtInst %v3float %1 FMin %59 %61
+%62 = OpLoad %v4float %expectedA
+%63 = OpVectorShuffle %v3float %62 %62 0 1 2
+%64 = OpFOrdEqual %v3bool %56 %63
+%66 = OpAll %bool %64
+OpBranch %55
+%55 = OpLabel
+%67 = OpPhi %bool %false %41 %66 %54
+OpSelectionMerge %69 None
+OpBranchConditional %67 %68 %69
+%68 = OpLabel
+%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%72 = OpLoad %v4float %71
+%73 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
+%70 = OpExtInst %v4float %1 FMin %72 %73
+%74 = OpLoad %v4float %expectedA
+%75 = OpFOrdEqual %v4bool %70 %74
+%77 = OpAll %bool %75
+OpBranch %69
 %69 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%73 = OpLoad %v4float %72
-%74 = OpCompositeExtract %float %73 0
-%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%77 = OpLoad %v4float %75
-%78 = OpCompositeExtract %float %77 0
-%71 = OpExtInst %float %1 FMin %74 %78
-%79 = OpFOrdEqual %bool %71 %float_n1_25
-OpBranch %70
-%70 = OpLabel
-%80 = OpPhi %bool %false %59 %79 %69
-OpSelectionMerge %82 None
-OpBranchConditional %80 %81 %82
-%81 = OpLabel
-%84 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%85 = OpLoad %v4float %84
-%86 = OpVectorShuffle %v2float %85 %85 0 1
-%87 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%88 = OpLoad %v4float %87
-%89 = OpVectorShuffle %v2float %88 %88 0 1
-%83 = OpExtInst %v2float %1 FMin %86 %89
-%90 = OpFOrdEqual %v2bool %83 %40
-%91 = OpAll %bool %90
-OpBranch %82
-%82 = OpLabel
-%92 = OpPhi %bool %false %70 %91 %81
+%78 = OpPhi %bool %false %55 %77 %68
+OpSelectionMerge %80 None
+OpBranchConditional %78 %79 %80
+%79 = OpLabel
+%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%83 = OpLoad %v4float %82
+%84 = OpCompositeExtract %float %83 0
+%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%87 = OpLoad %v4float %85
+%88 = OpCompositeExtract %float %87 0
+%81 = OpExtInst %float %1 FMin %84 %88
+%89 = OpLoad %v4float %expectedB
+%90 = OpCompositeExtract %float %89 0
+%91 = OpFOrdEqual %bool %81 %90
+OpBranch %80
+%80 = OpLabel
+%92 = OpPhi %bool %false %69 %91 %79
 OpSelectionMerge %94 None
 OpBranchConditional %92 %93 %94
 %93 = OpLabel
 %96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %97 = OpLoad %v4float %96
-%98 = OpVectorShuffle %v3float %97 %97 0 1 2
+%98 = OpVectorShuffle %v2float %97 %97 0 1
 %99 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
 %100 = OpLoad %v4float %99
-%101 = OpVectorShuffle %v3float %100 %100 0 1 2
-%95 = OpExtInst %v3float %1 FMin %98 %101
-%103 = OpFOrdEqual %v3bool %95 %102
-%104 = OpAll %bool %103
+%101 = OpVectorShuffle %v2float %100 %100 0 1
+%95 = OpExtInst %v2float %1 FMin %98 %101
+%102 = OpLoad %v4float %expectedB
+%103 = OpVectorShuffle %v2float %102 %102 0 1
+%104 = OpFOrdEqual %v2bool %95 %103
+%105 = OpAll %bool %104
 OpBranch %94
 %94 = OpLabel
-%105 = OpPhi %bool %false %82 %104 %93
-OpSelectionMerge %107 None
-OpBranchConditional %105 %106 %107
-%106 = OpLabel
-%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%110 = OpLoad %v4float %109
-%111 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%112 = OpLoad %v4float %111
-%108 = OpExtInst %v4float %1 FMin %110 %112
-%115 = OpFOrdEqual %v4bool %108 %114
-%116 = OpAll %bool %115
-OpBranch %107
+%106 = OpPhi %bool %false %80 %105 %93
+OpSelectionMerge %108 None
+OpBranchConditional %106 %107 %108
 %107 = OpLabel
-%117 = OpPhi %bool %false %94 %116 %106
+%110 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%111 = OpLoad %v4float %110
+%112 = OpVectorShuffle %v3float %111 %111 0 1 2
+%113 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%114 = OpLoad %v4float %113
+%115 = OpVectorShuffle %v3float %114 %114 0 1 2
+%109 = OpExtInst %v3float %1 FMin %112 %115
+%116 = OpLoad %v4float %expectedB
+%117 = OpVectorShuffle %v3float %116 %116 0 1 2
+%118 = OpFOrdEqual %v3bool %109 %117
+%119 = OpAll %bool %118
+OpBranch %108
+%108 = OpLabel
+%120 = OpPhi %bool %false %94 %119 %107
 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
+OpBranchConditional %120 %121 %122
 %121 = OpLabel
-%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%127 = OpLoad %v4float %125
-OpStore %118 %127
+%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%125 = OpLoad %v4float %124
+%126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%127 = OpLoad %v4float %126
+%123 = OpExtInst %v4float %1 FMin %125 %127
+%128 = OpLoad %v4float %expectedB
+%129 = OpFOrdEqual %v4bool %123 %128
+%130 = OpAll %bool %129
 OpBranch %122
 %122 = OpLabel
-%128 = OpLoad %v4float %118
-OpReturnValue %128
+%131 = OpPhi %bool %false %108 %130 %121
+OpSelectionMerge %135 None
+OpBranchConditional %131 %133 %134
+%133 = OpLabel
+%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%137 = OpLoad %v4float %136
+OpStore %132 %137
+OpBranch %135
+%134 = OpLabel
+%138 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%140 = OpLoad %v4float %138
+OpStore %132 %140
+OpBranch %135
+%135 = OpLabel
+%141 = OpLoad %v4float %132
+OpReturnValue %141
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MinFloat.glsl b/tests/sksl/intrinsics/MinFloat.glsl
index e3f0aa4..fbbd7f2 100644
--- a/tests/sksl/intrinsics/MinFloat.glsl
+++ b/tests/sksl/intrinsics/MinFloat.glsl
@@ -4,5 +4,7 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((((((min(testInputs.x, 0.5) == -1.25 && min(testInputs.xy, 0.5) == vec2(-1.25, 0.0)) && min(testInputs.xyz, 0.5) == vec3(-1.25, 0.0, 0.5)) && min(testInputs, 0.5) == vec4(-1.25, 0.0, 0.5, 0.5)) && min(testInputs.x, colorGreen.x) == -1.25) && min(testInputs.xy, colorGreen.xy) == vec2(-1.25, 0.0)) && min(testInputs.xyz, colorGreen.xyz) == vec3(-1.25, 0.0, 0.0)) && min(testInputs, colorGreen) == vec4(-1.25, 0.0, 0.0, 1.0) ? colorGreen : colorRed;
+    vec4 expectedA = vec4(-1.25, 0.0, 0.5, 0.5);
+    vec4 expectedB = vec4(-1.25, 0.0, 0.0, 1.0);
+    return ((((((min(testInputs.x, 0.5) == expectedA.x && min(testInputs.xy, 0.5) == expectedA.xy) && min(testInputs.xyz, 0.5) == expectedA.xyz) && min(testInputs, 0.5) == expectedA) && min(testInputs.x, colorGreen.x) == expectedB.x) && min(testInputs.xy, colorGreen.xy) == expectedB.xy) && min(testInputs.xyz, colorGreen.xyz) == expectedB.xyz) && min(testInputs, colorGreen) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MinFloat.metal b/tests/sksl/intrinsics/MinFloat.metal
index 99d0956..c18f075 100644
--- a/tests/sksl/intrinsics/MinFloat.metal
+++ b/tests/sksl/intrinsics/MinFloat.metal
@@ -17,6 +17,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((((((min(_uniforms.testInputs.x, 0.5) == -1.25 && all(min(_uniforms.testInputs.xy, 0.5) == float2(-1.25, 0.0))) && all(min(_uniforms.testInputs.xyz, 0.5) == float3(-1.25, 0.0, 0.5))) && all(min(_uniforms.testInputs, 0.5) == float4(-1.25, 0.0, 0.5, 0.5))) && min(_uniforms.testInputs.x, _uniforms.colorGreen.x) == -1.25) && all(min(_uniforms.testInputs.xy, _uniforms.colorGreen.xy) == float2(-1.25, 0.0))) && all(min(_uniforms.testInputs.xyz, _uniforms.colorGreen.xyz) == float3(-1.25, 0.0, 0.0))) && all(min(_uniforms.testInputs, _uniforms.colorGreen) == float4(-1.25, 0.0, 0.0, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expectedA = float4(-1.25, 0.0, 0.5, 0.5);
+    float4 expectedB = float4(-1.25, 0.0, 0.0, 1.0);
+    _out.sk_FragColor = ((((((min(_uniforms.testInputs.x, 0.5) == expectedA.x && all(min(_uniforms.testInputs.xy, 0.5) == expectedA.xy)) && all(min(_uniforms.testInputs.xyz, 0.5) == expectedA.xyz)) && all(min(_uniforms.testInputs, 0.5) == expectedA)) && min(_uniforms.testInputs.x, _uniforms.colorGreen.x) == expectedB.x) && all(min(_uniforms.testInputs.xy, _uniforms.colorGreen.xy) == expectedB.xy)) && all(min(_uniforms.testInputs.xyz, _uniforms.colorGreen.xyz) == expectedB.xyz)) && all(min(_uniforms.testInputs, _uniforms.colorGreen) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/MinInt.asm.frag b/tests/sksl/intrinsics/MinInt.asm.frag
index 153ad1b..aae81d3 100644
--- a/tests/sksl/intrinsics/MinInt.asm.frag
+++ b/tests/sksl/intrinsics/MinInt.asm.frag
@@ -13,6 +13,8 @@
 OpName %main "main"
 OpName %intValues "intValues"
 OpName %intGreen "intGreen"
+OpName %expectedA "expectedA"
+OpName %expectedB "expectedB"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -29,9 +31,9 @@
 OpDecorate %10 DescriptorSet 0
 OpDecorate %27 RelaxedPrecision
 OpDecorate %42 RelaxedPrecision
-OpDecorate %140 RelaxedPrecision
-OpDecorate %143 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
+OpDecorate %156 RelaxedPrecision
+OpDecorate %157 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -52,20 +54,17 @@
 %int_0 = OpConstant %int 0
 %float_100 = OpConstant %float 100
 %int_1 = OpConstant %int 1
-%false = OpConstantFalse %bool
-%int_50 = OpConstant %int 50
 %int_n125 = OpConstant %int -125
+%int_50 = OpConstant %int 50
+%56 = OpConstantComposite %v4int %int_n125 %int_0 %int_50 %int_50
+%int_100 = OpConstant %int 100
+%59 = OpConstantComposite %v4int %int_n125 %int_0 %int_0 %int_100
+%false = OpConstantFalse %bool
 %v2int = OpTypeVector %int 2
-%67 = OpConstantComposite %v2int %int_n125 %int_0
 %v2bool = OpTypeVector %bool 2
 %v3int = OpTypeVector %int 3
-%79 = OpConstantComposite %v3int %int_n125 %int_0 %int_50
 %v3bool = OpTypeVector %bool 3
-%89 = OpConstantComposite %v4int %int_n125 %int_0 %int_50 %int_50
 %v4bool = OpTypeVector %bool 4
-%120 = OpConstantComposite %v3int %int_n125 %int_0 %int_0
-%int_100 = OpConstant %int 100
-%130 = OpConstantComposite %v4int %int_n125 %int_0 %int_0 %int_100
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -78,7 +77,9 @@
 %19 = OpLabel
 %intValues = OpVariable %_ptr_Function_v4int Function
 %intGreen = OpVariable %_ptr_Function_v4int Function
-%134 = OpVariable %_ptr_Function_v4float Function
+%expectedA = OpVariable %_ptr_Function_v4int Function
+%expectedB = OpVariable %_ptr_Function_v4int Function
+%147 = OpVariable %_ptr_Function_v4float Function
 %24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %27 = OpLoad %v4float %24
 %29 = OpVectorTimesScalar %v4float %27 %float_100
@@ -105,107 +106,123 @@
 %51 = OpConvertFToS %int %50
 %52 = OpCompositeConstruct %v4int %45 %47 %49 %51
 OpStore %intGreen %52
-%55 = OpLoad %v4int %intValues
-%56 = OpCompositeExtract %int %55 0
-%54 = OpExtInst %int %1 SMin %56 %int_50
-%59 = OpIEqual %bool %54 %int_n125
-OpSelectionMerge %61 None
-OpBranchConditional %59 %60 %61
-%60 = OpLabel
-%63 = OpLoad %v4int %intValues
-%64 = OpVectorShuffle %v2int %63 %63 0 1
-%66 = OpCompositeConstruct %v2int %int_50 %int_50
-%62 = OpExtInst %v2int %1 SMin %64 %66
-%68 = OpIEqual %v2bool %62 %67
-%70 = OpAll %bool %68
-OpBranch %61
-%61 = OpLabel
-%71 = OpPhi %bool %false %19 %70 %60
-OpSelectionMerge %73 None
-OpBranchConditional %71 %72 %73
-%72 = OpLabel
-%75 = OpLoad %v4int %intValues
-%76 = OpVectorShuffle %v3int %75 %75 0 1 2
-%78 = OpCompositeConstruct %v3int %int_50 %int_50 %int_50
-%74 = OpExtInst %v3int %1 SMin %76 %78
-%80 = OpIEqual %v3bool %74 %79
-%82 = OpAll %bool %80
-OpBranch %73
-%73 = OpLabel
-%83 = OpPhi %bool %false %61 %82 %72
-OpSelectionMerge %85 None
-OpBranchConditional %83 %84 %85
-%84 = OpLabel
-%87 = OpLoad %v4int %intValues
-%88 = OpCompositeConstruct %v4int %int_50 %int_50 %int_50 %int_50
-%86 = OpExtInst %v4int %1 SMin %87 %88
-%90 = OpIEqual %v4bool %86 %89
-%92 = OpAll %bool %90
-OpBranch %85
-%85 = OpLabel
-%93 = OpPhi %bool %false %73 %92 %84
-OpSelectionMerge %95 None
-OpBranchConditional %93 %94 %95
+OpStore %expectedA %56
+OpStore %expectedB %59
+%62 = OpLoad %v4int %intValues
+%63 = OpCompositeExtract %int %62 0
+%61 = OpExtInst %int %1 SMin %63 %int_50
+%64 = OpLoad %v4int %expectedA
+%65 = OpCompositeExtract %int %64 0
+%66 = OpIEqual %bool %61 %65
+OpSelectionMerge %68 None
+OpBranchConditional %66 %67 %68
+%67 = OpLabel
+%70 = OpLoad %v4int %intValues
+%71 = OpVectorShuffle %v2int %70 %70 0 1
+%73 = OpCompositeConstruct %v2int %int_50 %int_50
+%69 = OpExtInst %v2int %1 SMin %71 %73
+%74 = OpLoad %v4int %expectedA
+%75 = OpVectorShuffle %v2int %74 %74 0 1
+%76 = OpIEqual %v2bool %69 %75
+%78 = OpAll %bool %76
+OpBranch %68
+%68 = OpLabel
+%79 = OpPhi %bool %false %19 %78 %67
+OpSelectionMerge %81 None
+OpBranchConditional %79 %80 %81
+%80 = OpLabel
+%83 = OpLoad %v4int %intValues
+%84 = OpVectorShuffle %v3int %83 %83 0 1 2
+%86 = OpCompositeConstruct %v3int %int_50 %int_50 %int_50
+%82 = OpExtInst %v3int %1 SMin %84 %86
+%87 = OpLoad %v4int %expectedA
+%88 = OpVectorShuffle %v3int %87 %87 0 1 2
+%89 = OpIEqual %v3bool %82 %88
+%91 = OpAll %bool %89
+OpBranch %81
+%81 = OpLabel
+%92 = OpPhi %bool %false %68 %91 %80
+OpSelectionMerge %94 None
+OpBranchConditional %92 %93 %94
+%93 = OpLabel
+%96 = OpLoad %v4int %intValues
+%97 = OpCompositeConstruct %v4int %int_50 %int_50 %int_50 %int_50
+%95 = OpExtInst %v4int %1 SMin %96 %97
+%98 = OpLoad %v4int %expectedA
+%99 = OpIEqual %v4bool %95 %98
+%101 = OpAll %bool %99
+OpBranch %94
 %94 = OpLabel
-%97 = OpLoad %v4int %intValues
-%98 = OpCompositeExtract %int %97 0
-%99 = OpLoad %v4int %intGreen
-%100 = OpCompositeExtract %int %99 0
-%96 = OpExtInst %int %1 SMin %98 %100
-%101 = OpIEqual %bool %96 %int_n125
-OpBranch %95
-%95 = OpLabel
-%102 = OpPhi %bool %false %85 %101 %94
+%102 = OpPhi %bool %false %81 %101 %93
 OpSelectionMerge %104 None
 OpBranchConditional %102 %103 %104
 %103 = OpLabel
 %106 = OpLoad %v4int %intValues
-%107 = OpVectorShuffle %v2int %106 %106 0 1
+%107 = OpCompositeExtract %int %106 0
 %108 = OpLoad %v4int %intGreen
-%109 = OpVectorShuffle %v2int %108 %108 0 1
-%105 = OpExtInst %v2int %1 SMin %107 %109
-%110 = OpIEqual %v2bool %105 %67
-%111 = OpAll %bool %110
+%109 = OpCompositeExtract %int %108 0
+%105 = OpExtInst %int %1 SMin %107 %109
+%110 = OpLoad %v4int %expectedB
+%111 = OpCompositeExtract %int %110 0
+%112 = OpIEqual %bool %105 %111
 OpBranch %104
 %104 = OpLabel
-%112 = OpPhi %bool %false %95 %111 %103
-OpSelectionMerge %114 None
-OpBranchConditional %112 %113 %114
-%113 = OpLabel
-%116 = OpLoad %v4int %intValues
-%117 = OpVectorShuffle %v3int %116 %116 0 1 2
-%118 = OpLoad %v4int %intGreen
-%119 = OpVectorShuffle %v3int %118 %118 0 1 2
-%115 = OpExtInst %v3int %1 SMin %117 %119
-%121 = OpIEqual %v3bool %115 %120
-%122 = OpAll %bool %121
-OpBranch %114
+%113 = OpPhi %bool %false %94 %112 %103
+OpSelectionMerge %115 None
+OpBranchConditional %113 %114 %115
 %114 = OpLabel
-%123 = OpPhi %bool %false %104 %122 %113
-OpSelectionMerge %125 None
-OpBranchConditional %123 %124 %125
-%124 = OpLabel
-%127 = OpLoad %v4int %intValues
-%128 = OpLoad %v4int %intGreen
-%126 = OpExtInst %v4int %1 SMin %127 %128
-%131 = OpIEqual %v4bool %126 %130
-%132 = OpAll %bool %131
-OpBranch %125
-%125 = OpLabel
-%133 = OpPhi %bool %false %114 %132 %124
-OpSelectionMerge %138 None
-OpBranchConditional %133 %136 %137
-%136 = OpLabel
-%139 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%140 = OpLoad %v4float %139
-OpStore %134 %140
-OpBranch %138
-%137 = OpLabel
-%141 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%143 = OpLoad %v4float %141
-OpStore %134 %143
-OpBranch %138
+%117 = OpLoad %v4int %intValues
+%118 = OpVectorShuffle %v2int %117 %117 0 1
+%119 = OpLoad %v4int %intGreen
+%120 = OpVectorShuffle %v2int %119 %119 0 1
+%116 = OpExtInst %v2int %1 SMin %118 %120
+%121 = OpLoad %v4int %expectedB
+%122 = OpVectorShuffle %v2int %121 %121 0 1
+%123 = OpIEqual %v2bool %116 %122
+%124 = OpAll %bool %123
+OpBranch %115
+%115 = OpLabel
+%125 = OpPhi %bool %false %104 %124 %114
+OpSelectionMerge %127 None
+OpBranchConditional %125 %126 %127
+%126 = OpLabel
+%129 = OpLoad %v4int %intValues
+%130 = OpVectorShuffle %v3int %129 %129 0 1 2
+%131 = OpLoad %v4int %intGreen
+%132 = OpVectorShuffle %v3int %131 %131 0 1 2
+%128 = OpExtInst %v3int %1 SMin %130 %132
+%133 = OpLoad %v4int %expectedB
+%134 = OpVectorShuffle %v3int %133 %133 0 1 2
+%135 = OpIEqual %v3bool %128 %134
+%136 = OpAll %bool %135
+OpBranch %127
+%127 = OpLabel
+%137 = OpPhi %bool %false %115 %136 %126
+OpSelectionMerge %139 None
+OpBranchConditional %137 %138 %139
 %138 = OpLabel
-%144 = OpLoad %v4float %134
-OpReturnValue %144
+%141 = OpLoad %v4int %intValues
+%142 = OpLoad %v4int %intGreen
+%140 = OpExtInst %v4int %1 SMin %141 %142
+%143 = OpLoad %v4int %expectedB
+%144 = OpIEqual %v4bool %140 %143
+%145 = OpAll %bool %144
+OpBranch %139
+%139 = OpLabel
+%146 = OpPhi %bool %false %127 %145 %138
+OpSelectionMerge %151 None
+OpBranchConditional %146 %149 %150
+%149 = OpLabel
+%152 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%153 = OpLoad %v4float %152
+OpStore %147 %153
+OpBranch %151
+%150 = OpLabel
+%154 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%156 = OpLoad %v4float %154
+OpStore %147 %156
+OpBranch %151
+%151 = OpLabel
+%157 = OpLoad %v4float %147
+OpReturnValue %157
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MinInt.glsl b/tests/sksl/intrinsics/MinInt.glsl
index 369a8b8..8437132 100644
--- a/tests/sksl/intrinsics/MinInt.glsl
+++ b/tests/sksl/intrinsics/MinInt.glsl
@@ -6,5 +6,7 @@
 vec4 main() {
     ivec4 intValues = ivec4(testInputs * 100.0);
     ivec4 intGreen = ivec4(colorGreen * 100.0);
-    return ((((((min(intValues.x, 50) == -125 && min(intValues.xy, 50) == ivec2(-125, 0)) && min(intValues.xyz, 50) == ivec3(-125, 0, 50)) && min(intValues, 50) == ivec4(-125, 0, 50, 50)) && min(intValues.x, intGreen.x) == -125) && min(intValues.xy, intGreen.xy) == ivec2(-125, 0)) && min(intValues.xyz, intGreen.xyz) == ivec3(-125, 0, 0)) && min(intValues, intGreen) == ivec4(-125, 0, 0, 100) ? colorGreen : colorRed;
+    ivec4 expectedA = ivec4(-125, 0, 50, 50);
+    ivec4 expectedB = ivec4(-125, 0, 0, 100);
+    return ((((((min(intValues.x, 50) == expectedA.x && min(intValues.xy, 50) == expectedA.xy) && min(intValues.xyz, 50) == expectedA.xyz) && min(intValues, 50) == expectedA) && min(intValues.x, intGreen.x) == expectedB.x) && min(intValues.xy, intGreen.xy) == expectedB.xy) && min(intValues.xyz, intGreen.xyz) == expectedB.xyz) && min(intValues, intGreen) == expectedB ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MinInt.metal b/tests/sksl/intrinsics/MinInt.metal
index 964177e..a76dd41 100644
--- a/tests/sksl/intrinsics/MinInt.metal
+++ b/tests/sksl/intrinsics/MinInt.metal
@@ -19,6 +19,8 @@
     (void)_out;
     int4 intValues = int4(_uniforms.testInputs * 100.0);
     int4 intGreen = int4(_uniforms.colorGreen * 100.0);
-    _out.sk_FragColor = ((((((min(intValues.x, 50) == -125 && all(min(intValues.xy, 50) == int2(-125, 0))) && all(min(intValues.xyz, 50) == int3(-125, 0, 50))) && all(min(intValues, 50) == int4(-125, 0, 50, 50))) && min(intValues.x, intGreen.x) == -125) && all(min(intValues.xy, intGreen.xy) == int2(-125, 0))) && all(min(intValues.xyz, intGreen.xyz) == int3(-125, 0, 0))) && all(min(intValues, intGreen) == int4(-125, 0, 0, 100)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    int4 expectedA = int4(-125, 0, 50, 50);
+    int4 expectedB = int4(-125, 0, 0, 100);
+    _out.sk_FragColor = ((((((min(intValues.x, 50) == expectedA.x && all(min(intValues.xy, 50) == expectedA.xy)) && all(min(intValues.xyz, 50) == expectedA.xyz)) && all(min(intValues, 50) == expectedA)) && min(intValues.x, intGreen.x) == expectedB.x) && all(min(intValues.xy, intGreen.xy) == expectedB.xy)) && all(min(intValues.xyz, intGreen.xyz) == expectedB.xyz)) && all(min(intValues, intGreen) == expectedB) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/MixFloat.asm.frag b/tests/sksl/intrinsics/MixFloat.asm.frag
index e2d7893..5e1401d 100644
--- a/tests/sksl/intrinsics/MixFloat.asm.frag
+++ b/tests/sksl/intrinsics/MixFloat.asm.frag
@@ -13,6 +13,8 @@
 OpMemberName %_UniformBuffer 4 "testInputs"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expectedBW "expectedBW"
+OpName %expectedWT "expectedWT"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -31,40 +33,48 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
-OpDecorate %43 RelaxedPrecision
-OpDecorate %45 RelaxedPrecision
-OpDecorate %55 RelaxedPrecision
-OpDecorate %57 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
-OpDecorate %67 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %70 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %84 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %50 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
+OpDecorate %62 RelaxedPrecision
+OpDecorate %64 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
+OpDecorate %77 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
 OpDecorate %93 RelaxedPrecision
-OpDecorate %97 RelaxedPrecision
-OpDecorate %99 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
 OpDecorate %125 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
+OpDecorate %135 RelaxedPrecision
 OpDecorate %137 RelaxedPrecision
-OpDecorate %141 RelaxedPrecision
-OpDecorate %149 RelaxedPrecision
-OpDecorate %152 RelaxedPrecision
-OpDecorate %163 RelaxedPrecision
-OpDecorate %166 RelaxedPrecision
-OpDecorate %177 RelaxedPrecision
+OpDecorate %138 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
+OpDecorate %151 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
+OpDecorate %161 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
+OpDecorate %167 RelaxedPrecision
+OpDecorate %176 RelaxedPrecision
 OpDecorate %179 RelaxedPrecision
-OpDecorate %192 RelaxedPrecision
-OpDecorate %194 RelaxedPrecision
+OpDecorate %182 RelaxedPrecision
+OpDecorate %191 RelaxedPrecision
+OpDecorate %193 RelaxedPrecision
 OpDecorate %195 RelaxedPrecision
+OpDecorate %204 RelaxedPrecision
+OpDecorate %206 RelaxedPrecision
+OpDecorate %207 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -78,39 +88,35 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_0_5 = OpConstant %float 0.5
+%float_1 = OpConstant %float 1
+%24 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1
+%float_2_25 = OpConstant %float 2.25
+%27 = OpConstantComposite %v4float %float_1 %float_0_5 %float_1 %float_2_25
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %int_1 = OpConstant %int 1
 %float_0 = OpConstant %float 0
-%float_1 = OpConstant %float 1
-%33 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%40 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
 %v4bool = OpTypeVector %bool 4
 %float_0_25 = OpConstant %float 0.25
 %float_0_75 = OpConstant %float 0.75
-%47 = OpConstantComposite %v4float %float_0_25 %float_0_75 %float_0 %float_1
-%59 = OpConstantComposite %v4float %float_0_75 %float_0_25 %float_0 %float_1
-%71 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+%54 = OpConstantComposite %v4float %float_0_25 %float_0_75 %float_0 %float_1
+%66 = OpConstantComposite %v4float %float_0_75 %float_0_25 %float_0 %float_1
+%78 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
-%float_0_5 = OpConstant %float 0.5
 %v2float = OpTypeVector %float 2
-%100 = OpConstantComposite %v2float %float_0_5 %float_0_5
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%116 = OpConstantComposite %v3float %float_0_5 %float_0_5 %float_0_5
 %v3bool = OpTypeVector %bool 3
-%129 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1
 %int_4 = OpConstant %int 4
-%154 = OpConstantComposite %v2float %float_0 %float_0_5
-%155 = OpConstantComposite %v2float %float_1 %float_0_5
-%168 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0
-%169 = OpConstantComposite %v3float %float_1 %float_0_5 %float_1
-%180 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1
-%float_2_25 = OpConstant %float 2.25
-%182 = OpConstantComposite %v4float %float_1 %float_0_5 %float_1 %float_2_25
-%_ptr_Function_v4float = OpTypePointer Function %v4float
+%166 = OpConstantComposite %v2float %float_0 %float_0_5
+%181 = OpConstantComposite %v3float %float_0 %float_0_5 %float_0
+%194 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -119,187 +125,205 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%186 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%29 = OpLoad %v4float %27
-%31 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_0
-%21 = OpExtInst %v4float %1 FMix %26 %29 %31
-%34 = OpFOrdEqual %v4bool %21 %33
-%36 = OpAll %bool %34
-OpSelectionMerge %38 None
-OpBranchConditional %36 %37 %38
-%37 = OpLabel
-%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%41 = OpLoad %v4float %40
-%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%43 = OpLoad %v4float %42
-%45 = OpCompositeConstruct %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25
-%39 = OpExtInst %v4float %1 FMix %41 %43 %45
-%48 = OpFOrdEqual %v4bool %39 %47
-%49 = OpAll %bool %48
-OpBranch %38
-%38 = OpLabel
-%50 = OpPhi %bool %false %19 %49 %37
-OpSelectionMerge %52 None
-OpBranchConditional %50 %51 %52
-%51 = OpLabel
-%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%55 = OpLoad %v4float %54
-%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%57 = OpLoad %v4float %56
-%58 = OpCompositeConstruct %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75
-%53 = OpExtInst %v4float %1 FMix %55 %57 %58
-%60 = OpFOrdEqual %v4bool %53 %59
-%61 = OpAll %bool %60
-OpBranch %52
-%52 = OpLabel
-%62 = OpPhi %bool %false %38 %61 %51
-OpSelectionMerge %64 None
-OpBranchConditional %62 %63 %64
-%63 = OpLabel
-%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%67 = OpLoad %v4float %66
-%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%69 = OpLoad %v4float %68
-%70 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
-%65 = OpExtInst %v4float %1 FMix %67 %69 %70
-%72 = OpFOrdEqual %v4bool %65 %71
-%73 = OpAll %bool %72
-OpBranch %64
-%64 = OpLabel
-%74 = OpPhi %bool %false %52 %73 %63
-OpSelectionMerge %76 None
-OpBranchConditional %74 %75 %76
-%75 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%80 = OpLoad %v4float %78
-%81 = OpCompositeExtract %float %80 0
-%82 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%84 = OpLoad %v4float %82
-%85 = OpCompositeExtract %float %84 0
-%77 = OpExtInst %float %1 FMix %81 %85 %float_0_5
-%87 = OpFOrdEqual %bool %77 %float_0_5
-OpBranch %76
-%76 = OpLabel
-%88 = OpPhi %bool %false %64 %87 %75
-OpSelectionMerge %90 None
-OpBranchConditional %88 %89 %90
-%89 = OpLabel
-%92 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%93 = OpLoad %v4float %92
-%94 = OpVectorShuffle %v2float %93 %93 0 1
-%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%97 = OpLoad %v4float %96
-%98 = OpVectorShuffle %v2float %97 %97 0 1
-%99 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
-%91 = OpExtInst %v2float %1 FMix %94 %98 %99
-%101 = OpFOrdEqual %v2bool %91 %100
-%103 = OpAll %bool %101
-OpBranch %90
-%90 = OpLabel
-%104 = OpPhi %bool %false %76 %103 %89
-OpSelectionMerge %106 None
-OpBranchConditional %104 %105 %106
-%105 = OpLabel
-%108 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%109 = OpLoad %v4float %108
-%110 = OpVectorShuffle %v3float %109 %109 0 1 2
-%112 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%113 = OpLoad %v4float %112
-%114 = OpVectorShuffle %v3float %113 %113 0 1 2
-%115 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
-%107 = OpExtInst %v3float %1 FMix %110 %114 %115
-%117 = OpFOrdEqual %v3bool %107 %116
-%119 = OpAll %bool %117
-OpBranch %106
-%106 = OpLabel
-%120 = OpPhi %bool %false %90 %119 %105
-OpSelectionMerge %122 None
-OpBranchConditional %120 %121 %122
-%121 = OpLabel
-%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%125 = OpLoad %v4float %124
-%126 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%127 = OpLoad %v4float %126
-%128 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
-%123 = OpExtInst %v4float %1 FMix %125 %127 %128
-%130 = OpFOrdEqual %v4bool %123 %129
-%131 = OpAll %bool %130
-OpBranch %122
-%122 = OpLabel
-%132 = OpPhi %bool %false %106 %131 %121
-OpSelectionMerge %134 None
-OpBranchConditional %132 %133 %134
-%133 = OpLabel
+%expectedBW = OpVariable %_ptr_Function_v4float Function
+%expectedWT = OpVariable %_ptr_Function_v4float Function
+%199 = OpVariable %_ptr_Function_v4float Function
+OpStore %expectedBW %24
+OpStore %expectedWT %27
+%30 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%34 = OpLoad %v4float %30
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%37 = OpLoad %v4float %35
+%39 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_0
+%29 = OpExtInst %v4float %1 FMix %34 %37 %39
+%41 = OpFOrdEqual %v4bool %29 %40
+%43 = OpAll %bool %41
+OpSelectionMerge %45 None
+OpBranchConditional %43 %44 %45
+%44 = OpLabel
+%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%48 = OpLoad %v4float %47
+%49 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%50 = OpLoad %v4float %49
+%52 = OpCompositeConstruct %v4float %float_0_25 %float_0_25 %float_0_25 %float_0_25
+%46 = OpExtInst %v4float %1 FMix %48 %50 %52
+%55 = OpFOrdEqual %v4bool %46 %54
+%56 = OpAll %bool %55
+OpBranch %45
+%45 = OpLabel
+%57 = OpPhi %bool %false %19 %56 %44
+OpSelectionMerge %59 None
+OpBranchConditional %57 %58 %59
+%58 = OpLabel
+%61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%62 = OpLoad %v4float %61
+%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%64 = OpLoad %v4float %63
+%65 = OpCompositeConstruct %v4float %float_0_75 %float_0_75 %float_0_75 %float_0_75
+%60 = OpExtInst %v4float %1 FMix %62 %64 %65
+%67 = OpFOrdEqual %v4bool %60 %66
+%68 = OpAll %bool %67
+OpBranch %59
+%59 = OpLabel
+%69 = OpPhi %bool %false %45 %68 %58
+OpSelectionMerge %71 None
+OpBranchConditional %69 %70 %71
+%70 = OpLabel
+%73 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%74 = OpLoad %v4float %73
+%75 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%76 = OpLoad %v4float %75
+%77 = OpCompositeConstruct %v4float %float_1 %float_1 %float_1 %float_1
+%72 = OpExtInst %v4float %1 FMix %74 %76 %77
+%79 = OpFOrdEqual %v4bool %72 %78
+%80 = OpAll %bool %79
+OpBranch %71
+%71 = OpLabel
+%81 = OpPhi %bool %false %59 %80 %70
+OpSelectionMerge %83 None
+OpBranchConditional %81 %82 %83
+%82 = OpLabel
+%85 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%87 = OpLoad %v4float %85
+%88 = OpCompositeExtract %float %87 0
+%89 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%91 = OpLoad %v4float %89
+%92 = OpCompositeExtract %float %91 0
+%84 = OpExtInst %float %1 FMix %88 %92 %float_0_5
+%93 = OpLoad %v4float %expectedBW
+%94 = OpCompositeExtract %float %93 0
+%95 = OpFOrdEqual %bool %84 %94
+OpBranch %83
+%83 = OpLabel
+%96 = OpPhi %bool %false %71 %95 %82
+OpSelectionMerge %98 None
+OpBranchConditional %96 %97 %98
+%97 = OpLabel
+%100 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%101 = OpLoad %v4float %100
+%102 = OpVectorShuffle %v2float %101 %101 0 1
+%104 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%105 = OpLoad %v4float %104
+%106 = OpVectorShuffle %v2float %105 %105 0 1
+%107 = OpCompositeConstruct %v2float %float_0_5 %float_0_5
+%99 = OpExtInst %v2float %1 FMix %102 %106 %107
+%108 = OpLoad %v4float %expectedBW
+%109 = OpVectorShuffle %v2float %108 %108 0 1
+%110 = OpFOrdEqual %v2bool %99 %109
+%112 = OpAll %bool %110
+OpBranch %98
+%98 = OpLabel
+%113 = OpPhi %bool %false %83 %112 %97
+OpSelectionMerge %115 None
+OpBranchConditional %113 %114 %115
+%114 = OpLabel
+%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%118 = OpLoad %v4float %117
+%119 = OpVectorShuffle %v3float %118 %118 0 1 2
+%121 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%122 = OpLoad %v4float %121
+%123 = OpVectorShuffle %v3float %122 %122 0 1 2
+%124 = OpCompositeConstruct %v3float %float_0_5 %float_0_5 %float_0_5
+%116 = OpExtInst %v3float %1 FMix %119 %123 %124
+%125 = OpLoad %v4float %expectedBW
+%126 = OpVectorShuffle %v3float %125 %125 0 1 2
+%127 = OpFOrdEqual %v3bool %116 %126
+%129 = OpAll %bool %127
+OpBranch %115
+%115 = OpLabel
+%130 = OpPhi %bool %false %98 %129 %114
+OpSelectionMerge %132 None
+OpBranchConditional %130 %131 %132
+%131 = OpLabel
+%134 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%135 = OpLoad %v4float %134
 %136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
 %137 = OpLoad %v4float %136
-%138 = OpCompositeExtract %float %137 0
-%139 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
-%141 = OpLoad %v4float %139
-%142 = OpCompositeExtract %float %141 0
-%135 = OpExtInst %float %1 FMix %138 %142 %float_0
-%143 = OpFOrdEqual %bool %135 %float_1
-OpBranch %134
-%134 = OpLabel
-%144 = OpPhi %bool %false %122 %143 %133
-OpSelectionMerge %146 None
-OpBranchConditional %144 %145 %146
-%145 = OpLabel
-%148 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%149 = OpLoad %v4float %148
-%150 = OpVectorShuffle %v2float %149 %149 0 1
-%151 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
-%152 = OpLoad %v4float %151
-%153 = OpVectorShuffle %v2float %152 %152 0 1
-%147 = OpExtInst %v2float %1 FMix %150 %153 %154
-%156 = OpFOrdEqual %v2bool %147 %155
-%157 = OpAll %bool %156
-OpBranch %146
-%146 = OpLabel
-%158 = OpPhi %bool %false %134 %157 %145
-OpSelectionMerge %160 None
-OpBranchConditional %158 %159 %160
-%159 = OpLabel
-%162 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%163 = OpLoad %v4float %162
-%164 = OpVectorShuffle %v3float %163 %163 0 1 2
-%165 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
-%166 = OpLoad %v4float %165
-%167 = OpVectorShuffle %v3float %166 %166 0 1 2
-%161 = OpExtInst %v3float %1 FMix %164 %167 %168
-%170 = OpFOrdEqual %v3bool %161 %169
-%171 = OpAll %bool %170
-OpBranch %160
-%160 = OpLabel
-%172 = OpPhi %bool %false %146 %171 %159
-OpSelectionMerge %174 None
-OpBranchConditional %172 %173 %174
-%173 = OpLabel
-%176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
-%177 = OpLoad %v4float %176
+%138 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %float_0_5 %float_0_5
+%133 = OpExtInst %v4float %1 FMix %135 %137 %138
+%139 = OpLoad %v4float %expectedBW
+%140 = OpFOrdEqual %v4bool %133 %139
+%141 = OpAll %bool %140
+OpBranch %132
+%132 = OpLabel
+%142 = OpPhi %bool %false %115 %141 %131
+OpSelectionMerge %144 None
+OpBranchConditional %142 %143 %144
+%143 = OpLabel
+%146 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%147 = OpLoad %v4float %146
+%148 = OpCompositeExtract %float %147 0
+%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%151 = OpLoad %v4float %149
+%152 = OpCompositeExtract %float %151 0
+%145 = OpExtInst %float %1 FMix %148 %152 %float_0
+%153 = OpLoad %v4float %expectedWT
+%154 = OpCompositeExtract %float %153 0
+%155 = OpFOrdEqual %bool %145 %154
+OpBranch %144
+%144 = OpLabel
+%156 = OpPhi %bool %false %132 %155 %143
+OpSelectionMerge %158 None
+OpBranchConditional %156 %157 %158
+%157 = OpLabel
+%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%161 = OpLoad %v4float %160
+%162 = OpVectorShuffle %v2float %161 %161 0 1
+%163 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%164 = OpLoad %v4float %163
+%165 = OpVectorShuffle %v2float %164 %164 0 1
+%159 = OpExtInst %v2float %1 FMix %162 %165 %166
+%167 = OpLoad %v4float %expectedWT
+%168 = OpVectorShuffle %v2float %167 %167 0 1
+%169 = OpFOrdEqual %v2bool %159 %168
+%170 = OpAll %bool %169
+OpBranch %158
+%158 = OpLabel
+%171 = OpPhi %bool %false %144 %170 %157
+OpSelectionMerge %173 None
+OpBranchConditional %171 %172 %173
+%172 = OpLabel
+%175 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%176 = OpLoad %v4float %175
+%177 = OpVectorShuffle %v3float %176 %176 0 1 2
 %178 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
 %179 = OpLoad %v4float %178
-%175 = OpExtInst %v4float %1 FMix %177 %179 %180
-%183 = OpFOrdEqual %v4bool %175 %182
-%184 = OpAll %bool %183
-OpBranch %174
-%174 = OpLabel
-%185 = OpPhi %bool %false %160 %184 %173
-OpSelectionMerge %190 None
-OpBranchConditional %185 %188 %189
+%180 = OpVectorShuffle %v3float %179 %179 0 1 2
+%174 = OpExtInst %v3float %1 FMix %177 %180 %181
+%182 = OpLoad %v4float %expectedWT
+%183 = OpVectorShuffle %v3float %182 %182 0 1 2
+%184 = OpFOrdEqual %v3bool %174 %183
+%185 = OpAll %bool %184
+OpBranch %173
+%173 = OpLabel
+%186 = OpPhi %bool %false %158 %185 %172
+OpSelectionMerge %188 None
+OpBranchConditional %186 %187 %188
+%187 = OpLabel
+%190 = OpAccessChain %_ptr_Uniform_v4float %10 %int_3
+%191 = OpLoad %v4float %190
+%192 = OpAccessChain %_ptr_Uniform_v4float %10 %int_4
+%193 = OpLoad %v4float %192
+%189 = OpExtInst %v4float %1 FMix %191 %193 %194
+%195 = OpLoad %v4float %expectedWT
+%196 = OpFOrdEqual %v4bool %189 %195
+%197 = OpAll %bool %196
+OpBranch %188
 %188 = OpLabel
-%191 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%192 = OpLoad %v4float %191
-OpStore %186 %192
-OpBranch %190
-%189 = OpLabel
-%193 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%194 = OpLoad %v4float %193
-OpStore %186 %194
-OpBranch %190
-%190 = OpLabel
-%195 = OpLoad %v4float %186
-OpReturnValue %195
+%198 = OpPhi %bool %false %173 %197 %187
+OpSelectionMerge %202 None
+OpBranchConditional %198 %200 %201
+%200 = OpLabel
+%203 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%204 = OpLoad %v4float %203
+OpStore %199 %204
+OpBranch %202
+%201 = OpLabel
+%205 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%206 = OpLoad %v4float %205
+OpStore %199 %206
+OpBranch %202
+%202 = OpLabel
+%207 = OpLoad %v4float %199
+OpReturnValue %207
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/MixFloat.glsl b/tests/sksl/intrinsics/MixFloat.glsl
index 40185b0..b71d388 100644
--- a/tests/sksl/intrinsics/MixFloat.glsl
+++ b/tests/sksl/intrinsics/MixFloat.glsl
@@ -6,5 +6,7 @@
 uniform vec4 colorWhite;
 uniform vec4 testInputs;
 vec4 main() {
-    return ((((((((((mix(colorGreen, colorRed, 0.0) == vec4(0.0, 1.0, 0.0, 1.0) && mix(colorGreen, colorRed, 0.25) == vec4(0.25, 0.75, 0.0, 1.0)) && mix(colorGreen, colorRed, 0.75) == vec4(0.75, 0.25, 0.0, 1.0)) && mix(colorGreen, colorRed, 1.0) == vec4(1.0, 0.0, 0.0, 1.0)) && mix(colorBlack.x, colorWhite.x, 0.5) == 0.5) && mix(colorBlack.xy, colorWhite.xy, 0.5) == vec2(0.5, 0.5)) && mix(colorBlack.xyz, colorWhite.xyz, 0.5) == vec3(0.5, 0.5, 0.5)) && mix(colorBlack, colorWhite, 0.5) == vec4(0.5, 0.5, 0.5, 1.0)) && mix(colorWhite.x, testInputs.x, 0.0) == 1.0) && mix(colorWhite.xy, testInputs.xy, vec2(0.0, 0.5)) == vec2(1.0, 0.5)) && mix(colorWhite.xyz, testInputs.xyz, vec3(0.0, 0.5, 0.0)) == vec3(1.0, 0.5, 1.0)) && mix(colorWhite, testInputs, vec4(0.0, 0.5, 0.0, 1.0)) == vec4(1.0, 0.5, 1.0, 2.25) ? colorGreen : colorRed;
+    vec4 expectedBW = vec4(0.5, 0.5, 0.5, 1.0);
+    vec4 expectedWT = vec4(1.0, 0.5, 1.0, 2.25);
+    return ((((((((((mix(colorGreen, colorRed, 0.0) == vec4(0.0, 1.0, 0.0, 1.0) && mix(colorGreen, colorRed, 0.25) == vec4(0.25, 0.75, 0.0, 1.0)) && mix(colorGreen, colorRed, 0.75) == vec4(0.75, 0.25, 0.0, 1.0)) && mix(colorGreen, colorRed, 1.0) == vec4(1.0, 0.0, 0.0, 1.0)) && mix(colorBlack.x, colorWhite.x, 0.5) == expectedBW.x) && mix(colorBlack.xy, colorWhite.xy, 0.5) == expectedBW.xy) && mix(colorBlack.xyz, colorWhite.xyz, 0.5) == expectedBW.xyz) && mix(colorBlack, colorWhite, 0.5) == expectedBW) && mix(colorWhite.x, testInputs.x, 0.0) == expectedWT.x) && mix(colorWhite.xy, testInputs.xy, vec2(0.0, 0.5)) == expectedWT.xy) && mix(colorWhite.xyz, testInputs.xyz, vec3(0.0, 0.5, 0.0)) == expectedWT.xyz) && mix(colorWhite, testInputs, vec4(0.0, 0.5, 0.0, 1.0)) == expectedWT ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/MixFloat.metal b/tests/sksl/intrinsics/MixFloat.metal
index 44e736a..203cc89 100644
--- a/tests/sksl/intrinsics/MixFloat.metal
+++ b/tests/sksl/intrinsics/MixFloat.metal
@@ -21,6 +21,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((((((((((all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.0) == float4(0.0, 1.0, 0.0, 1.0)) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.25) == float4(0.25, 0.75, 0.0, 1.0))) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.75) == float4(0.75, 0.25, 0.0, 1.0))) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 1.0) == float4(1.0, 0.0, 0.0, 1.0))) && mix(_uniforms.colorBlack.x, _uniforms.colorWhite.x, 0.5) == 0.5) && all(mix(_uniforms.colorBlack.xy, _uniforms.colorWhite.xy, 0.5) == float2(0.5, 0.5))) && all(mix(_uniforms.colorBlack.xyz, _uniforms.colorWhite.xyz, 0.5) == float3(0.5, 0.5, 0.5))) && all(mix(_uniforms.colorBlack, _uniforms.colorWhite, 0.5) == float4(0.5, 0.5, 0.5, 1.0))) && mix(_uniforms.colorWhite.x, _uniforms.testInputs.x, 0.0) == 1.0) && all(mix(_uniforms.colorWhite.xy, _uniforms.testInputs.xy, float2(0.0, 0.5)) == float2(1.0, 0.5))) && all(mix(_uniforms.colorWhite.xyz, _uniforms.testInputs.xyz, float3(0.0, 0.5, 0.0)) == float3(1.0, 0.5, 1.0))) && all(mix(_uniforms.colorWhite, _uniforms.testInputs, float4(0.0, 0.5, 0.0, 1.0)) == float4(1.0, 0.5, 1.0, 2.25)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expectedBW = float4(0.5, 0.5, 0.5, 1.0);
+    float4 expectedWT = float4(1.0, 0.5, 1.0, 2.25);
+    _out.sk_FragColor = ((((((((((all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.0) == float4(0.0, 1.0, 0.0, 1.0)) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.25) == float4(0.25, 0.75, 0.0, 1.0))) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 0.75) == float4(0.75, 0.25, 0.0, 1.0))) && all(mix(_uniforms.colorGreen, _uniforms.colorRed, 1.0) == float4(1.0, 0.0, 0.0, 1.0))) && mix(_uniforms.colorBlack.x, _uniforms.colorWhite.x, 0.5) == expectedBW.x) && all(mix(_uniforms.colorBlack.xy, _uniforms.colorWhite.xy, 0.5) == expectedBW.xy)) && all(mix(_uniforms.colorBlack.xyz, _uniforms.colorWhite.xyz, 0.5) == expectedBW.xyz)) && all(mix(_uniforms.colorBlack, _uniforms.colorWhite, 0.5) == expectedBW)) && mix(_uniforms.colorWhite.x, _uniforms.testInputs.x, 0.0) == expectedWT.x) && all(mix(_uniforms.colorWhite.xy, _uniforms.testInputs.xy, float2(0.0, 0.5)) == expectedWT.xy)) && all(mix(_uniforms.colorWhite.xyz, _uniforms.testInputs.xyz, float3(0.0, 0.5, 0.0)) == expectedWT.xyz)) && all(mix(_uniforms.colorWhite, _uniforms.testInputs, float4(0.0, 0.5, 0.0, 1.0)) == expectedWT) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/intrinsics/SignFloat.asm.frag b/tests/sksl/intrinsics/SignFloat.asm.frag
index 8d70168..d4f1f82 100644
--- a/tests/sksl/intrinsics/SignFloat.asm.frag
+++ b/tests/sksl/intrinsics/SignFloat.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %expected "expected"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,13 +26,17 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
+OpDecorate %32 RelaxedPrecision
 OpDecorate %34 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %76 RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %44 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,22 +50,20 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_n1 = OpConstant %float -1
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
+%25 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_1
 %false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_n1 = OpConstant %float -1
 %v2float = OpTypeVector %float 2
-%float_0 = OpConstant %float 0
-%38 = OpConstantComposite %v2float %float_n1 %float_0
 %v2bool = OpTypeVector %bool 2
 %v3float = OpTypeVector %float 3
-%float_1 = OpConstant %float 1
-%51 = OpConstantComposite %v3float %float_n1 %float_0 %float_1
 %v3bool = OpTypeVector %bool 3
-%61 = OpConstantComposite %v4float %float_n1 %float_0 %float_1 %float_1
 %v4bool = OpTypeVector %bool 4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %_entrypoint = OpFunction %void None %15
@@ -71,60 +74,69 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%66 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-%21 = OpExtInst %float %1 FSign %27
-%29 = OpFOrdEqual %bool %21 %float_n1
-OpSelectionMerge %31 None
-OpBranchConditional %29 %30 %31
-%30 = OpLabel
-%33 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%34 = OpLoad %v4float %33
-%35 = OpVectorShuffle %v2float %34 %34 0 1
-%32 = OpExtInst %v2float %1 FSign %35
-%39 = OpFOrdEqual %v2bool %32 %38
-%41 = OpAll %bool %39
-OpBranch %31
-%31 = OpLabel
-%42 = OpPhi %bool %false %19 %41 %30
-OpSelectionMerge %44 None
-OpBranchConditional %42 %43 %44
-%43 = OpLabel
-%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%47 = OpLoad %v4float %46
-%48 = OpVectorShuffle %v3float %47 %47 0 1 2
-%45 = OpExtInst %v3float %1 FSign %48
-%52 = OpFOrdEqual %v3bool %45 %51
-%54 = OpAll %bool %52
-OpBranch %44
-%44 = OpLabel
-%55 = OpPhi %bool %false %31 %54 %43
-OpSelectionMerge %57 None
-OpBranchConditional %55 %56 %57
-%56 = OpLabel
-%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%60 = OpLoad %v4float %59
-%58 = OpExtInst %v4float %1 FSign %60
-%62 = OpFOrdEqual %v4bool %58 %61
-%64 = OpAll %bool %62
-OpBranch %57
-%57 = OpLabel
-%65 = OpPhi %bool %false %44 %64 %56
-OpSelectionMerge %70 None
-OpBranchConditional %65 %68 %69
-%68 = OpLabel
-%71 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%73 = OpLoad %v4float %71
-OpStore %66 %73
-OpBranch %70
-%69 = OpLabel
-%74 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%76 = OpLoad %v4float %74
-OpStore %66 %76
-OpBranch %70
-%70 = OpLabel
-%77 = OpLoad %v4float %66
-OpReturnValue %77
+%expected = OpVariable %_ptr_Function_v4float Function
+%73 = OpVariable %_ptr_Function_v4float Function
+OpStore %expected %25
+%28 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%32 = OpLoad %v4float %28
+%33 = OpCompositeExtract %float %32 0
+%27 = OpExtInst %float %1 FSign %33
+%34 = OpLoad %v4float %expected
+%35 = OpCompositeExtract %float %34 0
+%36 = OpFOrdEqual %bool %27 %35
+OpSelectionMerge %38 None
+OpBranchConditional %36 %37 %38
+%37 = OpLabel
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%41 = OpLoad %v4float %40
+%42 = OpVectorShuffle %v2float %41 %41 0 1
+%39 = OpExtInst %v2float %1 FSign %42
+%44 = OpLoad %v4float %expected
+%45 = OpVectorShuffle %v2float %44 %44 0 1
+%46 = OpFOrdEqual %v2bool %39 %45
+%48 = OpAll %bool %46
+OpBranch %38
+%38 = OpLabel
+%49 = OpPhi %bool %false %19 %48 %37
+OpSelectionMerge %51 None
+OpBranchConditional %49 %50 %51
+%50 = OpLabel
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%54 = OpLoad %v4float %53
+%55 = OpVectorShuffle %v3float %54 %54 0 1 2
+%52 = OpExtInst %v3float %1 FSign %55
+%57 = OpLoad %v4float %expected
+%58 = OpVectorShuffle %v3float %57 %57 0 1 2
+%59 = OpFOrdEqual %v3bool %52 %58
+%61 = OpAll %bool %59
+OpBranch %51
+%51 = OpLabel
+%62 = OpPhi %bool %false %38 %61 %50
+OpSelectionMerge %64 None
+OpBranchConditional %62 %63 %64
+%63 = OpLabel
+%66 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%67 = OpLoad %v4float %66
+%65 = OpExtInst %v4float %1 FSign %67
+%68 = OpLoad %v4float %expected
+%69 = OpFOrdEqual %v4bool %65 %68
+%71 = OpAll %bool %69
+OpBranch %64
+%64 = OpLabel
+%72 = OpPhi %bool %false %51 %71 %63
+OpSelectionMerge %76 None
+OpBranchConditional %72 %74 %75
+%74 = OpLabel
+%77 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%79 = OpLoad %v4float %77
+OpStore %73 %79
+OpBranch %76
+%75 = OpLabel
+%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%82 = OpLoad %v4float %80
+OpStore %73 %82
+OpBranch %76
+%76 = OpLabel
+%83 = OpLoad %v4float %73
+OpReturnValue %83
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/SignFloat.glsl b/tests/sksl/intrinsics/SignFloat.glsl
index 8dd52bf..c7b71cf 100644
--- a/tests/sksl/intrinsics/SignFloat.glsl
+++ b/tests/sksl/intrinsics/SignFloat.glsl
@@ -4,5 +4,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return ((sign(testInputs.x) == -1.0 && sign(testInputs.xy) == vec2(-1.0, 0.0)) && sign(testInputs.xyz) == vec3(-1.0, 0.0, 1.0)) && sign(testInputs) == vec4(-1.0, 0.0, 1.0, 1.0) ? colorGreen : colorRed;
+    vec4 expected = vec4(-1.0, 0.0, 1.0, 1.0);
+    return ((sign(testInputs.x) == expected.x && sign(testInputs.xy) == expected.xy) && sign(testInputs.xyz) == expected.xyz) && sign(testInputs) == expected ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/intrinsics/SignFloat.metal b/tests/sksl/intrinsics/SignFloat.metal
index f78472f..009f38f 100644
--- a/tests/sksl/intrinsics/SignFloat.metal
+++ b/tests/sksl/intrinsics/SignFloat.metal
@@ -17,6 +17,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = ((sign(_uniforms.testInputs.x) == -1.0 && all(sign(_uniforms.testInputs.xy) == float2(-1.0, 0.0))) && all(sign(_uniforms.testInputs.xyz) == float3(-1.0, 0.0, 1.0))) && all(sign(_uniforms.testInputs) == float4(-1.0, 0.0, 1.0, 1.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float4 expected = float4(-1.0, 0.0, 1.0, 1.0);
+    _out.sk_FragColor = ((sign(_uniforms.testInputs.x) == expected.x && all(sign(_uniforms.testInputs.xy) == expected.xy)) && all(sign(_uniforms.testInputs.xyz) == expected.xyz)) && all(sign(_uniforms.testInputs) == expected) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/metal/CastHalf4ToMat2x2.metal b/tests/sksl/metal/CastHalf4ToMat2x2.metal
index 8b8f70a..49198db 100644
--- a/tests/sksl/metal/CastHalf4ToMat2x2.metal
+++ b/tests/sksl/metal/CastHalf4ToMat2x2.metal
@@ -9,6 +9,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float2x2(float2(1.0, 2.0), float2(3.0, 4.0))[0].xyxy;
+    float2x2 m1 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    _out.sk_FragColor = m1[0].xyxy;
     return _out;
 }
diff --git a/tests/sksl/metal/CastMat2x2ToMat3x3.metal b/tests/sksl/metal/CastMat2x2ToMat3x3.metal
index dea0644..4fd093f 100644
--- a/tests/sksl/metal/CastMat2x2ToMat3x3.metal
+++ b/tests/sksl/metal/CastMat2x2ToMat3x3.metal
@@ -12,6 +12,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.x = float(all(float3x3(1.0)[0] == float3x3_from_float2x2(float2x2(1.0))[0]) ? 0 : 1);
+    float3x3 a = float3x3(1.0);
+    float3x3 b = float3x3_from_float2x2(float2x2(1.0));
+    _out.sk_FragColor.x = float(all(a[0] == b[0]) ? 0 : 1);
     return _out;
 }
diff --git a/tests/sksl/metal/CastMat2x3ToMat4x4.metal b/tests/sksl/metal/CastMat2x3ToMat4x4.metal
index ace7fc2..912f620 100644
--- a/tests/sksl/metal/CastMat2x3ToMat4x4.metal
+++ b/tests/sksl/metal/CastMat2x3ToMat4x4.metal
@@ -12,6 +12,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.x = float(all(float4x4(6.0)[1] == float4x4_from_float2x3(float2x3(7.0))[1]) ? 0 : 1);
+    float4x4 a = float4x4(6.0);
+    float4x4 b = float4x4_from_float2x3(float2x3(7.0));
+    _out.sk_FragColor.x = float(all(a[1] == b[1]) ? 0 : 1);
     return _out;
 }
diff --git a/tests/sksl/metal/CastMat4x4ToMat3x4.metal b/tests/sksl/metal/CastMat4x4ToMat3x4.metal
index 1e38034..c1a1685 100644
--- a/tests/sksl/metal/CastMat4x4ToMat3x4.metal
+++ b/tests/sksl/metal/CastMat4x4ToMat3x4.metal
@@ -12,6 +12,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.x = float(all(float3x4(1.0)[0] == float3x4_from_float4x4(float4x4(1.0))[0]) ? 0 : 1);
+    float3x4 a = float3x4(1.0);
+    float3x4 b = float3x4_from_float4x4(float4x4(1.0));
+    _out.sk_FragColor.x = float(all(a[0] == b[0]) ? 0 : 1);
     return _out;
 }
diff --git a/tests/sksl/metal/CastMat4x4ToMat4x3.metal b/tests/sksl/metal/CastMat4x4ToMat4x3.metal
index 597fb5f..e7e8d07 100644
--- a/tests/sksl/metal/CastMat4x4ToMat4x3.metal
+++ b/tests/sksl/metal/CastMat4x4ToMat4x3.metal
@@ -12,6 +12,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.x = float(all(float4x3(1.0)[0] == float4x3_from_float4x4(float4x4(1.0))[0]) ? 0 : 1);
+    float4x3 a = float4x3(1.0);
+    float4x3 b = float4x3_from_float4x4(float4x4(1.0));
+    _out.sk_FragColor.x = float(all(a[0] == b[0]) ? 0 : 1);
     return _out;
 }
diff --git a/tests/sksl/metal/SwizzleHelper.metal b/tests/sksl/metal/SwizzleHelper.metal
index 70f64d4..626dbf3 100644
--- a/tests/sksl/metal/SwizzleHelper.metal
+++ b/tests/sksl/metal/SwizzleHelper.metal
@@ -33,8 +33,10 @@
     (void)_globals;
     Outputs _out;
     (void)_out;
+    float2 a = float2(1.0);
     float3 b = float3(2.0);
+    float4x4 c = float4x4(3.0);
     float3x3 d = float3x3(4.0);
-    _out.sk_FragColor =     _skOutParamHelper0_fn(_out, _globals, 1.0, b, _globals.glob, d);
+    _out.sk_FragColor =     _skOutParamHelper0_fn(_out, _globals, a.x, b, _globals.glob, d);
     return _out;
 }
diff --git a/tests/sksl/shared/ArrayConstructors.asm.frag b/tests/sksl/shared/ArrayConstructors.asm.frag
index 9475d2d..2775788 100644
--- a/tests/sksl/shared/ArrayConstructors.asm.frag
+++ b/tests/sksl/shared/ArrayConstructors.asm.frag
@@ -10,6 +10,9 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %test1 "test1"
+OpName %test2 "test2"
+OpName %test3 "test3"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -49,21 +52,21 @@
 %float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
-%int_3 = OpConstant %int 3
-%_ptr_Function_float = OpTypePointer Function %float
 %v2float = OpTypeVector %float 2
 %int_2 = OpConstant %int 2
 %_arr_v2float_int_2 = OpTypeArray %v2float %int_2
 %_ptr_Function__arr_v2float_int_2 = OpTypePointer Function %_arr_v2float_int_2
-%39 = OpConstantComposite %v2float %float_1 %float_2
-%40 = OpConstantComposite %v2float %float_3 %float_4
-%int_1 = OpConstant %int 1
-%_ptr_Function_v2float = OpTypePointer Function %v2float
+%35 = OpConstantComposite %v2float %float_1 %float_2
+%36 = OpConstantComposite %v2float %float_3 %float_4
 %mat4v4float = OpTypeMatrix %v4float 4
+%int_1 = OpConstant %int 1
 %_arr_mat4v4float_int_1 = OpTypeArray %mat4v4float %int_1
 %_ptr_Function__arr_mat4v4float_int_1 = OpTypePointer Function %_arr_mat4v4float_int_1
 %float_16 = OpConstant %float 16
 %float_0 = OpConstant %float 0
+%int_3 = OpConstant %int 3
+%_ptr_Function_float = OpTypePointer Function %float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
 %int_0 = OpConstant %int 0
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %float_24 = OpConstant %float 24
@@ -76,31 +79,31 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%20 = OpVariable %_ptr_Function__arr_float_int_4 Function
-%34 = OpVariable %_ptr_Function__arr_v2float_int_2 Function
-%48 = OpVariable %_ptr_Function__arr_mat4v4float_int_1 Function
+%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
 %68 = OpVariable %_ptr_Function_v4float Function
 %29 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
-OpStore %20 %29
-%31 = OpAccessChain %_ptr_Function_float %20 %int_3
-%33 = OpLoad %float %31
-%41 = OpCompositeConstruct %_arr_v2float_int_2 %39 %40
-OpStore %34 %41
-%43 = OpAccessChain %_ptr_Function_v2float %34 %int_1
-%45 = OpLoad %v2float %43
-%46 = OpCompositeExtract %float %45 1
-%47 = OpFAdd %float %33 %46
-%55 = OpCompositeConstruct %v4float %float_16 %float_0 %float_0 %float_0
-%56 = OpCompositeConstruct %v4float %float_0 %float_16 %float_0 %float_0
-%57 = OpCompositeConstruct %v4float %float_0 %float_0 %float_16 %float_0
-%58 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_16
-%53 = OpCompositeConstruct %mat4v4float %55 %56 %57 %58
-%59 = OpCompositeConstruct %_arr_mat4v4float_int_1 %53
-OpStore %48 %59
-%61 = OpAccessChain %_ptr_Function_v4float %48 %int_0 %int_3
+OpStore %test1 %29
+%37 = OpCompositeConstruct %_arr_v2float_int_2 %35 %36
+OpStore %test2 %37
+%46 = OpCompositeConstruct %v4float %float_16 %float_0 %float_0 %float_0
+%47 = OpCompositeConstruct %v4float %float_0 %float_16 %float_0 %float_0
+%48 = OpCompositeConstruct %v4float %float_0 %float_0 %float_16 %float_0
+%49 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_16
+%44 = OpCompositeConstruct %mat4v4float %46 %47 %48 %49
+%50 = OpCompositeConstruct %_arr_mat4v4float_int_1 %44
+OpStore %test3 %50
+%52 = OpAccessChain %_ptr_Function_float %test1 %int_3
+%54 = OpLoad %float %52
+%55 = OpAccessChain %_ptr_Function_v2float %test2 %int_1
+%57 = OpLoad %v2float %55
+%58 = OpCompositeExtract %float %57 1
+%59 = OpFAdd %float %54 %58
+%61 = OpAccessChain %_ptr_Function_v4float %test3 %int_0 %int_3
 %63 = OpLoad %v4float %61
 %64 = OpCompositeExtract %float %63 3
-%65 = OpFAdd %float %47 %64
+%65 = OpFAdd %float %59 %64
 %67 = OpFOrdEqual %bool %65 %float_24
 OpSelectionMerge %71 None
 OpBranchConditional %67 %69 %70
diff --git a/tests/sksl/shared/ArrayConstructors.glsl b/tests/sksl/shared/ArrayConstructors.glsl
index ef464c7..5707333 100644
--- a/tests/sksl/shared/ArrayConstructors.glsl
+++ b/tests/sksl/shared/ArrayConstructors.glsl
@@ -3,5 +3,8 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return (float[4](1.0, 2.0, 3.0, 4.0)[3] + vec2[2](vec2(1.0, 2.0), vec2(3.0, 4.0))[1].y) + mat4[1](mat4(16.0))[0][3].w == 24.0 ? colorGreen : colorRed;
+    float test1[4] = float[4](1.0, 2.0, 3.0, 4.0);
+    vec2 test2[2] = vec2[2](vec2(1.0, 2.0), vec2(3.0, 4.0));
+    mat4 test3[1] = mat4[1](mat4(16.0));
+    return (test1[3] + test2[1].y) + test3[0][3].w == 24.0 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/ArrayConstructors.metal b/tests/sksl/shared/ArrayConstructors.metal
index 924b5e4..91c3ade 100644
--- a/tests/sksl/shared/ArrayConstructors.metal
+++ b/tests/sksl/shared/ArrayConstructors.metal
@@ -15,6 +15,9 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = (array<float, 4>{1.0, 2.0, 3.0, 4.0}[3] + array<float2, 2>{float2(1.0, 2.0), float2(3.0, 4.0)}[1].y) + array<float4x4, 1>{float4x4(16.0)}[0][3].w == 24.0 ? _uniforms.colorGreen : _uniforms.colorRed;
+    array<float, 4> test1 = array<float, 4>{1.0, 2.0, 3.0, 4.0};
+    array<float2, 2> test2 = array<float2, 2>{float2(1.0, 2.0), float2(3.0, 4.0)};
+    array<float4x4, 1> test3 = array<float4x4, 1>{float4x4(16.0)};
+    _out.sk_FragColor = (test1[3] + test2[1].y) + test3[0][3].w == 24.0 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/ArrayIndexTypes.asm.frag b/tests/sksl/shared/ArrayIndexTypes.asm.frag
index 8410b88..c5560df 100644
--- a/tests/sksl/shared/ArrayIndexTypes.asm.frag
+++ b/tests/sksl/shared/ArrayIndexTypes.asm.frag
@@ -6,12 +6,19 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %array "array"
+OpName %x "x"
+OpName %y "y"
+OpName %z "z"
+OpName %w "w"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %_arr_float_int_4 ArrayStride 16
+OpDecorate %34 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -29,35 +36,40 @@
 %float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
+%_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
-%_ptr_Function_float = OpTypePointer Function %float
 %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
 %uint_1 = OpConstant %uint 1
 %int_2 = OpConstant %int 2
 %uint_3 = OpConstant %uint 3
+%_ptr_Function_float = OpTypePointer Function %float
 %main = OpFunction %void None %11
 %12 = OpLabel
-%13 = OpVariable %_ptr_Function__arr_float_int_4 Function
-%27 = OpVariable %_ptr_Function__arr_float_int_4 Function
-%33 = OpVariable %_ptr_Function__arr_float_int_4 Function
-%38 = OpVariable %_ptr_Function__arr_float_int_4 Function
+%array = OpVariable %_ptr_Function__arr_float_int_4 Function
+%x = OpVariable %_ptr_Function_int Function
+%y = OpVariable %_ptr_Function_uint Function
+%z = OpVariable %_ptr_Function_int Function
+%w = OpVariable %_ptr_Function_uint Function
 %22 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
-OpStore %13 %22
-%24 = OpAccessChain %_ptr_Function_float %13 %int_0
-%26 = OpLoad %float %24
-%28 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
-OpStore %27 %28
-%31 = OpAccessChain %_ptr_Function_float %27 %uint_1
-%32 = OpLoad %float %31
-%34 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
-OpStore %33 %34
-%36 = OpAccessChain %_ptr_Function_float %33 %int_2
-%37 = OpLoad %float %36
-%39 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
-OpStore %38 %39
-%41 = OpAccessChain %_ptr_Function_float %38 %uint_3
-%42 = OpLoad %float %41
-%43 = OpCompositeConstruct %v4float %26 %32 %37 %42
-OpStore %sk_FragColor %43
+OpStore %array %22
+OpStore %x %int_0
+OpStore %y %uint_1
+OpStore %z %int_2
+OpStore %w %uint_3
+%34 = OpLoad %int %x
+%35 = OpAccessChain %_ptr_Function_float %array %34
+%37 = OpLoad %float %35
+%38 = OpLoad %uint %y
+%39 = OpAccessChain %_ptr_Function_float %array %38
+%40 = OpLoad %float %39
+%41 = OpLoad %int %z
+%42 = OpAccessChain %_ptr_Function_float %array %41
+%43 = OpLoad %float %42
+%44 = OpLoad %uint %w
+%45 = OpAccessChain %_ptr_Function_float %array %44
+%46 = OpLoad %float %45
+%47 = OpCompositeConstruct %v4float %37 %40 %43 %46
+OpStore %sk_FragColor %47
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/ArrayIndexTypes.glsl b/tests/sksl/shared/ArrayIndexTypes.glsl
index e800ed5..9dd9aae 100644
--- a/tests/sksl/shared/ArrayIndexTypes.glsl
+++ b/tests/sksl/shared/ArrayIndexTypes.glsl
@@ -1,5 +1,10 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor = vec4(float[4](1.0, 2.0, 3.0, 4.0)[0], float[4](1.0, 2.0, 3.0, 4.0)[1u], float[4](1.0, 2.0, 3.0, 4.0)[2], float[4](1.0, 2.0, 3.0, 4.0)[3u]);
+    float array[4] = float[4](1.0, 2.0, 3.0, 4.0);
+    int x = 0;
+    uint y = 1u;
+    int z = 2;
+    uint w = 3u;
+    sk_FragColor = vec4(array[x], array[y], array[z], array[w]);
 }
diff --git a/tests/sksl/shared/ArrayIndexTypes.metal b/tests/sksl/shared/ArrayIndexTypes.metal
index cc121c3..6b47fcb 100644
--- a/tests/sksl/shared/ArrayIndexTypes.metal
+++ b/tests/sksl/shared/ArrayIndexTypes.metal
@@ -9,6 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(array<float, 4>{1.0, 2.0, 3.0, 4.0}[0], array<float, 4>{1.0, 2.0, 3.0, 4.0}[1u], array<float, 4>{1.0, 2.0, 3.0, 4.0}[2], array<float, 4>{1.0, 2.0, 3.0, 4.0}[3u]);
+    array<float, 4> array = array<float, 4>{1.0, 2.0, 3.0, 4.0};
+    short x = 0;
+    ushort y = 1u;
+    int z = 2;
+    uint w = 3u;
+    _out.sk_FragColor = float4(array[x], array[y], array[z], array[w]);
     return _out;
 }
diff --git a/tests/sksl/shared/Assignment.asm.frag b/tests/sksl/shared/Assignment.asm.frag
index 5c9be9d..5f0e3b4 100644
--- a/tests/sksl/shared/Assignment.asm.frag
+++ b/tests/sksl/shared/Assignment.asm.frag
@@ -9,7 +9,9 @@
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %i "i"
 OpName %i4 "i4"
+OpName %f3x3 "f3x3"
 OpName %x "x"
 OpName %ai "ai"
 OpName %ai4 "ai4"
@@ -21,6 +23,8 @@
 OpMemberName %S 2 "h4"
 OpMemberName %S 3 "ah4"
 OpName %s "s"
+OpName %l "l"
+OpName %r "r"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -31,14 +35,14 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %37 RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
 OpDecorate %_arr_int_int_1 ArrayStride 16
 OpDecorate %_arr_v4int_int_1 ArrayStride 16
 OpDecorate %_arr_mat3v3float_int_1 ArrayStride 48
-OpDecorate %63 RelaxedPrecision
-OpDecorate %64 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
+OpDecorate %70 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
 OpDecorate %_arr_v4float_int_1 ArrayStride 16
 OpDecorate %_arr_float_int_5 ArrayStride 16
 OpDecorate %_arr_v4float_int_5 ArrayStride 16
@@ -48,12 +52,14 @@
 OpMemberDecorate %S 2 RelaxedPrecision
 OpMemberDecorate %S 3 Offset 112
 OpMemberDecorate %S 3 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %115 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %122 RelaxedPrecision
+OpDecorate %124 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %129 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -68,28 +74,18 @@
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
 %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+%int_0 = OpConstant %int 0
 %v4int = OpTypeVector %int 4
 %_ptr_Function_v4int = OpTypePointer Function %v4int
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
 %int_3 = OpConstant %int 3
 %int_4 = OpConstant %int 4
-%28 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
-%_ptr_Function_v4float = OpTypePointer Function %v4float
-%float_0 = OpConstant %float 0
-%_ptr_Function_float = OpTypePointer Function %float
-%v2float = OpTypeVector %float 2
-%35 = OpConstantComposite %v2float %float_0 %float_0
-%_arr_int_int_1 = OpTypeArray %int %int_1
-%_ptr_Function__arr_int_int_1 = OpTypePointer Function %_arr_int_int_1
-%int_0 = OpConstant %int 0
-%_ptr_Function_int = OpTypePointer Function %int
-%_arr_v4int_int_1 = OpTypeArray %v4int %int_1
-%_ptr_Function__arr_v4int_int_1 = OpTypePointer Function %_arr_v4int_int_1
+%31 = OpConstantComposite %v4int %int_1 %int_2 %int_3 %int_4
 %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-%_arr_mat3v3float_int_1 = OpTypeArray %mat3v3float %int_1
-%_ptr_Function__arr_mat3v3float_int_1 = OpTypePointer Function %_arr_mat3v3float_int_1
+%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
 %float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
@@ -99,18 +95,28 @@
 %float_7 = OpConstant %float 7
 %float_8 = OpConstant %float 8
 %float_9 = OpConstant %float 9
-%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_0 = OpConstant %float 0
+%_ptr_Function_float = OpTypePointer Function %float
+%v2float = OpTypeVector %float 2
+%55 = OpConstantComposite %v2float %float_0 %float_0
+%_arr_int_int_1 = OpTypeArray %int %int_1
+%_ptr_Function__arr_int_int_1 = OpTypePointer Function %_arr_int_int_1
+%_arr_v4int_int_1 = OpTypeArray %v4int %int_1
+%_ptr_Function__arr_v4int_int_1 = OpTypePointer Function %_arr_v4int_int_1
+%_arr_mat3v3float_int_1 = OpTypeArray %mat3v3float %int_1
+%_ptr_Function__arr_mat3v3float_int_1 = OpTypePointer Function %_arr_mat3v3float_int_1
 %_arr_v4float_int_1 = OpTypeArray %v4float %int_1
 %_ptr_Function__arr_v4float_int_1 = OpTypePointer Function %_arr_v4float_int_1
-%73 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%79 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %int_5 = OpConstant %int 5
 %_arr_float_int_5 = OpTypeArray %float %int_5
 %_arr_v4float_int_5 = OpTypeArray %v4float %int_5
 %S = OpTypeStruct %float %_arr_float_int_5 %v4float %_arr_v4float_int_5
 %_ptr_Function_S = OpTypePointer Function %S
-%85 = OpConstantComposite %v3float %float_9 %float_9 %float_9
-%89 = OpConstantComposite %v2float %float_5 %float_5
-%102 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
+%91 = OpConstantComposite %v3float %float_9 %float_9 %float_9
+%95 = OpConstantComposite %v2float %float_5 %float_5
+%110 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
 %_ptr_Function_v3float = OpTypePointer Function %v3float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint = OpFunction %void None %15
@@ -121,83 +127,97 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
+%i = OpVariable %_ptr_Function_int Function
 %i4 = OpVariable %_ptr_Function_v4int Function
+%f3x3 = OpVariable %_ptr_Function_mat3v3float Function
 %x = OpVariable %_ptr_Function_v4float Function
 %ai = OpVariable %_ptr_Function__arr_int_int_1 Function
 %ai4 = OpVariable %_ptr_Function__arr_v4int_int_1 Function
 %ah2x4 = OpVariable %_ptr_Function__arr_mat3v3float_int_1 Function
 %af4 = OpVariable %_ptr_Function__arr_v4float_int_1 Function
 %s = OpVariable %_ptr_Function_S Function
-OpStore %i4 %28
-%32 = OpAccessChain %_ptr_Function_float %x %int_3
-OpStore %32 %float_0
-%36 = OpLoad %v4float %x
-%37 = OpVectorShuffle %v4float %36 %35 5 4 2 3
-OpStore %x %37
-%42 = OpAccessChain %_ptr_Function_int %ai %int_0
-OpStore %42 %int_0
-%47 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0
-OpStore %47 %28
-%63 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%64 = OpCompositeConstruct %v3float %float_4 %float_5 %float_6
-%65 = OpCompositeConstruct %v3float %float_7 %float_8 %float_9
-%62 = OpCompositeConstruct %mat3v3float %63 %64 %65
-%66 = OpAccessChain %_ptr_Function_mat3v3float %ah2x4 %int_0
-OpStore %66 %62
-%71 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
-%72 = OpAccessChain %_ptr_Function_float %71 %int_0
-OpStore %72 %float_0
-%74 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
-%75 = OpLoad %v4float %74
-%76 = OpVectorShuffle %v4float %75 %73 6 4 7 5
-OpStore %74 %76
-%83 = OpAccessChain %_ptr_Function_float %s %int_0
-OpStore %83 %float_0
-%84 = OpAccessChain %_ptr_Function_float %s %int_1 %int_1
-OpStore %84 %float_0
-%86 = OpAccessChain %_ptr_Function_v4float %s %int_2
-%87 = OpLoad %v4float %86
-%88 = OpVectorShuffle %v4float %87 %85 5 6 4 3
-OpStore %86 %88
-%90 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_2
-%91 = OpLoad %v4float %90
-%92 = OpVectorShuffle %v4float %91 %89 0 4 2 5
-OpStore %90 %92
-%93 = OpAccessChain %_ptr_Function_int %ai %int_0
-%94 = OpLoad %int %93
-%95 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0
-%96 = OpLoad %v4int %95
-%97 = OpCompositeExtract %int %96 0
-%98 = OpIAdd %int %94 %97
-OpStore %93 %98
-%99 = OpAccessChain %_ptr_Function_float %s %int_0
-OpStore %99 %float_1
-%100 = OpAccessChain %_ptr_Function_float %s %int_1 %int_0
-OpStore %100 %float_2
-%101 = OpAccessChain %_ptr_Function_v4float %s %int_2
-OpStore %101 %73
-%103 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_0
-OpStore %103 %102
-%104 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
-%105 = OpLoad %v4float %104
-%106 = OpAccessChain %_ptr_Function_v3float %ah2x4 %int_0 %int_0
-%108 = OpLoad %v3float %106
-%109 = OpCompositeExtract %float %108 0
-%110 = OpVectorTimesScalar %v4float %105 %109
-OpStore %104 %110
-%111 = OpAccessChain %_ptr_Function_int %i4 %int_1
-%112 = OpLoad %int %111
-%113 = OpIMul %int %112 %int_0
-OpStore %111 %113
-%114 = OpAccessChain %_ptr_Function_float %x %int_1
-%115 = OpLoad %float %114
-%116 = OpFMul %float %115 %float_0
-OpStore %114 %116
-%117 = OpAccessChain %_ptr_Function_float %s %int_0
-%118 = OpLoad %float %117
-%119 = OpFMul %float %118 %float_0
-OpStore %117 %119
-%120 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%122 = OpLoad %v4float %120
-OpReturnValue %122
+%l = OpVariable %_ptr_Function_float Function
+%r = OpVariable %_ptr_Function_float Function
+OpStore %i %int_0
+OpStore %i4 %31
+%46 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%47 = OpCompositeConstruct %v3float %float_4 %float_5 %float_6
+%48 = OpCompositeConstruct %v3float %float_7 %float_8 %float_9
+%45 = OpCompositeConstruct %mat3v3float %46 %47 %48
+OpStore %f3x3 %45
+%52 = OpAccessChain %_ptr_Function_float %x %int_3
+OpStore %52 %float_0
+%56 = OpLoad %v4float %x
+%57 = OpVectorShuffle %v4float %56 %55 5 4 2 3
+OpStore %x %57
+%61 = OpAccessChain %_ptr_Function_int %ai %int_0
+OpStore %61 %int_0
+%65 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0
+OpStore %65 %31
+%70 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%71 = OpCompositeConstruct %v3float %float_4 %float_5 %float_6
+%72 = OpCompositeConstruct %v3float %float_7 %float_8 %float_9
+%69 = OpCompositeConstruct %mat3v3float %70 %71 %72
+%73 = OpAccessChain %_ptr_Function_mat3v3float %ah2x4 %int_0
+OpStore %73 %69
+%77 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
+%78 = OpAccessChain %_ptr_Function_float %77 %int_0
+OpStore %78 %float_0
+%80 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
+%81 = OpLoad %v4float %80
+%82 = OpVectorShuffle %v4float %81 %79 6 4 7 5
+OpStore %80 %82
+%89 = OpAccessChain %_ptr_Function_float %s %int_0
+OpStore %89 %float_0
+%90 = OpAccessChain %_ptr_Function_float %s %int_1 %int_1
+OpStore %90 %float_0
+%92 = OpAccessChain %_ptr_Function_v4float %s %int_2
+%93 = OpLoad %v4float %92
+%94 = OpVectorShuffle %v4float %93 %91 5 6 4 3
+OpStore %92 %94
+%96 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_2
+%97 = OpLoad %v4float %96
+%98 = OpVectorShuffle %v4float %97 %95 0 4 2 5
+OpStore %96 %98
+OpStore %l %float_0
+%101 = OpAccessChain %_ptr_Function_int %ai %int_0
+%102 = OpLoad %int %101
+%103 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0
+%104 = OpLoad %v4int %103
+%105 = OpCompositeExtract %int %104 0
+%106 = OpIAdd %int %102 %105
+OpStore %101 %106
+%107 = OpAccessChain %_ptr_Function_float %s %int_0
+OpStore %107 %float_1
+%108 = OpAccessChain %_ptr_Function_float %s %int_1 %int_0
+OpStore %108 %float_2
+%109 = OpAccessChain %_ptr_Function_v4float %s %int_2
+OpStore %109 %79
+%111 = OpAccessChain %_ptr_Function_v4float %s %int_3 %int_0
+OpStore %111 %110
+%112 = OpAccessChain %_ptr_Function_v4float %af4 %int_0
+%113 = OpLoad %v4float %112
+%114 = OpAccessChain %_ptr_Function_v3float %ah2x4 %int_0 %int_0
+%116 = OpLoad %v3float %114
+%117 = OpCompositeExtract %float %116 0
+%118 = OpVectorTimesScalar %v4float %113 %117
+OpStore %112 %118
+%119 = OpAccessChain %_ptr_Function_int %i4 %int_1
+%120 = OpLoad %int %119
+%121 = OpLoad %int %i
+%122 = OpIMul %int %120 %121
+OpStore %119 %122
+%123 = OpAccessChain %_ptr_Function_float %x %int_1
+%124 = OpLoad %float %123
+%125 = OpLoad %float %l
+%126 = OpFMul %float %124 %125
+OpStore %123 %126
+%127 = OpAccessChain %_ptr_Function_float %s %int_0
+%128 = OpLoad %float %127
+%129 = OpLoad %float %l
+%130 = OpFMul %float %128 %129
+OpStore %127 %130
+%131 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%133 = OpLoad %v4float %131
+OpReturnValue %133
 OpFunctionEnd
diff --git a/tests/sksl/shared/Assignment.glsl b/tests/sksl/shared/Assignment.glsl
index 5f2fb97..42a5e79 100644
--- a/tests/sksl/shared/Assignment.glsl
+++ b/tests/sksl/shared/Assignment.glsl
@@ -8,8 +8,12 @@
     vec4 ah4[5];
 };
 vec4 main() {
+    int i;
+    i = 0;
     ivec4 i4;
     i4 = ivec4(1, 2, 3, 4);
+    mat3 f3x3;
+    f3x3 = mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
     vec4 x;
     x.w = 0.0;
     x.yx = vec2(0.0);
@@ -27,14 +31,18 @@
     s.af[1] = 0.0;
     s.h4.zxy = vec3(9.0);
     s.ah4[2].yw = vec2(5.0);
+    float l;
+    float r;
+
+    l = 0.0;
     ai[0] += ai4[0].x;
     s.f = 1.0;
     s.af[0] = 2.0;
     s.h4 = vec4(1.0);
     s.ah4[0] = vec4(2.0);
     af4[0] *= ah2x4[0][0].x;
-    i4.y *= 0;
-    x.y *= 0.0;
-    s.f *= 0.0;
+    i4.y *= i;
+    x.y *= l;
+    s.f *= l;
     return colorGreen;
 }
diff --git a/tests/sksl/shared/Assignment.metal b/tests/sksl/shared/Assignment.metal
index 7a8d59a..55bbe6d 100644
--- a/tests/sksl/shared/Assignment.metal
+++ b/tests/sksl/shared/Assignment.metal
@@ -19,8 +19,12 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    int i;
+    i = 0;
     int4 i4;
     i4 = int4(1, 2, 3, 4);
+    float3x3 f3x3;
+    f3x3 = float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0));
     float4 x;
     x.w = 0.0;
     x.yx = float2(0.0);
@@ -38,15 +42,19 @@
     s.af[1] = 0.0;
     s.h4.zxy = float3(9.0);
     s.ah4[2].yw = float2(5.0);
+    float l;
+    float r;
+
+    l = 0.0;
     ai[0] += ai4[0].x;
     s.f = 1.0;
     s.af[0] = 2.0;
     s.h4 = float4(1.0);
     s.ah4[0] = float4(2.0);
     af4[0] *= ah2x4[0][0].x;
-    i4.y = i4.y * 0;
-    x.y = x.y * 0.0;
-    s.f *= 0.0;
+    i4.y = i4.y * i;
+    x.y = x.y * l;
+    s.f *= l;
     _out.sk_FragColor = _uniforms.colorGreen;
     return _out;
 }
diff --git a/tests/sksl/shared/Caps.asm.frag b/tests/sksl/shared/Caps.asm.frag
index 5852858..7fdbac6 100644
--- a/tests/sksl/shared/Caps.asm.frag
+++ b/tests/sksl/shared/Caps.asm.frag
@@ -6,12 +6,15 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
+OpName %y "y"
+OpName %z "z"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %17 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -21,13 +24,31 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+%int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %v3float = OpTypeVector %float 3
-%float_1 = OpConstant %float 1
-%15 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %main = OpFunction %void None %11
 %12 = OpLabel
-%16 = OpLoad %v4float %sk_FragColor
-%17 = OpVectorShuffle %v4float %16 %15 4 5 6 3
-OpStore %sk_FragColor %17
+%x = OpVariable %_ptr_Function_int Function
+%y = OpVariable %_ptr_Function_int Function
+%z = OpVariable %_ptr_Function_int Function
+OpStore %x %int_0
+OpStore %y %int_0
+OpStore %z %int_0
+OpStore %x %int_1
+OpStore %y %int_1
+OpStore %z %int_1
+%20 = OpLoad %int %x
+%21 = OpConvertSToF %float %20
+%22 = OpLoad %int %y
+%23 = OpConvertSToF %float %22
+%24 = OpLoad %int %z
+%25 = OpConvertSToF %float %24
+%26 = OpCompositeConstruct %v3float %21 %23 %25
+%28 = OpLoad %v4float %sk_FragColor
+%29 = OpVectorShuffle %v4float %28 %26 4 5 6 3
+OpStore %sk_FragColor %29
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Caps.glsl b/tests/sksl/shared/Caps.glsl
index d802e85..f4079c3 100644
--- a/tests/sksl/shared/Caps.glsl
+++ b/tests/sksl/shared/Caps.glsl
@@ -1,5 +1,11 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor.xyz = vec3(1.0, 1.0, 1.0);
+    int x = 0;
+    int y = 0;
+    int z = 0;
+    x = 1;
+    y = 1;
+    z = 1;
+    sk_FragColor.xyz = vec3(float(x), float(y), float(z));
 }
diff --git a/tests/sksl/shared/Caps.metal b/tests/sksl/shared/Caps.metal
index bb00f84..dcff059 100644
--- a/tests/sksl/shared/Caps.metal
+++ b/tests/sksl/shared/Caps.metal
@@ -9,6 +9,12 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor.xyz = float3(1.0, 1.0, 1.0);
+    int x = 0;
+    int y = 0;
+    int z = 0;
+    x = 1;
+    y = 1;
+    z = 1;
+    _out.sk_FragColor.xyz = float3(float(x), float(y), float(z));
     return _out;
 }
diff --git a/tests/sksl/shared/CastsRoundTowardZero.asm.frag b/tests/sksl/shared/CastsRoundTowardZero.asm.frag
index 1346196..d8d35f7 100644
--- a/tests/sksl/shared/CastsRoundTowardZero.asm.frag
+++ b/tests/sksl/shared/CastsRoundTowardZero.asm.frag
@@ -10,6 +10,7 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %ok "ok"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -22,7 +23,10 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %24 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
+OpDecorate %33 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,9 +40,13 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_bool = OpTypePointer Function %bool
+%true = OpConstantTrue %bool
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -47,7 +55,23 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%20 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%24 = OpLoad %v4float %20
-OpReturnValue %24
+%ok = OpVariable %_ptr_Function_bool Function
+%24 = OpVariable %_ptr_Function_v4float Function
+OpStore %ok %true
+%23 = OpLoad %bool %ok
+OpSelectionMerge %28 None
+OpBranchConditional %23 %26 %27
+%26 = OpLabel
+%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %29
+OpStore %24 %33
+OpBranch %28
+%27 = OpLabel
+%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%36 = OpLoad %v4float %34
+OpStore %24 %36
+OpBranch %28
+%28 = OpLabel
+%37 = OpLoad %v4float %24
+OpReturnValue %37
 OpFunctionEnd
diff --git a/tests/sksl/shared/CastsRoundTowardZero.glsl b/tests/sksl/shared/CastsRoundTowardZero.glsl
index f06fb46..a886f64 100644
--- a/tests/sksl/shared/CastsRoundTowardZero.glsl
+++ b/tests/sksl/shared/CastsRoundTowardZero.glsl
@@ -3,5 +3,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return colorGreen;
+    bool ok = true;
+    return ok ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/CastsRoundTowardZero.metal b/tests/sksl/shared/CastsRoundTowardZero.metal
index 94983ac..aae0eeb 100644
--- a/tests/sksl/shared/CastsRoundTowardZero.metal
+++ b/tests/sksl/shared/CastsRoundTowardZero.metal
@@ -15,6 +15,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    bool ok = true;
+    _out.sk_FragColor = ok ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/ConstVariableComparison.asm.frag b/tests/sksl/shared/ConstVariableComparison.asm.frag
index 0116306..a6a7836 100644
--- a/tests/sksl/shared/ConstVariableComparison.asm.frag
+++ b/tests/sksl/shared/ConstVariableComparison.asm.frag
@@ -10,6 +10,8 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %a "a"
+OpName %b "b"
 OpName %c "c"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
@@ -23,8 +25,8 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %36 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %45 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -39,8 +41,10 @@
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%float_0 = OpConstant %float 0
+%23 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %float_1 = OpConstant %float 1
-%24 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%26 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %v4bool = OpTypeVector %bool 4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
@@ -54,22 +58,28 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
+%a = OpVariable %_ptr_Function_v4float Function
+%b = OpVariable %_ptr_Function_v4float Function
 %c = OpVariable %_ptr_Function_v4float Function
-%22 = OpExtInst %v4float %1 FAbs %24
-OpStore %c %22
-%25 = OpLoad %v4float %c
-%26 = OpFOrdNotEqual %v4bool %24 %25
-%28 = OpAny %bool %26
-OpSelectionMerge %31 None
-OpBranchConditional %28 %29 %30
-%29 = OpLabel
-%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%36 = OpLoad %v4float %32
-OpReturnValue %36
-%30 = OpLabel
-%37 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%39 = OpLoad %v4float %37
-OpReturnValue %39
-%31 = OpLabel
+OpStore %a %23
+OpStore %b %26
+%29 = OpLoad %v4float %b
+%28 = OpExtInst %v4float %1 FAbs %29
+OpStore %c %28
+%30 = OpLoad %v4float %b
+%31 = OpLoad %v4float %c
+%32 = OpFOrdNotEqual %v4bool %30 %31
+%34 = OpAny %bool %32
+OpSelectionMerge %37 None
+OpBranchConditional %34 %35 %36
+%35 = OpLabel
+%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%42 = OpLoad %v4float %38
+OpReturnValue %42
+%36 = OpLabel
+%43 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%45 = OpLoad %v4float %43
+OpReturnValue %45
+%37 = OpLabel
 OpUnreachable
 OpFunctionEnd
diff --git a/tests/sksl/shared/ConstVariableComparison.glsl b/tests/sksl/shared/ConstVariableComparison.glsl
index 176f9f0..4f9c201 100644
--- a/tests/sksl/shared/ConstVariableComparison.glsl
+++ b/tests/sksl/shared/ConstVariableComparison.glsl
@@ -3,8 +3,10 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    vec4 c = abs(vec4(1.0));
-    if (vec4(1.0) != c) {
+    const vec4 a = vec4(0.0);
+    const vec4 b = vec4(1.0);
+    vec4 c = abs(b);
+    if (b != c) {
         return colorRed;
     } else {
         return colorGreen;
diff --git a/tests/sksl/shared/ConstVariableComparison.metal b/tests/sksl/shared/ConstVariableComparison.metal
index 5473abb..3eeb22e 100644
--- a/tests/sksl/shared/ConstVariableComparison.metal
+++ b/tests/sksl/shared/ConstVariableComparison.metal
@@ -15,8 +15,10 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float4 c = abs(float4(1.0));
-    if (any(float4(1.0) != c)) {
+    const float4 a = float4(0.0);
+    const float4 b = float4(1.0);
+    float4 c = abs(b);
+    if (any(b != c)) {
         _out.sk_FragColor = _uniforms.colorRed;
         return _out;
     } else {
diff --git a/tests/sksl/shared/ConstantIf.asm.frag b/tests/sksl/shared/ConstantIf.asm.frag
index 1346196..2997c79 100644
--- a/tests/sksl/shared/ConstantIf.asm.frag
+++ b/tests/sksl/shared/ConstantIf.asm.frag
@@ -10,6 +10,10 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %a "a"
+OpName %b "b"
+OpName %c "c"
+OpName %d "d"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -22,7 +26,9 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %24 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
+OpDecorate %57 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,9 +42,15 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
-%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%int_5 = OpConstant %int 5
+%false = OpConstantFalse %bool
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -47,7 +59,57 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%20 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%24 = OpLoad %v4float %20
-OpReturnValue %24
+%a = OpVariable %_ptr_Function_int Function
+%b = OpVariable %_ptr_Function_int Function
+%c = OpVariable %_ptr_Function_int Function
+%d = OpVariable %_ptr_Function_int Function
+%48 = OpVariable %_ptr_Function_v4float Function
+OpStore %a %int_0
+OpStore %b %int_0
+OpStore %c %int_0
+OpStore %d %int_0
+OpStore %a %int_1
+OpStore %b %int_2
+OpStore %c %int_5
+%31 = OpLoad %int %a
+%32 = OpIEqual %bool %31 %int_1
+OpSelectionMerge %34 None
+OpBranchConditional %32 %33 %34
+%33 = OpLabel
+%35 = OpLoad %int %b
+%36 = OpIEqual %bool %35 %int_2
+OpBranch %34
+%34 = OpLabel
+%37 = OpPhi %bool %false %19 %36 %33
+OpSelectionMerge %39 None
+OpBranchConditional %37 %38 %39
+%38 = OpLabel
+%40 = OpLoad %int %c
+%41 = OpIEqual %bool %40 %int_5
+OpBranch %39
+%39 = OpLabel
+%42 = OpPhi %bool %false %34 %41 %38
+OpSelectionMerge %44 None
+OpBranchConditional %42 %43 %44
+%43 = OpLabel
+%45 = OpLoad %int %d
+%46 = OpIEqual %bool %45 %int_0
+OpBranch %44
+%44 = OpLabel
+%47 = OpPhi %bool %false %39 %46 %43
+OpSelectionMerge %52 None
+OpBranchConditional %47 %50 %51
+%50 = OpLabel
+%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%55 = OpLoad %v4float %53
+OpStore %48 %55
+OpBranch %52
+%51 = OpLabel
+%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%57 = OpLoad %v4float %56
+OpStore %48 %57
+OpBranch %52
+%52 = OpLabel
+%58 = OpLoad %v4float %48
+OpReturnValue %58
 OpFunctionEnd
diff --git a/tests/sksl/shared/ConstantIf.glsl b/tests/sksl/shared/ConstantIf.glsl
index f06fb46..75a5dda 100644
--- a/tests/sksl/shared/ConstantIf.glsl
+++ b/tests/sksl/shared/ConstantIf.glsl
@@ -3,5 +3,13 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return colorGreen;
+    int a = 0;
+    int b = 0;
+    int c = 0;
+    int d = 0;
+
+    a = 1;
+    b = 2;
+    c = 5;
+    return ((a == 1 && b == 2) && c == 5) && d == 0 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/ConstantIf.metal b/tests/sksl/shared/ConstantIf.metal
index 94983ac..51d1237 100644
--- a/tests/sksl/shared/ConstantIf.metal
+++ b/tests/sksl/shared/ConstantIf.metal
@@ -15,6 +15,14 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    int a = 0;
+    int b = 0;
+    int c = 0;
+    int d = 0;
+
+    a = 1;
+    b = 2;
+    c = 5;
+    _out.sk_FragColor = ((a == 1 && b == 2) && c == 5) && d == 0 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/DeadIfStatement.asm.frag b/tests/sksl/shared/DeadIfStatement.asm.frag
index 1346196..80bb740 100644
--- a/tests/sksl/shared/DeadIfStatement.asm.frag
+++ b/tests/sksl/shared/DeadIfStatement.asm.frag
@@ -10,6 +10,7 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -22,7 +23,7 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %24 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,6 +37,8 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_bool = OpTypePointer Function %bool
+%true = OpConstantTrue %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -47,7 +50,9 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%20 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%24 = OpLoad %v4float %20
-OpReturnValue %24
+%x = OpVariable %_ptr_Function_bool Function
+OpStore %x %true
+%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%27 = OpLoad %v4float %23
+OpReturnValue %27
 OpFunctionEnd
diff --git a/tests/sksl/shared/DeadIfStatement.glsl b/tests/sksl/shared/DeadIfStatement.glsl
index f06fb46..a0ff1a0 100644
--- a/tests/sksl/shared/DeadIfStatement.glsl
+++ b/tests/sksl/shared/DeadIfStatement.glsl
@@ -3,5 +3,6 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
+    const bool x = true;
     return colorGreen;
 }
diff --git a/tests/sksl/shared/DeadIfStatement.metal b/tests/sksl/shared/DeadIfStatement.metal
index 94983ac..8bd395a 100644
--- a/tests/sksl/shared/DeadIfStatement.metal
+++ b/tests/sksl/shared/DeadIfStatement.metal
@@ -15,6 +15,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    const bool x = true;
     _out.sk_FragColor = _uniforms.colorGreen;
     return _out;
 }
diff --git a/tests/sksl/shared/DeadLoopVariable.asm.frag b/tests/sksl/shared/DeadLoopVariable.asm.frag
index b52d272..ff6311b 100644
--- a/tests/sksl/shared/DeadLoopVariable.asm.frag
+++ b/tests/sksl/shared/DeadLoopVariable.asm.frag
@@ -9,6 +9,7 @@
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -19,7 +20,7 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %30 RelaxedPrecision
+OpDecorate %34 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -33,10 +34,11 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
-%true = OpConstantTrue %bool
-%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
+%int_4 = OpConstant %int 4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -45,18 +47,22 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-OpBranch %20
-%20 = OpLabel
-OpLoopMerge %24 %23 None
-OpBranch %21
-%21 = OpLabel
-OpBranchConditional %true %22 %24
-%22 = OpLabel
+%x = OpVariable %_ptr_Function_int Function
+OpStore %x %int_0
 OpBranch %24
-%23 = OpLabel
-OpBranch %20
 %24 = OpLabel
-%26 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%30 = OpLoad %v4float %26
-OpReturnValue %30
+OpLoopMerge %28 %27 None
+OpBranch %25
+%25 = OpLabel
+%29 = OpLoad %int %x
+%31 = OpSLessThan %bool %29 %int_4
+OpBranchConditional %31 %26 %28
+%26 = OpLabel
+OpBranch %28
+%27 = OpLabel
+OpBranch %24
+%28 = OpLabel
+%32 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%34 = OpLoad %v4float %32
+OpReturnValue %34
 OpFunctionEnd
diff --git a/tests/sksl/shared/DeadLoopVariable.glsl b/tests/sksl/shared/DeadLoopVariable.glsl
index 6d31c14..a7b04b8 100644
--- a/tests/sksl/shared/DeadLoopVariable.glsl
+++ b/tests/sksl/shared/DeadLoopVariable.glsl
@@ -2,7 +2,7 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 vec4 main() {
-    for (; true; ) {
+    for (int x = 0;x < 4; ) {
         break;
     }
     return colorGreen;
diff --git a/tests/sksl/shared/DeadLoopVariable.metal b/tests/sksl/shared/DeadLoopVariable.metal
index 52d3cee..50d222e 100644
--- a/tests/sksl/shared/DeadLoopVariable.metal
+++ b/tests/sksl/shared/DeadLoopVariable.metal
@@ -13,7 +13,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    for (; true; ) {
+    for (int x = 0;x < 4; ) {
         break;
     }
     _out.sk_FragColor = _uniforms.colorGreen;
diff --git a/tests/sksl/shared/DependentInitializers.asm.frag b/tests/sksl/shared/DependentInitializers.asm.frag
index 1346196..f0af579 100644
--- a/tests/sksl/shared/DependentInitializers.asm.frag
+++ b/tests/sksl/shared/DependentInitializers.asm.frag
@@ -10,6 +10,8 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %x "x"
+OpName %y "y"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -22,7 +24,9 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %24 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %43 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,9 +40,15 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_float = OpTypePointer Function %float
+%float_0_5 = OpConstant %float 0.5
+%float_2 = OpConstant %float 2
+%float_1 = OpConstant %float 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
+%int_1 = OpConstant %int 1
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -47,7 +57,28 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
-%20 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%24 = OpLoad %v4float %20
-OpReturnValue %24
+%x = OpVariable %_ptr_Function_float Function
+%y = OpVariable %_ptr_Function_float Function
+%30 = OpVariable %_ptr_Function_v4float Function
+OpStore %x %float_0_5
+%24 = OpLoad %float %x
+%26 = OpFMul %float %24 %float_2
+OpStore %y %26
+%27 = OpLoad %float %y
+%29 = OpFOrdEqual %bool %27 %float_1
+OpSelectionMerge %34 None
+OpBranchConditional %29 %32 %33
+%32 = OpLabel
+%35 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%39 = OpLoad %v4float %35
+OpStore %30 %39
+OpBranch %34
+%33 = OpLabel
+%40 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%42 = OpLoad %v4float %40
+OpStore %30 %42
+OpBranch %34
+%34 = OpLabel
+%43 = OpLoad %v4float %30
+OpReturnValue %43
 OpFunctionEnd
diff --git a/tests/sksl/shared/DependentInitializers.glsl b/tests/sksl/shared/DependentInitializers.glsl
index f06fb46..81adb41 100644
--- a/tests/sksl/shared/DependentInitializers.glsl
+++ b/tests/sksl/shared/DependentInitializers.glsl
@@ -3,5 +3,8 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
-    return colorGreen;
+    float x = 0.5;
+    float y = x * 2.0;
+
+    return y == 1.0 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/DependentInitializers.metal b/tests/sksl/shared/DependentInitializers.metal
index 94983ac..ae991bf 100644
--- a/tests/sksl/shared/DependentInitializers.metal
+++ b/tests/sksl/shared/DependentInitializers.metal
@@ -15,6 +15,9 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    float x = 0.5;
+    float y = x * 2.0;
+
+    _out.sk_FragColor = y == 1.0 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/Discard.asm.frag b/tests/sksl/shared/Discard.asm.frag
index b242792..ce6d8fb 100644
--- a/tests/sksl/shared/Discard.asm.frag
+++ b/tests/sksl/shared/Discard.asm.frag
@@ -6,11 +6,13 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpDecorate %16 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -20,7 +22,16 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+%float_1 = OpConstant %float 1
 %main = OpFunction %void None %11
 %12 = OpLabel
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_1
 OpKill
+%17 = OpLabel
+%16 = OpLoad %float %x
+%18 = OpCompositeConstruct %v4float %16 %16 %16 %16
+OpStore %sk_FragColor %18
+OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Discard.glsl b/tests/sksl/shared/Discard.glsl
index 4c0db9e..9c1e86c 100644
--- a/tests/sksl/shared/Discard.glsl
+++ b/tests/sksl/shared/Discard.glsl
@@ -1,7 +1,10 @@
 
 out vec4 sk_FragColor;
 void main() {
+    float x;
     {
+        x = 1.0;
         discard;
     }
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/Discard.metal b/tests/sksl/shared/Discard.metal
index 42d1868..812165e 100644
--- a/tests/sksl/shared/Discard.metal
+++ b/tests/sksl/shared/Discard.metal
@@ -9,8 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float x;
     {
+        x = 1.0;
         discard_fragment();
     }
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/Enum.asm.frag b/tests/sksl/shared/Enum.asm.frag
index a3b5024..5a4b820 100644
--- a/tests/sksl/shared/Enum.asm.frag
+++ b/tests/sksl/shared/Enum.asm.frag
@@ -1,71 +1,9 @@
-OpCapability Shader
-%1 = OpExtInstImport "GLSL.std.450"
-OpMemoryModel Logical GLSL450
-OpEntryPoint Fragment %main "main" %sk_FragColor %sk_Clockwise
-OpExecutionMode %main OriginUpperLeft
-OpName %sk_FragColor "sk_FragColor"
-OpName %sk_Clockwise "sk_Clockwise"
-OpName %main "main"
-OpDecorate %sk_FragColor RelaxedPrecision
-OpDecorate %sk_FragColor Location 0
-OpDecorate %sk_FragColor Index 0
-OpDecorate %sk_Clockwise RelaxedPrecision
-OpDecorate %sk_Clockwise BuiltIn FrontFacing
-%float = OpTypeFloat 32
-%v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-%sk_FragColor = OpVariable %_ptr_Output_v4float Output
-%bool = OpTypeBool
-%_ptr_Input_bool = OpTypePointer Input %bool
-%sk_Clockwise = OpVariable %_ptr_Input_bool Input
-%void = OpTypeVoid
-%11 = OpTypeFunction %void
-%float_1 = OpConstant %float 1
-%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-%float_2 = OpConstant %float 2
-%16 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
-%float_6 = OpConstant %float 6
-%18 = OpConstantComposite %v4float %float_6 %float_6 %float_6 %float_6
-%float_7 = OpConstant %float 7
-%20 = OpConstantComposite %v4float %float_7 %float_7 %float_7 %float_7
-%float_n8 = OpConstant %float -8
-%22 = OpConstantComposite %v4float %float_n8 %float_n8 %float_n8 %float_n8
-%float_n9 = OpConstant %float -9
-%24 = OpConstantComposite %v4float %float_n9 %float_n9 %float_n9 %float_n9
-%float_10 = OpConstant %float 10
-%26 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10
-%float_11 = OpConstant %float 11
-%28 = OpConstantComposite %v4float %float_11 %float_11 %float_11 %float_11
-%float_13 = OpConstant %float 13
-%30 = OpConstantComposite %v4float %float_13 %float_13 %float_13 %float_13
-%float_15 = OpConstant %float 15
-%32 = OpConstantComposite %v4float %float_15 %float_15 %float_15 %float_15
-%float_16 = OpConstant %float 16
-%34 = OpConstantComposite %v4float %float_16 %float_16 %float_16 %float_16
-%float_18 = OpConstant %float 18
-%36 = OpConstantComposite %v4float %float_18 %float_18 %float_18 %float_18
-%float_19 = OpConstant %float 19
-%38 = OpConstantComposite %v4float %float_19 %float_19 %float_19 %float_19
-%float_20 = OpConstant %float 20
-%40 = OpConstantComposite %v4float %float_20 %float_20 %float_20 %float_20
-%float_21 = OpConstant %float 21
-%42 = OpConstantComposite %v4float %float_21 %float_21 %float_21 %float_21
-%main = OpFunction %void None %11
-%12 = OpLabel
-OpStore %sk_FragColor %14
-OpStore %sk_FragColor %16
-OpStore %sk_FragColor %18
-OpStore %sk_FragColor %20
-OpStore %sk_FragColor %22
-OpStore %sk_FragColor %24
-OpStore %sk_FragColor %26
-OpStore %sk_FragColor %28
-OpStore %sk_FragColor %30
-OpStore %sk_FragColor %32
-OpStore %sk_FragColor %34
-OpStore %sk_FragColor %36
-OpStore %sk_FragColor %38
-OpStore %sk_FragColor %40
-OpStore %sk_FragColor %42
-OpReturn
-OpFunctionEnd
+### Compilation failed:
+
+error: 13: static if has non-static test
+error: 14: static if has non-static test
+error: 16: static if has non-static test
+error: 17: static if has non-static test
+error: 36: static if has non-static test
+error: 38: static if has non-static test
+6 errors
diff --git a/tests/sksl/shared/Enum.glsl b/tests/sksl/shared/Enum.glsl
index e35fe8b..5a4b820 100644
--- a/tests/sksl/shared/Enum.glsl
+++ b/tests/sksl/shared/Enum.glsl
@@ -1,37 +1,9 @@
+### Compilation failed:
 
-out vec4 sk_FragColor;
-void main() {
-    {
-        sk_FragColor = vec4(1.0);
-    }
-    {
-        sk_FragColor = vec4(2.0);
-    }
-    {
-        sk_FragColor = vec4(6.0);
-    }
-    sk_FragColor = vec4(7.0);
-    sk_FragColor = vec4(-8.0);
-    sk_FragColor = vec4(-9.0);
-    sk_FragColor = vec4(10.0);
-    {
-        sk_FragColor = vec4(11.0);
-    }
-    {
-        sk_FragColor = vec4(13.0);
-    }
-    {
-        sk_FragColor = vec4(15.0);
-    }
-    {
-        sk_FragColor = vec4(16.0);
-    }
-    {
-        sk_FragColor = vec4(18.0);
-    }
-    sk_FragColor = vec4(19.0);
-    sk_FragColor = vec4(20.0);
-    {
-        sk_FragColor = vec4(21.0);
-    }
-}
+error: 13: static if has non-static test
+error: 14: static if has non-static test
+error: 16: static if has non-static test
+error: 17: static if has non-static test
+error: 36: static if has non-static test
+error: 38: static if has non-static test
+6 errors
diff --git a/tests/sksl/shared/Enum.metal b/tests/sksl/shared/Enum.metal
index 4c6bcbb..5a4b820 100644
--- a/tests/sksl/shared/Enum.metal
+++ b/tests/sksl/shared/Enum.metal
@@ -1,46 +1,9 @@
-#include <metal_stdlib>
-#include <simd/simd.h>
-using namespace metal;
-struct Inputs {
-};
-struct Outputs {
-    float4 sk_FragColor [[color(0)]];
-};
-fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
-    Outputs _out;
-    (void)_out;
-    {
-        _out.sk_FragColor = float4(1.0);
-    }
-    {
-        _out.sk_FragColor = float4(2.0);
-    }
-    {
-        _out.sk_FragColor = float4(6.0);
-    }
-    _out.sk_FragColor = float4(7.0);
-    _out.sk_FragColor = float4(-8.0);
-    _out.sk_FragColor = float4(-9.0);
-    _out.sk_FragColor = float4(10.0);
-    {
-        _out.sk_FragColor = float4(11.0);
-    }
-    {
-        _out.sk_FragColor = float4(13.0);
-    }
-    {
-        _out.sk_FragColor = float4(15.0);
-    }
-    {
-        _out.sk_FragColor = float4(16.0);
-    }
-    {
-        _out.sk_FragColor = float4(18.0);
-    }
-    _out.sk_FragColor = float4(19.0);
-    _out.sk_FragColor = float4(20.0);
-    {
-        _out.sk_FragColor = float4(21.0);
-    }
-    return _out;
-}
+### Compilation failed:
+
+error: 13: static if has non-static test
+error: 14: static if has non-static test
+error: 16: static if has non-static test
+error: 17: static if has non-static test
+error: 36: static if has non-static test
+error: 38: static if has non-static test
+6 errors
diff --git a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
index 1346196..3b6afe7 100644
--- a/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
+++ b/tests/sksl/shared/FunctionArgTypeMatch.asm.frag
@@ -9,6 +9,27 @@
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
+OpName %takes_float2 "takes_float2"
+OpName %takes_float3 "takes_float3"
+OpName %takes_float4 "takes_float4"
+OpName %takes_float2x2 "takes_float2x2"
+OpName %takes_float3x3 "takes_float3x3"
+OpName %takes_float4x4 "takes_float4x4"
+OpName %takes_half "takes_half"
+OpName %takes_half2 "takes_half2"
+OpName %takes_half3 "takes_half3"
+OpName %takes_half4 "takes_half4"
+OpName %takes_half2x2 "takes_half2x2"
+OpName %takes_half3x3 "takes_half3x3"
+OpName %takes_half4x4 "takes_half4x4"
+OpName %takes_bool "takes_bool"
+OpName %takes_bool2 "takes_bool2"
+OpName %takes_bool3 "takes_bool3"
+OpName %takes_bool4 "takes_bool4"
+OpName %takes_int "takes_int"
+OpName %takes_int2 "takes_int2"
+OpName %takes_int3 "takes_int3"
+OpName %takes_int4 "takes_int4"
 OpName %main "main"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
@@ -20,9 +41,26 @@
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
 OpDecorate %_UniformBuffer Block
-OpDecorate %10 Binding 0
-OpDecorate %10 DescriptorSet 0
-OpDecorate %24 RelaxedPrecision
+OpDecorate %31 Binding 0
+OpDecorate %31 DescriptorSet 0
+OpDecorate %200 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
+OpDecorate %199 RelaxedPrecision
+OpDecorate %199 RelaxedPrecision
+OpDecorate %208 RelaxedPrecision
+OpDecorate %209 RelaxedPrecision
+OpDecorate %210 RelaxedPrecision
+OpDecorate %207 RelaxedPrecision
+OpDecorate %207 RelaxedPrecision
+OpDecorate %217 RelaxedPrecision
+OpDecorate %218 RelaxedPrecision
+OpDecorate %219 RelaxedPrecision
+OpDecorate %220 RelaxedPrecision
+OpDecorate %216 RelaxedPrecision
+OpDecorate %216 RelaxedPrecision
+OpDecorate %281 RelaxedPrecision
+OpDecorate %283 RelaxedPrecision
+OpDecorate %284 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,22 +70,414 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %_UniformBuffer = OpTypeStruct %v4float %v4float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
-%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%31 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%18 = OpTypeFunction %v4float
-%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
+%36 = OpTypeFunction %void
+%v2float = OpTypeVector %float 2
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+%40 = OpTypeFunction %bool %_ptr_Function_v2float
+%true = OpConstantTrue %bool
+%v3float = OpTypeVector %float 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+%46 = OpTypeFunction %bool %_ptr_Function_v3float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%50 = OpTypeFunction %bool %_ptr_Function_v4float
+%mat2v2float = OpTypeMatrix %v2float 2
+%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
+%55 = OpTypeFunction %bool %_ptr_Function_mat2v2float
+%mat3v3float = OpTypeMatrix %v3float 3
+%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
+%60 = OpTypeFunction %bool %_ptr_Function_mat3v3float
+%mat4v4float = OpTypeMatrix %v4float 4
+%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
+%65 = OpTypeFunction %bool %_ptr_Function_mat4v4float
+%_ptr_Function_float = OpTypePointer Function %float
+%69 = OpTypeFunction %bool %_ptr_Function_float
+%_ptr_Function_bool = OpTypePointer Function %bool
+%85 = OpTypeFunction %bool %_ptr_Function_bool
+%v2bool = OpTypeVector %bool 2
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+%90 = OpTypeFunction %bool %_ptr_Function_v2bool
+%v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+%95 = OpTypeFunction %bool %_ptr_Function_v3bool
+%v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+%100 = OpTypeFunction %bool %_ptr_Function_v4bool
 %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+%105 = OpTypeFunction %bool %_ptr_Function_int
+%v2int = OpTypeVector %int 2
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+%110 = OpTypeFunction %bool %_ptr_Function_v2int
+%v3int = OpTypeVector %int 3
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+%115 = OpTypeFunction %bool %_ptr_Function_v3int
+%v4int = OpTypeVector %int 4
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+%120 = OpTypeFunction %bool %_ptr_Function_v4int
+%124 = OpTypeFunction %v4float
+%false = OpConstantFalse %bool
+%float_2 = OpConstant %float 2
+%130 = OpConstantComposite %v2float %float_2 %float_2
+%float_3 = OpConstant %float 3
+%137 = OpConstantComposite %v3float %float_3 %float_3 %float_3
+%float_4 = OpConstant %float 4
+%144 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
+%231 = OpConstantComposite %v2bool %true %true
+%237 = OpConstantComposite %v3bool %true %true %true
+%243 = OpConstantComposite %v4bool %true %true %true %true
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
+%256 = OpConstantComposite %v2int %int_2 %int_2
+%int_3 = OpConstant %int 3
+%263 = OpConstantComposite %v3int %int_3 %int_3 %int_3
+%int_4 = OpConstant %int 4
+%270 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4
+%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
-%_entrypoint = OpFunction %void None %15
-%16 = OpLabel
-%17 = OpFunctionCall %v4float %main
-OpStore %sk_FragColor %17
+%_entrypoint = OpFunction %void None %36
+%37 = OpLabel
+%38 = OpFunctionCall %v4float %main
+OpStore %sk_FragColor %38
 OpReturn
 OpFunctionEnd
-%main = OpFunction %v4float None %18
-%19 = OpLabel
-%20 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%24 = OpLoad %v4float %20
-OpReturnValue %24
+%takes_float2 = OpFunction %bool None %40
+%42 = OpFunctionParameter %_ptr_Function_v2float
+%43 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_float3 = OpFunction %bool None %46
+%48 = OpFunctionParameter %_ptr_Function_v3float
+%49 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_float4 = OpFunction %bool None %50
+%52 = OpFunctionParameter %_ptr_Function_v4float
+%53 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_float2x2 = OpFunction %bool None %55
+%57 = OpFunctionParameter %_ptr_Function_mat2v2float
+%58 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_float3x3 = OpFunction %bool None %60
+%62 = OpFunctionParameter %_ptr_Function_mat3v3float
+%63 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_float4x4 = OpFunction %bool None %65
+%67 = OpFunctionParameter %_ptr_Function_mat4v4float
+%68 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half = OpFunction %bool None %69
+%71 = OpFunctionParameter %_ptr_Function_float
+%72 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half2 = OpFunction %bool None %40
+%73 = OpFunctionParameter %_ptr_Function_v2float
+%74 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half3 = OpFunction %bool None %46
+%75 = OpFunctionParameter %_ptr_Function_v3float
+%76 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half4 = OpFunction %bool None %50
+%77 = OpFunctionParameter %_ptr_Function_v4float
+%78 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half2x2 = OpFunction %bool None %55
+%79 = OpFunctionParameter %_ptr_Function_mat2v2float
+%80 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half3x3 = OpFunction %bool None %60
+%81 = OpFunctionParameter %_ptr_Function_mat3v3float
+%82 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_half4x4 = OpFunction %bool None %65
+%83 = OpFunctionParameter %_ptr_Function_mat4v4float
+%84 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_bool = OpFunction %bool None %85
+%87 = OpFunctionParameter %_ptr_Function_bool
+%88 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_bool2 = OpFunction %bool None %90
+%92 = OpFunctionParameter %_ptr_Function_v2bool
+%93 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_bool3 = OpFunction %bool None %95
+%97 = OpFunctionParameter %_ptr_Function_v3bool
+%98 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_bool4 = OpFunction %bool None %100
+%102 = OpFunctionParameter %_ptr_Function_v4bool
+%103 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_int = OpFunction %bool None %105
+%107 = OpFunctionParameter %_ptr_Function_int
+%108 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_int2 = OpFunction %bool None %110
+%112 = OpFunctionParameter %_ptr_Function_v2int
+%113 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_int3 = OpFunction %bool None %115
+%117 = OpFunctionParameter %_ptr_Function_v3int
+%118 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%takes_int4 = OpFunction %bool None %120
+%122 = OpFunctionParameter %_ptr_Function_v4int
+%123 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%main = OpFunction %v4float None %124
+%125 = OpLabel
+%131 = OpVariable %_ptr_Function_v2float Function
+%138 = OpVariable %_ptr_Function_v3float Function
+%145 = OpVariable %_ptr_Function_v4float Function
+%154 = OpVariable %_ptr_Function_mat2v2float Function
+%163 = OpVariable %_ptr_Function_mat3v3float Function
+%173 = OpVariable %_ptr_Function_mat4v4float Function
+%179 = OpVariable %_ptr_Function_float Function
+%184 = OpVariable %_ptr_Function_v2float Function
+%189 = OpVariable %_ptr_Function_v3float Function
+%194 = OpVariable %_ptr_Function_v4float Function
+%202 = OpVariable %_ptr_Function_mat2v2float Function
+%211 = OpVariable %_ptr_Function_mat3v3float Function
+%221 = OpVariable %_ptr_Function_mat4v4float Function
+%226 = OpVariable %_ptr_Function_bool Function
+%232 = OpVariable %_ptr_Function_v2bool Function
+%238 = OpVariable %_ptr_Function_v3bool Function
+%244 = OpVariable %_ptr_Function_v4bool Function
+%250 = OpVariable %_ptr_Function_int Function
+%257 = OpVariable %_ptr_Function_v2int Function
+%264 = OpVariable %_ptr_Function_v3int Function
+%271 = OpVariable %_ptr_Function_v4int Function
+%274 = OpVariable %_ptr_Function_v4float Function
+OpSelectionMerge %128 None
+OpBranchConditional %true %127 %128
+%127 = OpLabel
+OpStore %131 %130
+%132 = OpFunctionCall %bool %takes_float2 %131
+OpBranch %128
+%128 = OpLabel
+%133 = OpPhi %bool %false %125 %132 %127
+OpSelectionMerge %135 None
+OpBranchConditional %133 %134 %135
+%134 = OpLabel
+OpStore %138 %137
+%139 = OpFunctionCall %bool %takes_float3 %138
+OpBranch %135
+%135 = OpLabel
+%140 = OpPhi %bool %false %128 %139 %134
+OpSelectionMerge %142 None
+OpBranchConditional %140 %141 %142
+%141 = OpLabel
+OpStore %145 %144
+%146 = OpFunctionCall %bool %takes_float4 %145
+OpBranch %142
+%142 = OpLabel
+%147 = OpPhi %bool %false %135 %146 %141
+OpSelectionMerge %149 None
+OpBranchConditional %147 %148 %149
+%148 = OpLabel
+%152 = OpCompositeConstruct %v2float %float_2 %float_0
+%153 = OpCompositeConstruct %v2float %float_0 %float_2
+%150 = OpCompositeConstruct %mat2v2float %152 %153
+OpStore %154 %150
+%155 = OpFunctionCall %bool %takes_float2x2 %154
+OpBranch %149
+%149 = OpLabel
+%156 = OpPhi %bool %false %142 %155 %148
+OpSelectionMerge %158 None
+OpBranchConditional %156 %157 %158
+%157 = OpLabel
+%160 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%161 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%162 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%159 = OpCompositeConstruct %mat3v3float %160 %161 %162
+OpStore %163 %159
+%164 = OpFunctionCall %bool %takes_float3x3 %163
+OpBranch %158
+%158 = OpLabel
+%165 = OpPhi %bool %false %149 %164 %157
+OpSelectionMerge %167 None
+OpBranchConditional %165 %166 %167
+%166 = OpLabel
+%169 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%170 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%171 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%172 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%168 = OpCompositeConstruct %mat4v4float %169 %170 %171 %172
+OpStore %173 %168
+%174 = OpFunctionCall %bool %takes_float4x4 %173
+OpBranch %167
+%167 = OpLabel
+%175 = OpPhi %bool %false %158 %174 %166
+OpSelectionMerge %177 None
+OpBranchConditional %175 %176 %177
+%176 = OpLabel
+OpStore %179 %float_1
+%180 = OpFunctionCall %bool %takes_half %179
+OpBranch %177
+%177 = OpLabel
+%181 = OpPhi %bool %false %167 %180 %176
+OpSelectionMerge %183 None
+OpBranchConditional %181 %182 %183
+%182 = OpLabel
+OpStore %184 %130
+%185 = OpFunctionCall %bool %takes_half2 %184
+OpBranch %183
+%183 = OpLabel
+%186 = OpPhi %bool %false %177 %185 %182
+OpSelectionMerge %188 None
+OpBranchConditional %186 %187 %188
+%187 = OpLabel
+OpStore %189 %137
+%190 = OpFunctionCall %bool %takes_half3 %189
+OpBranch %188
+%188 = OpLabel
+%191 = OpPhi %bool %false %183 %190 %187
+OpSelectionMerge %193 None
+OpBranchConditional %191 %192 %193
+%192 = OpLabel
+OpStore %194 %144
+%195 = OpFunctionCall %bool %takes_half4 %194
+OpBranch %193
+%193 = OpLabel
+%196 = OpPhi %bool %false %188 %195 %192
+OpSelectionMerge %198 None
+OpBranchConditional %196 %197 %198
+%197 = OpLabel
+%200 = OpCompositeConstruct %v2float %float_2 %float_0
+%201 = OpCompositeConstruct %v2float %float_0 %float_2
+%199 = OpCompositeConstruct %mat2v2float %200 %201
+OpStore %202 %199
+%203 = OpFunctionCall %bool %takes_half2x2 %202
+OpBranch %198
+%198 = OpLabel
+%204 = OpPhi %bool %false %193 %203 %197
+OpSelectionMerge %206 None
+OpBranchConditional %204 %205 %206
+%205 = OpLabel
+%208 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%209 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%210 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%207 = OpCompositeConstruct %mat3v3float %208 %209 %210
+OpStore %211 %207
+%212 = OpFunctionCall %bool %takes_half3x3 %211
+OpBranch %206
+%206 = OpLabel
+%213 = OpPhi %bool %false %198 %212 %205
+OpSelectionMerge %215 None
+OpBranchConditional %213 %214 %215
+%214 = OpLabel
+%217 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%218 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%219 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%220 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%216 = OpCompositeConstruct %mat4v4float %217 %218 %219 %220
+OpStore %221 %216
+%222 = OpFunctionCall %bool %takes_half4x4 %221
+OpBranch %215
+%215 = OpLabel
+%223 = OpPhi %bool %false %206 %222 %214
+OpSelectionMerge %225 None
+OpBranchConditional %223 %224 %225
+%224 = OpLabel
+OpStore %226 %true
+%227 = OpFunctionCall %bool %takes_bool %226
+OpBranch %225
+%225 = OpLabel
+%228 = OpPhi %bool %false %215 %227 %224
+OpSelectionMerge %230 None
+OpBranchConditional %228 %229 %230
+%229 = OpLabel
+OpStore %232 %231
+%233 = OpFunctionCall %bool %takes_bool2 %232
+OpBranch %230
+%230 = OpLabel
+%234 = OpPhi %bool %false %225 %233 %229
+OpSelectionMerge %236 None
+OpBranchConditional %234 %235 %236
+%235 = OpLabel
+OpStore %238 %237
+%239 = OpFunctionCall %bool %takes_bool3 %238
+OpBranch %236
+%236 = OpLabel
+%240 = OpPhi %bool %false %230 %239 %235
+OpSelectionMerge %242 None
+OpBranchConditional %240 %241 %242
+%241 = OpLabel
+OpStore %244 %243
+%245 = OpFunctionCall %bool %takes_bool4 %244
+OpBranch %242
+%242 = OpLabel
+%246 = OpPhi %bool %false %236 %245 %241
+OpSelectionMerge %248 None
+OpBranchConditional %246 %247 %248
+%247 = OpLabel
+OpStore %250 %int_1
+%251 = OpFunctionCall %bool %takes_int %250
+OpBranch %248
+%248 = OpLabel
+%252 = OpPhi %bool %false %242 %251 %247
+OpSelectionMerge %254 None
+OpBranchConditional %252 %253 %254
+%253 = OpLabel
+OpStore %257 %256
+%258 = OpFunctionCall %bool %takes_int2 %257
+OpBranch %254
+%254 = OpLabel
+%259 = OpPhi %bool %false %248 %258 %253
+OpSelectionMerge %261 None
+OpBranchConditional %259 %260 %261
+%260 = OpLabel
+OpStore %264 %263
+%265 = OpFunctionCall %bool %takes_int3 %264
+OpBranch %261
+%261 = OpLabel
+%266 = OpPhi %bool %false %254 %265 %260
+OpSelectionMerge %268 None
+OpBranchConditional %266 %267 %268
+%267 = OpLabel
+OpStore %271 %270
+%272 = OpFunctionCall %bool %takes_int4 %271
+OpBranch %268
+%268 = OpLabel
+%273 = OpPhi %bool %false %261 %272 %267
+OpSelectionMerge %277 None
+OpBranchConditional %273 %275 %276
+%275 = OpLabel
+%278 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0
+%281 = OpLoad %v4float %278
+OpStore %274 %281
+OpBranch %277
+%276 = OpLabel
+%282 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1
+%283 = OpLoad %v4float %282
+OpStore %274 %283
+OpBranch %277
+%277 = OpLabel
+%284 = OpLoad %v4float %274
+OpReturnValue %284
 OpFunctionEnd
diff --git a/tests/sksl/shared/FunctionArgTypeMatch.glsl b/tests/sksl/shared/FunctionArgTypeMatch.glsl
index 2621961..82d3613 100644
--- a/tests/sksl/shared/FunctionArgTypeMatch.glsl
+++ b/tests/sksl/shared/FunctionArgTypeMatch.glsl
@@ -2,28 +2,70 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+bool takes_float2(vec2 x) {
+    return true;
+}
+bool takes_float3(vec3 x) {
+    return true;
+}
+bool takes_float4(vec4 x) {
+    return true;
+}
+bool takes_float2x2(mat2 x) {
+    return true;
+}
+bool takes_float3x3(mat3 x) {
+    return true;
+}
+bool takes_float4x4(mat4 x) {
+    return true;
+}
+bool takes_half(float x) {
+    return true;
+}
+bool takes_half2(vec2 x) {
+    return true;
+}
+bool takes_half3(vec3 x) {
+    return true;
+}
+bool takes_half4(vec4 x) {
+    return true;
+}
+bool takes_half2x2(mat2 x) {
+    return true;
+}
+bool takes_half3x3(mat3 x) {
+    return true;
+}
+bool takes_half4x4(mat4 x) {
+    return true;
+}
+bool takes_bool(bool x) {
+    return true;
+}
+bool takes_bool2(bvec2 x) {
+    return true;
+}
+bool takes_bool3(bvec3 x) {
+    return true;
+}
+bool takes_bool4(bvec4 x) {
+    return true;
+}
+bool takes_int(int x) {
+    return true;
+}
+bool takes_int2(ivec2 x) {
+    return true;
+}
+bool takes_int3(ivec3 x) {
+    return true;
+}
+bool takes_int4(ivec4 x) {
+    return true;
+}
 vec4 main() {
-    return colorGreen;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+    return ((((((((((((((((((((true && takes_float2(vec2(2.0))) && takes_float3(vec3(3.0))) && takes_float4(vec4(4.0))) && takes_float2x2(mat2(2.0))) && takes_float3x3(mat3(3.0))) && takes_float4x4(mat4(4.0))) && takes_half(1.0)) && takes_half2(vec2(2.0))) && takes_half3(vec3(3.0))) && takes_half4(vec4(4.0))) && takes_half2x2(mat2(2.0))) && takes_half3x3(mat3(3.0))) && takes_half4x4(mat4(4.0))) && takes_bool(true)) && takes_bool2(bvec2(true))) && takes_bool3(bvec3(true))) && takes_bool4(bvec4(true))) && takes_int(1)) && takes_int2(ivec2(2))) && takes_int3(ivec3(3))) && takes_int4(ivec4(4)) ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/FunctionArgTypeMatch.metal b/tests/sksl/shared/FunctionArgTypeMatch.metal
index 5c36746..9b27f82 100644
--- a/tests/sksl/shared/FunctionArgTypeMatch.metal
+++ b/tests/sksl/shared/FunctionArgTypeMatch.metal
@@ -12,31 +12,73 @@
 };
 
 
+bool takes_float2(float2 x) {
+    return true;
+}
+bool takes_float3(float3 x) {
+    return true;
+}
+bool takes_float4(float4 x) {
+    return true;
+}
+bool takes_float2x2(float2x2 x) {
+    return true;
+}
+bool takes_float3x3(float3x3 x) {
+    return true;
+}
+bool takes_float4x4(float4x4 x) {
+    return true;
+}
+bool takes_half(float x) {
+    return true;
+}
+bool takes_half2(float2 x) {
+    return true;
+}
+bool takes_half3(float3 x) {
+    return true;
+}
+bool takes_half4(float4 x) {
+    return true;
+}
+bool takes_half2x2(float2x2 x) {
+    return true;
+}
+bool takes_half3x3(float3x3 x) {
+    return true;
+}
+bool takes_half4x4(float4x4 x) {
+    return true;
+}
+bool takes_bool(bool x) {
+    return true;
+}
+bool takes_bool2(bool2 x) {
+    return true;
+}
+bool takes_bool3(bool3 x) {
+    return true;
+}
+bool takes_bool4(bool4 x) {
+    return true;
+}
+bool takes_int(int x) {
+    return true;
+}
+bool takes_int2(int2 x) {
+    return true;
+}
+bool takes_int3(int3 x) {
+    return true;
+}
+bool takes_int4(int4 x) {
+    return true;
+}
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    _out.sk_FragColor = ((((((((((((((((((((true && takes_float2(float2(2.0))) && takes_float3(float3(3.0))) && takes_float4(float4(4.0))) && takes_float2x2(float2x2(2.0))) && takes_float3x3(float3x3(3.0))) && takes_float4x4(float4x4(4.0))) && takes_half(1.0)) && takes_half2(float2(2.0))) && takes_half3(float3(3.0))) && takes_half4(float4(4.0))) && takes_half2x2(float2x2(2.0))) && takes_half3x3(float3x3(3.0))) && takes_half4x4(float4x4(4.0))) && takes_bool(true)) && takes_bool2(bool2(true))) && takes_bool3(bool3(true))) && takes_bool4(bool4(true))) && takes_int(1)) && takes_int2(int2(2))) && takes_int3(int3(3))) && takes_int4(int4(4)) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 }
diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
index e2e2203..14dc7db 100644
--- a/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
+++ b/tests/sksl/shared/FunctionReturnTypeMatch.asm.frag
@@ -9,6 +9,21 @@
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
+OpName %returns_float2 "returns_float2"
+OpName %returns_float3 "returns_float3"
+OpName %returns_float4 "returns_float4"
+OpName %returns_float2x2 "returns_float2x2"
+OpName %returns_float3x3 "returns_float3x3"
+OpName %returns_float4x4 "returns_float4x4"
+OpName %returns_half "returns_half"
+OpName %returns_half2 "returns_half2"
+OpName %returns_half3 "returns_half3"
+OpName %returns_half4 "returns_half4"
+OpName %returns_half2x2 "returns_half2x2"
+OpName %returns_half3x3 "returns_half3x3"
+OpName %returns_half4x4 "returns_half4x4"
+OpName %returns_bool "returns_bool"
+OpName %returns_bool2 "returns_bool2"
 OpName %returns_bool3 "returns_bool3"
 OpName %returns_bool4 "returns_bool4"
 OpName %returns_int "returns_int"
@@ -16,6 +31,28 @@
 OpName %returns_int3 "returns_int3"
 OpName %returns_int4 "returns_int4"
 OpName %main "main"
+OpName %x1 "x1"
+OpName %x2 "x2"
+OpName %x3 "x3"
+OpName %x4 "x4"
+OpName %x5 "x5"
+OpName %x6 "x6"
+OpName %x7 "x7"
+OpName %x8 "x8"
+OpName %x9 "x9"
+OpName %x10 "x10"
+OpName %x11 "x11"
+OpName %x12 "x12"
+OpName %x13 "x13"
+OpName %x14 "x14"
+OpName %x15 "x15"
+OpName %x16 "x16"
+OpName %x17 "x17"
+OpName %x18 "x18"
+OpName %x19 "x19"
+OpName %x20 "x20"
+OpName %x21 "x21"
+OpName %x22 "x22"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -26,11 +63,52 @@
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
 OpDecorate %_UniformBuffer Block
-OpDecorate %16 Binding 0
-OpDecorate %16 DescriptorSet 0
-OpDecorate %102 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
+OpDecorate %31 Binding 0
+OpDecorate %31 DescriptorSet 0
+OpDecorate %83 RelaxedPrecision
+OpDecorate %84 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %87 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %163 RelaxedPrecision
+OpDecorate %164 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
+OpDecorate %167 RelaxedPrecision
+OpDecorate %168 RelaxedPrecision
+OpDecorate %169 RelaxedPrecision
+OpDecorate %166 RelaxedPrecision
+OpDecorate %166 RelaxedPrecision
+OpDecorate %172 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
+OpDecorate %175 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
+OpDecorate %275 RelaxedPrecision
+OpDecorate %281 RelaxedPrecision
+OpDecorate %288 RelaxedPrecision
+OpDecorate %295 RelaxedPrecision
+OpDecorate %302 RelaxedPrecision
+OpDecorate %316 RelaxedPrecision
+OpDecorate %335 RelaxedPrecision
+OpDecorate %359 RelaxedPrecision
+OpDecorate %365 RelaxedPrecision
+OpDecorate %372 RelaxedPrecision
+OpDecorate %379 RelaxedPrecision
+OpDecorate %418 RelaxedPrecision
+OpDecorate %420 RelaxedPrecision
+OpDecorate %421 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -40,139 +118,552 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %_UniformBuffer = OpTypeStruct %v4float %v4float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
-%16 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%31 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%21 = OpTypeFunction %void
-%v3bool = OpTypeVector %bool 3
-%25 = OpTypeFunction %v3bool
+%36 = OpTypeFunction %void
+%v2float = OpTypeVector %float 2
+%40 = OpTypeFunction %v2float
+%float_2 = OpConstant %float 2
+%43 = OpConstantComposite %v2float %float_2 %float_2
+%v3float = OpTypeVector %float 3
+%45 = OpTypeFunction %v3float
+%float_3 = OpConstant %float 3
+%48 = OpConstantComposite %v3float %float_3 %float_3 %float_3
+%49 = OpTypeFunction %v4float
+%float_4 = OpConstant %float 4
+%52 = OpConstantComposite %v4float %float_4 %float_4 %float_4 %float_4
+%mat2v2float = OpTypeMatrix %v2float 2
+%54 = OpTypeFunction %mat2v2float
+%float_0 = OpConstant %float 0
+%mat3v3float = OpTypeMatrix %v3float 3
+%61 = OpTypeFunction %mat3v3float
+%mat4v4float = OpTypeMatrix %v4float 4
+%68 = OpTypeFunction %mat4v4float
+%75 = OpTypeFunction %float
+%float_1 = OpConstant %float 1
+%96 = OpTypeFunction %bool
 %true = OpConstantTrue %bool
-%28 = OpConstantComposite %v3bool %true %true %true
+%v2bool = OpTypeVector %bool 2
+%100 = OpTypeFunction %v2bool
+%102 = OpConstantComposite %v2bool %true %true
+%v3bool = OpTypeVector %bool 3
+%104 = OpTypeFunction %v3bool
+%106 = OpConstantComposite %v3bool %true %true %true
 %v4bool = OpTypeVector %bool 4
-%30 = OpTypeFunction %v4bool
-%32 = OpConstantComposite %v4bool %true %true %true %true
+%108 = OpTypeFunction %v4bool
+%110 = OpConstantComposite %v4bool %true %true %true %true
 %int = OpTypeInt 32 1
-%34 = OpTypeFunction %int
+%112 = OpTypeFunction %int
 %int_1 = OpConstant %int 1
 %v2int = OpTypeVector %int 2
-%38 = OpTypeFunction %v2int
+%116 = OpTypeFunction %v2int
 %int_2 = OpConstant %int 2
-%41 = OpConstantComposite %v2int %int_2 %int_2
+%119 = OpConstantComposite %v2int %int_2 %int_2
 %v3int = OpTypeVector %int 3
-%43 = OpTypeFunction %v3int
+%121 = OpTypeFunction %v3int
 %int_3 = OpConstant %int 3
-%46 = OpConstantComposite %v3int %int_3 %int_3 %int_3
+%124 = OpConstantComposite %v3int %int_3 %int_3 %int_3
 %v4int = OpTypeVector %int 4
-%48 = OpTypeFunction %v4int
+%126 = OpTypeFunction %v4int
 %int_4 = OpConstant %int 4
-%51 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4
-%52 = OpTypeFunction %v4float
-%false = OpConstantFalse %bool
-%v2bool = OpTypeVector %bool 2
-%56 = OpConstantComposite %v2bool %true %true
+%129 = OpConstantComposite %v4int %int_4 %int_4 %int_4 %int_4
+%_ptr_Function_float = OpTypePointer Function %float
+%_ptr_Function_v2float = OpTypePointer Function %v2float
+%_ptr_Function_v3float = OpTypePointer Function %v3float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
+%_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
+%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
+%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
+%_ptr_Function_bool = OpTypePointer Function %bool
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+%_ptr_Function_int = OpTypePointer Function %int
+%_ptr_Function_v2int = OpTypePointer Function %v2int
+%_ptr_Function_v3int = OpTypePointer Function %v3int
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+%false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
-%_entrypoint = OpFunction %void None %21
-%22 = OpLabel
-%23 = OpFunctionCall %v4float %main
-OpStore %sk_FragColor %23
+%_entrypoint = OpFunction %void None %36
+%37 = OpLabel
+%38 = OpFunctionCall %v4float %main
+OpStore %sk_FragColor %38
 OpReturn
 OpFunctionEnd
-%returns_bool3 = OpFunction %v3bool None %25
-%26 = OpLabel
-OpReturnValue %28
+%returns_float2 = OpFunction %v2float None %40
+%41 = OpLabel
+OpReturnValue %43
 OpFunctionEnd
-%returns_bool4 = OpFunction %v4bool None %30
-%31 = OpLabel
-OpReturnValue %32
+%returns_float3 = OpFunction %v3float None %45
+%46 = OpLabel
+OpReturnValue %48
 OpFunctionEnd
-%returns_int = OpFunction %int None %34
-%35 = OpLabel
+%returns_float4 = OpFunction %v4float None %49
+%50 = OpLabel
+OpReturnValue %52
+OpFunctionEnd
+%returns_float2x2 = OpFunction %mat2v2float None %54
+%55 = OpLabel
+%58 = OpCompositeConstruct %v2float %float_2 %float_0
+%59 = OpCompositeConstruct %v2float %float_0 %float_2
+%56 = OpCompositeConstruct %mat2v2float %58 %59
+OpReturnValue %56
+OpFunctionEnd
+%returns_float3x3 = OpFunction %mat3v3float None %61
+%62 = OpLabel
+%64 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%65 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%66 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%63 = OpCompositeConstruct %mat3v3float %64 %65 %66
+OpReturnValue %63
+OpFunctionEnd
+%returns_float4x4 = OpFunction %mat4v4float None %68
+%69 = OpLabel
+%71 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%72 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%73 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%74 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%70 = OpCompositeConstruct %mat4v4float %71 %72 %73 %74
+OpReturnValue %70
+OpFunctionEnd
+%returns_half = OpFunction %float None %75
+%76 = OpLabel
+OpReturnValue %float_1
+OpFunctionEnd
+%returns_half2 = OpFunction %v2float None %40
+%78 = OpLabel
+OpReturnValue %43
+OpFunctionEnd
+%returns_half3 = OpFunction %v3float None %45
+%79 = OpLabel
+OpReturnValue %48
+OpFunctionEnd
+%returns_half4 = OpFunction %v4float None %49
+%80 = OpLabel
+OpReturnValue %52
+OpFunctionEnd
+%returns_half2x2 = OpFunction %mat2v2float None %54
+%81 = OpLabel
+%83 = OpCompositeConstruct %v2float %float_2 %float_0
+%84 = OpCompositeConstruct %v2float %float_0 %float_2
+%82 = OpCompositeConstruct %mat2v2float %83 %84
+OpReturnValue %82
+OpFunctionEnd
+%returns_half3x3 = OpFunction %mat3v3float None %61
+%85 = OpLabel
+%87 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%88 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%89 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%86 = OpCompositeConstruct %mat3v3float %87 %88 %89
+OpReturnValue %86
+OpFunctionEnd
+%returns_half4x4 = OpFunction %mat4v4float None %68
+%90 = OpLabel
+%92 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%93 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%94 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%95 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%91 = OpCompositeConstruct %mat4v4float %92 %93 %94 %95
+OpReturnValue %91
+OpFunctionEnd
+%returns_bool = OpFunction %bool None %96
+%97 = OpLabel
+OpReturnValue %true
+OpFunctionEnd
+%returns_bool2 = OpFunction %v2bool None %100
+%101 = OpLabel
+OpReturnValue %102
+OpFunctionEnd
+%returns_bool3 = OpFunction %v3bool None %104
+%105 = OpLabel
+OpReturnValue %106
+OpFunctionEnd
+%returns_bool4 = OpFunction %v4bool None %108
+%109 = OpLabel
+OpReturnValue %110
+OpFunctionEnd
+%returns_int = OpFunction %int None %112
+%113 = OpLabel
 OpReturnValue %int_1
 OpFunctionEnd
-%returns_int2 = OpFunction %v2int None %38
-%39 = OpLabel
-OpReturnValue %41
+%returns_int2 = OpFunction %v2int None %116
+%117 = OpLabel
+OpReturnValue %119
 OpFunctionEnd
-%returns_int3 = OpFunction %v3int None %43
-%44 = OpLabel
-OpReturnValue %46
+%returns_int3 = OpFunction %v3int None %121
+%122 = OpLabel
+OpReturnValue %124
 OpFunctionEnd
-%returns_int4 = OpFunction %v4int None %48
-%49 = OpLabel
-OpReturnValue %51
+%returns_int4 = OpFunction %v4int None %126
+%127 = OpLabel
+OpReturnValue %129
 OpFunctionEnd
-%main = OpFunction %v4float None %52
-%53 = OpLabel
-%94 = OpVariable %_ptr_Function_v4float Function
-%57 = OpLogicalEqual %v2bool %56 %56
-%58 = OpAll %bool %57
-OpSelectionMerge %60 None
-OpBranchConditional %58 %59 %60
-%59 = OpLabel
-%61 = OpFunctionCall %v3bool %returns_bool3
-%62 = OpLogicalEqual %v3bool %28 %61
-%63 = OpAll %bool %62
-OpBranch %60
-%60 = OpLabel
-%64 = OpPhi %bool %false %53 %63 %59
-OpSelectionMerge %66 None
-OpBranchConditional %64 %65 %66
-%65 = OpLabel
-%67 = OpFunctionCall %v4bool %returns_bool4
-%68 = OpLogicalEqual %v4bool %32 %67
-%69 = OpAll %bool %68
-OpBranch %66
-%66 = OpLabel
-%70 = OpPhi %bool %false %60 %69 %65
-OpSelectionMerge %72 None
-OpBranchConditional %70 %71 %72
-%71 = OpLabel
-%73 = OpFunctionCall %int %returns_int
-%74 = OpIEqual %bool %int_1 %73
-OpBranch %72
-%72 = OpLabel
-%75 = OpPhi %bool %false %66 %74 %71
-OpSelectionMerge %77 None
-OpBranchConditional %75 %76 %77
-%76 = OpLabel
-%78 = OpFunctionCall %v2int %returns_int2
-%79 = OpIEqual %v2bool %41 %78
-%80 = OpAll %bool %79
-OpBranch %77
-%77 = OpLabel
-%81 = OpPhi %bool %false %72 %80 %76
-OpSelectionMerge %83 None
-OpBranchConditional %81 %82 %83
-%82 = OpLabel
-%84 = OpFunctionCall %v3int %returns_int3
-%85 = OpIEqual %v3bool %46 %84
-%86 = OpAll %bool %85
-OpBranch %83
-%83 = OpLabel
-%87 = OpPhi %bool %false %77 %86 %82
-OpSelectionMerge %89 None
-OpBranchConditional %87 %88 %89
-%88 = OpLabel
-%90 = OpFunctionCall %v4int %returns_int4
-%91 = OpIEqual %v4bool %51 %90
-%92 = OpAll %bool %91
-OpBranch %89
-%89 = OpLabel
-%93 = OpPhi %bool %false %83 %92 %88
-OpSelectionMerge %98 None
-OpBranchConditional %93 %96 %97
-%96 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %16 %int_0
-%102 = OpLoad %v4float %99
-OpStore %94 %102
-OpBranch %98
-%97 = OpLabel
-%103 = OpAccessChain %_ptr_Uniform_v4float %16 %int_1
-%104 = OpLoad %v4float %103
-OpStore %94 %104
-OpBranch %98
-%98 = OpLabel
-%105 = OpLoad %v4float %94
-OpReturnValue %105
+%main = OpFunction %v4float None %49
+%130 = OpLabel
+%x1 = OpVariable %_ptr_Function_float Function
+%x2 = OpVariable %_ptr_Function_v2float Function
+%x3 = OpVariable %_ptr_Function_v3float Function
+%x4 = OpVariable %_ptr_Function_v4float Function
+%x5 = OpVariable %_ptr_Function_mat2v2float Function
+%x6 = OpVariable %_ptr_Function_mat3v3float Function
+%x7 = OpVariable %_ptr_Function_mat4v4float Function
+%x8 = OpVariable %_ptr_Function_float Function
+%x9 = OpVariable %_ptr_Function_v2float Function
+%x10 = OpVariable %_ptr_Function_v3float Function
+%x11 = OpVariable %_ptr_Function_v4float Function
+%x12 = OpVariable %_ptr_Function_mat2v2float Function
+%x13 = OpVariable %_ptr_Function_mat3v3float Function
+%x14 = OpVariable %_ptr_Function_mat4v4float Function
+%x15 = OpVariable %_ptr_Function_bool Function
+%x16 = OpVariable %_ptr_Function_v2bool Function
+%x17 = OpVariable %_ptr_Function_v3bool Function
+%x18 = OpVariable %_ptr_Function_v4bool Function
+%x19 = OpVariable %_ptr_Function_int Function
+%x20 = OpVariable %_ptr_Function_v2int Function
+%x21 = OpVariable %_ptr_Function_v3int Function
+%x22 = OpVariable %_ptr_Function_v4int Function
+%411 = OpVariable %_ptr_Function_v4float Function
+OpStore %x1 %float_1
+OpStore %x2 %43
+OpStore %x3 %48
+OpStore %x4 %52
+%142 = OpCompositeConstruct %v2float %float_2 %float_0
+%143 = OpCompositeConstruct %v2float %float_0 %float_2
+%141 = OpCompositeConstruct %mat2v2float %142 %143
+OpStore %x5 %141
+%147 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%148 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%149 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%146 = OpCompositeConstruct %mat3v3float %147 %148 %149
+OpStore %x6 %146
+%153 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%154 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%155 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%156 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%152 = OpCompositeConstruct %mat4v4float %153 %154 %155 %156
+OpStore %x7 %152
+OpStore %x8 %float_1
+OpStore %x9 %43
+OpStore %x10 %48
+OpStore %x11 %52
+%163 = OpCompositeConstruct %v2float %float_2 %float_0
+%164 = OpCompositeConstruct %v2float %float_0 %float_2
+%162 = OpCompositeConstruct %mat2v2float %163 %164
+OpStore %x12 %162
+%167 = OpCompositeConstruct %v3float %float_3 %float_0 %float_0
+%168 = OpCompositeConstruct %v3float %float_0 %float_3 %float_0
+%169 = OpCompositeConstruct %v3float %float_0 %float_0 %float_3
+%166 = OpCompositeConstruct %mat3v3float %167 %168 %169
+OpStore %x13 %166
+%172 = OpCompositeConstruct %v4float %float_4 %float_0 %float_0 %float_0
+%173 = OpCompositeConstruct %v4float %float_0 %float_4 %float_0 %float_0
+%174 = OpCompositeConstruct %v4float %float_0 %float_0 %float_4 %float_0
+%175 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_4
+%171 = OpCompositeConstruct %mat4v4float %172 %173 %174 %175
+OpStore %x14 %171
+OpStore %x15 %true
+OpStore %x16 %102
+OpStore %x17 %106
+OpStore %x18 %110
+OpStore %x19 %int_1
+OpStore %x20 %119
+OpStore %x21 %124
+OpStore %x22 %129
+%193 = OpLoad %float %x1
+%194 = OpFOrdEqual %bool %193 %float_1
+OpSelectionMerge %196 None
+OpBranchConditional %194 %195 %196
+%195 = OpLabel
+%197 = OpLoad %v2float %x2
+%198 = OpFunctionCall %v2float %returns_float2
+%199 = OpFOrdEqual %v2bool %197 %198
+%200 = OpAll %bool %199
+OpBranch %196
+%196 = OpLabel
+%201 = OpPhi %bool %false %130 %200 %195
+OpSelectionMerge %203 None
+OpBranchConditional %201 %202 %203
+%202 = OpLabel
+%204 = OpLoad %v3float %x3
+%205 = OpFunctionCall %v3float %returns_float3
+%206 = OpFOrdEqual %v3bool %204 %205
+%207 = OpAll %bool %206
+OpBranch %203
+%203 = OpLabel
+%208 = OpPhi %bool %false %196 %207 %202
+OpSelectionMerge %210 None
+OpBranchConditional %208 %209 %210
+%209 = OpLabel
+%211 = OpLoad %v4float %x4
+%212 = OpFunctionCall %v4float %returns_float4
+%213 = OpFOrdEqual %v4bool %211 %212
+%214 = OpAll %bool %213
+OpBranch %210
+%210 = OpLabel
+%215 = OpPhi %bool %false %203 %214 %209
+OpSelectionMerge %217 None
+OpBranchConditional %215 %216 %217
+%216 = OpLabel
+%218 = OpLoad %mat2v2float %x5
+%219 = OpFunctionCall %mat2v2float %returns_float2x2
+%220 = OpCompositeExtract %v2float %218 0
+%221 = OpCompositeExtract %v2float %219 0
+%222 = OpFOrdEqual %v2bool %220 %221
+%223 = OpAll %bool %222
+%224 = OpCompositeExtract %v2float %218 1
+%225 = OpCompositeExtract %v2float %219 1
+%226 = OpFOrdEqual %v2bool %224 %225
+%227 = OpAll %bool %226
+%228 = OpLogicalAnd %bool %223 %227
+OpBranch %217
+%217 = OpLabel
+%229 = OpPhi %bool %false %210 %228 %216
+OpSelectionMerge %231 None
+OpBranchConditional %229 %230 %231
+%230 = OpLabel
+%232 = OpLoad %mat3v3float %x6
+%233 = OpFunctionCall %mat3v3float %returns_float3x3
+%234 = OpCompositeExtract %v3float %232 0
+%235 = OpCompositeExtract %v3float %233 0
+%236 = OpFOrdEqual %v3bool %234 %235
+%237 = OpAll %bool %236
+%238 = OpCompositeExtract %v3float %232 1
+%239 = OpCompositeExtract %v3float %233 1
+%240 = OpFOrdEqual %v3bool %238 %239
+%241 = OpAll %bool %240
+%242 = OpLogicalAnd %bool %237 %241
+%243 = OpCompositeExtract %v3float %232 2
+%244 = OpCompositeExtract %v3float %233 2
+%245 = OpFOrdEqual %v3bool %243 %244
+%246 = OpAll %bool %245
+%247 = OpLogicalAnd %bool %242 %246
+OpBranch %231
+%231 = OpLabel
+%248 = OpPhi %bool %false %217 %247 %230
+OpSelectionMerge %250 None
+OpBranchConditional %248 %249 %250
+%249 = OpLabel
+%251 = OpLoad %mat4v4float %x7
+%252 = OpFunctionCall %mat4v4float %returns_float4x4
+%253 = OpCompositeExtract %v4float %251 0
+%254 = OpCompositeExtract %v4float %252 0
+%255 = OpFOrdEqual %v4bool %253 %254
+%256 = OpAll %bool %255
+%257 = OpCompositeExtract %v4float %251 1
+%258 = OpCompositeExtract %v4float %252 1
+%259 = OpFOrdEqual %v4bool %257 %258
+%260 = OpAll %bool %259
+%261 = OpLogicalAnd %bool %256 %260
+%262 = OpCompositeExtract %v4float %251 2
+%263 = OpCompositeExtract %v4float %252 2
+%264 = OpFOrdEqual %v4bool %262 %263
+%265 = OpAll %bool %264
+%266 = OpLogicalAnd %bool %261 %265
+%267 = OpCompositeExtract %v4float %251 3
+%268 = OpCompositeExtract %v4float %252 3
+%269 = OpFOrdEqual %v4bool %267 %268
+%270 = OpAll %bool %269
+%271 = OpLogicalAnd %bool %266 %270
+OpBranch %250
+%250 = OpLabel
+%272 = OpPhi %bool %false %231 %271 %249
+OpSelectionMerge %274 None
+OpBranchConditional %272 %273 %274
+%273 = OpLabel
+%275 = OpLoad %float %x8
+%276 = OpFunctionCall %float %returns_half
+%277 = OpFOrdEqual %bool %275 %276
+OpBranch %274
+%274 = OpLabel
+%278 = OpPhi %bool %false %250 %277 %273
+OpSelectionMerge %280 None
+OpBranchConditional %278 %279 %280
+%279 = OpLabel
+%281 = OpLoad %v2float %x9
+%282 = OpFunctionCall %v2float %returns_half2
+%283 = OpFOrdEqual %v2bool %281 %282
+%284 = OpAll %bool %283
+OpBranch %280
+%280 = OpLabel
+%285 = OpPhi %bool %false %274 %284 %279
+OpSelectionMerge %287 None
+OpBranchConditional %285 %286 %287
+%286 = OpLabel
+%288 = OpLoad %v3float %x10
+%289 = OpFunctionCall %v3float %returns_half3
+%290 = OpFOrdEqual %v3bool %288 %289
+%291 = OpAll %bool %290
+OpBranch %287
+%287 = OpLabel
+%292 = OpPhi %bool %false %280 %291 %286
+OpSelectionMerge %294 None
+OpBranchConditional %292 %293 %294
+%293 = OpLabel
+%295 = OpLoad %v4float %x11
+%296 = OpFunctionCall %v4float %returns_half4
+%297 = OpFOrdEqual %v4bool %295 %296
+%298 = OpAll %bool %297
+OpBranch %294
+%294 = OpLabel
+%299 = OpPhi %bool %false %287 %298 %293
+OpSelectionMerge %301 None
+OpBranchConditional %299 %300 %301
+%300 = OpLabel
+%302 = OpLoad %mat2v2float %x12
+%303 = OpFunctionCall %mat2v2float %returns_half2x2
+%304 = OpCompositeExtract %v2float %302 0
+%305 = OpCompositeExtract %v2float %303 0
+%306 = OpFOrdEqual %v2bool %304 %305
+%307 = OpAll %bool %306
+%308 = OpCompositeExtract %v2float %302 1
+%309 = OpCompositeExtract %v2float %303 1
+%310 = OpFOrdEqual %v2bool %308 %309
+%311 = OpAll %bool %310
+%312 = OpLogicalAnd %bool %307 %311
+OpBranch %301
+%301 = OpLabel
+%313 = OpPhi %bool %false %294 %312 %300
+OpSelectionMerge %315 None
+OpBranchConditional %313 %314 %315
+%314 = OpLabel
+%316 = OpLoad %mat3v3float %x13
+%317 = OpFunctionCall %mat3v3float %returns_half3x3
+%318 = OpCompositeExtract %v3float %316 0
+%319 = OpCompositeExtract %v3float %317 0
+%320 = OpFOrdEqual %v3bool %318 %319
+%321 = OpAll %bool %320
+%322 = OpCompositeExtract %v3float %316 1
+%323 = OpCompositeExtract %v3float %317 1
+%324 = OpFOrdEqual %v3bool %322 %323
+%325 = OpAll %bool %324
+%326 = OpLogicalAnd %bool %321 %325
+%327 = OpCompositeExtract %v3float %316 2
+%328 = OpCompositeExtract %v3float %317 2
+%329 = OpFOrdEqual %v3bool %327 %328
+%330 = OpAll %bool %329
+%331 = OpLogicalAnd %bool %326 %330
+OpBranch %315
+%315 = OpLabel
+%332 = OpPhi %bool %false %301 %331 %314
+OpSelectionMerge %334 None
+OpBranchConditional %332 %333 %334
+%333 = OpLabel
+%335 = OpLoad %mat4v4float %x14
+%336 = OpFunctionCall %mat4v4float %returns_half4x4
+%337 = OpCompositeExtract %v4float %335 0
+%338 = OpCompositeExtract %v4float %336 0
+%339 = OpFOrdEqual %v4bool %337 %338
+%340 = OpAll %bool %339
+%341 = OpCompositeExtract %v4float %335 1
+%342 = OpCompositeExtract %v4float %336 1
+%343 = OpFOrdEqual %v4bool %341 %342
+%344 = OpAll %bool %343
+%345 = OpLogicalAnd %bool %340 %344
+%346 = OpCompositeExtract %v4float %335 2
+%347 = OpCompositeExtract %v4float %336 2
+%348 = OpFOrdEqual %v4bool %346 %347
+%349 = OpAll %bool %348
+%350 = OpLogicalAnd %bool %345 %349
+%351 = OpCompositeExtract %v4float %335 3
+%352 = OpCompositeExtract %v4float %336 3
+%353 = OpFOrdEqual %v4bool %351 %352
+%354 = OpAll %bool %353
+%355 = OpLogicalAnd %bool %350 %354
+OpBranch %334
+%334 = OpLabel
+%356 = OpPhi %bool %false %315 %355 %333
+OpSelectionMerge %358 None
+OpBranchConditional %356 %357 %358
+%357 = OpLabel
+%359 = OpLoad %bool %x15
+%360 = OpFunctionCall %bool %returns_bool
+%361 = OpLogicalEqual %bool %359 %360
+OpBranch %358
+%358 = OpLabel
+%362 = OpPhi %bool %false %334 %361 %357
+OpSelectionMerge %364 None
+OpBranchConditional %362 %363 %364
+%363 = OpLabel
+%365 = OpLoad %v2bool %x16
+%366 = OpFunctionCall %v2bool %returns_bool2
+%367 = OpLogicalEqual %v2bool %365 %366
+%368 = OpAll %bool %367
+OpBranch %364
+%364 = OpLabel
+%369 = OpPhi %bool %false %358 %368 %363
+OpSelectionMerge %371 None
+OpBranchConditional %369 %370 %371
+%370 = OpLabel
+%372 = OpLoad %v3bool %x17
+%373 = OpFunctionCall %v3bool %returns_bool3
+%374 = OpLogicalEqual %v3bool %372 %373
+%375 = OpAll %bool %374
+OpBranch %371
+%371 = OpLabel
+%376 = OpPhi %bool %false %364 %375 %370
+OpSelectionMerge %378 None
+OpBranchConditional %376 %377 %378
+%377 = OpLabel
+%379 = OpLoad %v4bool %x18
+%380 = OpFunctionCall %v4bool %returns_bool4
+%381 = OpLogicalEqual %v4bool %379 %380
+%382 = OpAll %bool %381
+OpBranch %378
+%378 = OpLabel
+%383 = OpPhi %bool %false %371 %382 %377
+OpSelectionMerge %385 None
+OpBranchConditional %383 %384 %385
+%384 = OpLabel
+%386 = OpLoad %int %x19
+%387 = OpFunctionCall %int %returns_int
+%388 = OpIEqual %bool %386 %387
+OpBranch %385
+%385 = OpLabel
+%389 = OpPhi %bool %false %378 %388 %384
+OpSelectionMerge %391 None
+OpBranchConditional %389 %390 %391
+%390 = OpLabel
+%392 = OpLoad %v2int %x20
+%393 = OpFunctionCall %v2int %returns_int2
+%394 = OpIEqual %v2bool %392 %393
+%395 = OpAll %bool %394
+OpBranch %391
+%391 = OpLabel
+%396 = OpPhi %bool %false %385 %395 %390
+OpSelectionMerge %398 None
+OpBranchConditional %396 %397 %398
+%397 = OpLabel
+%399 = OpLoad %v3int %x21
+%400 = OpFunctionCall %v3int %returns_int3
+%401 = OpIEqual %v3bool %399 %400
+%402 = OpAll %bool %401
+OpBranch %398
+%398 = OpLabel
+%403 = OpPhi %bool %false %391 %402 %397
+OpSelectionMerge %405 None
+OpBranchConditional %403 %404 %405
+%404 = OpLabel
+%406 = OpLoad %v4int %x22
+%407 = OpFunctionCall %v4int %returns_int4
+%408 = OpIEqual %v4bool %406 %407
+%409 = OpAll %bool %408
+OpBranch %405
+%405 = OpLabel
+%410 = OpPhi %bool %false %398 %409 %404
+OpSelectionMerge %414 None
+OpBranchConditional %410 %412 %413
+%412 = OpLabel
+%415 = OpAccessChain %_ptr_Uniform_v4float %31 %int_0
+%418 = OpLoad %v4float %415
+OpStore %411 %418
+OpBranch %414
+%413 = OpLabel
+%419 = OpAccessChain %_ptr_Uniform_v4float %31 %int_1
+%420 = OpLoad %v4float %419
+OpStore %411 %420
+OpBranch %414
+%414 = OpLabel
+%421 = OpLoad %v4float %411
+OpReturnValue %421
 OpFunctionEnd
diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.glsl b/tests/sksl/shared/FunctionReturnTypeMatch.glsl
index 93d2b85..9748984 100644
--- a/tests/sksl/shared/FunctionReturnTypeMatch.glsl
+++ b/tests/sksl/shared/FunctionReturnTypeMatch.glsl
@@ -2,6 +2,51 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+vec2 returns_float2() {
+    return vec2(2.0);
+}
+vec3 returns_float3() {
+    return vec3(3.0);
+}
+vec4 returns_float4() {
+    return vec4(4.0);
+}
+mat2 returns_float2x2() {
+    return mat2(2.0);
+}
+mat3 returns_float3x3() {
+    return mat3(3.0);
+}
+mat4 returns_float4x4() {
+    return mat4(4.0);
+}
+float returns_half() {
+    return 1.0;
+}
+vec2 returns_half2() {
+    return vec2(2.0);
+}
+vec3 returns_half3() {
+    return vec3(3.0);
+}
+vec4 returns_half4() {
+    return vec4(4.0);
+}
+mat2 returns_half2x2() {
+    return mat2(2.0);
+}
+mat3 returns_half3x3() {
+    return mat3(3.0);
+}
+mat4 returns_half4x4() {
+    return mat4(4.0);
+}
+bool returns_bool() {
+    return true;
+}
+bvec2 returns_bool2() {
+    return bvec2(true);
+}
 bvec3 returns_bool3() {
     return bvec3(true);
 }
@@ -21,21 +66,50 @@
     return ivec4(4);
 }
 vec4 main() {
-    return (((((bvec2(true) == bvec2(true) && bvec3(true) == returns_bool3()) && bvec4(true) == returns_bool4()) && 1 == returns_int()) && ivec2(2) == returns_int2()) && ivec3(3) == returns_int3()) && ivec4(4) == returns_int4() ? colorGreen : colorRed;
+    float x1 = 1.0;
 
+    vec2 x2 = vec2(2.0);
 
+    vec3 x3 = vec3(3.0);
 
+    vec4 x4 = vec4(4.0);
 
+    mat2 x5 = mat2(2.0);
 
+    mat3 x6 = mat3(3.0);
 
+    mat4 x7 = mat4(4.0);
 
+    float x8 = 1.0;
 
+    vec2 x9 = vec2(2.0);
 
+    vec3 x10 = vec3(3.0);
 
+    vec4 x11 = vec4(4.0);
 
+    mat2 x12 = mat2(2.0);
 
+    mat3 x13 = mat3(3.0);
 
+    mat4 x14 = mat4(4.0);
 
+    bool x15 = true;
 
+    bvec2 x16 = bvec2(true);
+
+    bvec3 x17 = bvec3(true);
+
+    bvec4 x18 = bvec4(true);
+
+    int x19 = 1;
+
+    ivec2 x20 = ivec2(2);
+
+    ivec3 x21 = ivec3(3);
+
+    ivec4 x22 = ivec4(4);
+
+    return ((((((((((((((((((((x1 == 1.0 && x2 == returns_float2()) && x3 == returns_float3()) && x4 == returns_float4()) && x5 == returns_float2x2()) && x6 == returns_float3x3()) && x7 == returns_float4x4()) && x8 == returns_half()) && x9 == returns_half2()) && x10 == returns_half3()) && x11 == returns_half4()) && x12 == returns_half2x2()) && x13 == returns_half3x3()) && x14 == returns_half4x4()) && x15 == returns_bool()) && x16 == returns_bool2()) && x17 == returns_bool3()) && x18 == returns_bool4()) && x19 == returns_int()) && x20 == returns_int2()) && x21 == returns_int3()) && x22 == returns_int4() ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/FunctionReturnTypeMatch.metal b/tests/sksl/shared/FunctionReturnTypeMatch.metal
index fcbe58d..62f3094 100644
--- a/tests/sksl/shared/FunctionReturnTypeMatch.metal
+++ b/tests/sksl/shared/FunctionReturnTypeMatch.metal
@@ -10,8 +10,62 @@
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
+thread bool operator==(const float2x2 left, const float2x2 right) {
+    return all(left[0] == right[0]) && all(left[1] == right[1]);
+}
+thread bool operator==(const float3x3 left, const float3x3 right) {
+    return all(left[0] == right[0]) && all(left[1] == right[1]) && all(left[2] == right[2]);
+}
+thread bool operator==(const float4x4 left, const float4x4 right) {
+    return all(left[0] == right[0]) && all(left[1] == right[1]) && all(left[2] == right[2]) && all(left[3] == right[3]);
+}
 
 
+float2 returns_float2() {
+    return float2(2.0);
+}
+float3 returns_float3() {
+    return float3(3.0);
+}
+float4 returns_float4() {
+    return float4(4.0);
+}
+float2x2 returns_float2x2() {
+    return float2x2(2.0);
+}
+float3x3 returns_float3x3() {
+    return float3x3(3.0);
+}
+float4x4 returns_float4x4() {
+    return float4x4(4.0);
+}
+float returns_half() {
+    return 1.0;
+}
+float2 returns_half2() {
+    return float2(2.0);
+}
+float3 returns_half3() {
+    return float3(3.0);
+}
+float4 returns_half4() {
+    return float4(4.0);
+}
+float2x2 returns_half2x2() {
+    return float2x2(2.0);
+}
+float3x3 returns_half3x3() {
+    return float3x3(3.0);
+}
+float4x4 returns_half4x4() {
+    return float4x4(4.0);
+}
+bool returns_bool() {
+    return true;
+}
+bool2 returns_bool2() {
+    return bool2(true);
+}
 bool3 returns_bool3() {
     return bool3(true);
 }
@@ -33,22 +87,51 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = (((((all(bool2(true) == bool2(true)) && all(bool3(true) == returns_bool3())) && all(bool4(true) == returns_bool4())) && 1 == returns_int()) && all(int2(2) == returns_int2())) && all(int3(3) == returns_int3())) && all(int4(4) == returns_int4()) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float x1 = 1.0;
+
+    float2 x2 = float2(2.0);
+
+    float3 x3 = float3(3.0);
+
+    float4 x4 = float4(4.0);
+
+    float2x2 x5 = float2x2(2.0);
+
+    float3x3 x6 = float3x3(3.0);
+
+    float4x4 x7 = float4x4(4.0);
+
+    float x8 = 1.0;
+
+    float2 x9 = float2(2.0);
+
+    float3 x10 = float3(3.0);
+
+    float4 x11 = float4(4.0);
+
+    float2x2 x12 = float2x2(2.0);
+
+    float3x3 x13 = float3x3(3.0);
+
+    float4x4 x14 = float4x4(4.0);
+
+    bool x15 = true;
+
+    bool2 x16 = bool2(true);
+
+    bool3 x17 = bool3(true);
+
+    bool4 x18 = bool4(true);
+
+    int x19 = 1;
+
+    int2 x20 = int2(2);
+
+    int3 x21 = int3(3);
+
+    int4 x22 = int4(4);
+
+    _out.sk_FragColor = ((((((((((((((((((((x1 == 1.0 && all(x2 == returns_float2())) && all(x3 == returns_float3())) && all(x4 == returns_float4())) && x5 == returns_float2x2()) && x6 == returns_float3x3()) && x7 == returns_float4x4()) && x8 == returns_half()) && all(x9 == returns_half2())) && all(x10 == returns_half3())) && all(x11 == returns_half4())) && x12 == returns_half2x2()) && x13 == returns_half3x3()) && x14 == returns_half4x4()) && x15 == returns_bool()) && all(x16 == returns_bool2())) && all(x17 == returns_bool3())) && all(x18 == returns_bool4())) && x19 == returns_int()) && all(x20 == returns_int2())) && all(x21 == returns_int3())) && all(x22 == returns_int4()) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 }
diff --git a/tests/sksl/shared/GaussianBlur.asm.frag b/tests/sksl/shared/GaussianBlur.asm.frag
index 5e6d07e..b70fb1f 100644
--- a/tests/sksl/shared/GaussianBlur.asm.frag
+++ b/tests/sksl/shared/GaussianBlur.asm.frag
@@ -16,17 +16,21 @@
 OpName %uTextureSampler_0_Stage1 "uTextureSampler_0_Stage1"
 OpName %vLocalCoord_Stage0 "vLocalCoord_Stage0"
 OpName %MatrixEffect_Stage1_c0_c0 "MatrixEffect_Stage1_c0_c0"
+OpName %_output "_output"
 OpName %_0_coords "_0_coords"
-OpName %_1_inCoord "_1_inCoord"
-OpName %_2_subsetCoord "_2_subsetCoord"
-OpName %_3_clampedCoord "_3_clampedCoord"
-OpName %_4_textureColor "_4_textureColor"
-OpName %_5_snappedX "_5_snappedX"
+OpName %_1_output "_1_output"
+OpName %_2_inCoord "_2_inCoord"
+OpName %_3_subsetCoord "_3_subsetCoord"
+OpName %_4_clampedCoord "_4_clampedCoord"
+OpName %_5_textureColor "_5_textureColor"
+OpName %_6_snappedX "_6_snappedX"
 OpName %main "main"
+OpName %outputColor_Stage0 "outputColor_Stage0"
+OpName %outputCoverage_Stage0 "outputCoverage_Stage0"
 OpName %output_Stage1 "output_Stage1"
-OpName %_6_output "_6_output"
-OpName %_7_coord "_7_coord"
-OpName %_8_coordSampled "_8_coordSampled"
+OpName %_7_output "_7_output"
+OpName %_8_coord "_8_coord"
+OpName %_9_coordSampled "_9_coordSampled"
 OpDecorate %_arr_v4float_int_7 ArrayStride 16
 OpMemberDecorate %uniformBuffer 0 Offset 0
 OpMemberDecorate %uniformBuffer 1 Offset 16
@@ -52,112 +56,142 @@
 OpDecorate %uTextureSampler_0_Stage1 Binding 0
 OpDecorate %uTextureSampler_0_Stage1 DescriptorSet 0
 OpDecorate %vLocalCoord_Stage0 Location 0
-OpDecorate %67 RelaxedPrecision
-OpDecorate %100 RelaxedPrecision
-OpDecorate %101 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %120 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %137 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %136 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
 OpDecorate %143 RelaxedPrecision
-OpDecorate %146 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
+OpDecorate %155 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
-OpDecorate %161 RelaxedPrecision
-OpDecorate %164 RelaxedPrecision
-OpDecorate %167 RelaxedPrecision
-OpDecorate %173 RelaxedPrecision
-OpDecorate %176 RelaxedPrecision
-OpDecorate %179 RelaxedPrecision
-OpDecorate %182 RelaxedPrecision
-OpDecorate %188 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %165 RelaxedPrecision
+OpDecorate %168 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
+OpDecorate %174 RelaxedPrecision
+OpDecorate %175 RelaxedPrecision
+OpDecorate %181 RelaxedPrecision
+OpDecorate %184 RelaxedPrecision
+OpDecorate %187 RelaxedPrecision
+OpDecorate %190 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
-OpDecorate %194 RelaxedPrecision
 OpDecorate %197 RelaxedPrecision
+OpDecorate %200 RelaxedPrecision
 OpDecorate %203 RelaxedPrecision
 OpDecorate %206 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
-OpDecorate %212 RelaxedPrecision
-OpDecorate %218 RelaxedPrecision
-OpDecorate %221 RelaxedPrecision
-OpDecorate %224 RelaxedPrecision
-OpDecorate %227 RelaxedPrecision
-OpDecorate %233 RelaxedPrecision
-OpDecorate %236 RelaxedPrecision
+OpDecorate %207 RelaxedPrecision
+OpDecorate %213 RelaxedPrecision
+OpDecorate %216 RelaxedPrecision
+OpDecorate %219 RelaxedPrecision
+OpDecorate %222 RelaxedPrecision
+OpDecorate %223 RelaxedPrecision
+OpDecorate %229 RelaxedPrecision
+OpDecorate %232 RelaxedPrecision
+OpDecorate %235 RelaxedPrecision
+OpDecorate %238 RelaxedPrecision
 OpDecorate %239 RelaxedPrecision
-OpDecorate %242 RelaxedPrecision
+OpDecorate %245 RelaxedPrecision
 OpDecorate %248 RelaxedPrecision
 OpDecorate %251 RelaxedPrecision
 OpDecorate %254 RelaxedPrecision
-OpDecorate %257 RelaxedPrecision
-OpDecorate %263 RelaxedPrecision
-OpDecorate %266 RelaxedPrecision
-OpDecorate %269 RelaxedPrecision
-OpDecorate %272 RelaxedPrecision
-OpDecorate %278 RelaxedPrecision
-OpDecorate %281 RelaxedPrecision
-OpDecorate %284 RelaxedPrecision
+OpDecorate %255 RelaxedPrecision
+OpDecorate %261 RelaxedPrecision
+OpDecorate %264 RelaxedPrecision
+OpDecorate %267 RelaxedPrecision
+OpDecorate %270 RelaxedPrecision
+OpDecorate %271 RelaxedPrecision
+OpDecorate %277 RelaxedPrecision
+OpDecorate %280 RelaxedPrecision
+OpDecorate %283 RelaxedPrecision
+OpDecorate %286 RelaxedPrecision
 OpDecorate %287 RelaxedPrecision
 OpDecorate %293 RelaxedPrecision
 OpDecorate %296 RelaxedPrecision
 OpDecorate %299 RelaxedPrecision
 OpDecorate %302 RelaxedPrecision
-OpDecorate %308 RelaxedPrecision
-OpDecorate %311 RelaxedPrecision
-OpDecorate %314 RelaxedPrecision
-OpDecorate %317 RelaxedPrecision
-OpDecorate %323 RelaxedPrecision
-OpDecorate %326 RelaxedPrecision
-OpDecorate %329 RelaxedPrecision
-OpDecorate %332 RelaxedPrecision
-OpDecorate %338 RelaxedPrecision
+OpDecorate %303 RelaxedPrecision
+OpDecorate %309 RelaxedPrecision
+OpDecorate %312 RelaxedPrecision
+OpDecorate %315 RelaxedPrecision
+OpDecorate %318 RelaxedPrecision
+OpDecorate %319 RelaxedPrecision
+OpDecorate %325 RelaxedPrecision
+OpDecorate %328 RelaxedPrecision
+OpDecorate %331 RelaxedPrecision
+OpDecorate %334 RelaxedPrecision
+OpDecorate %335 RelaxedPrecision
 OpDecorate %341 RelaxedPrecision
 OpDecorate %344 RelaxedPrecision
 OpDecorate %347 RelaxedPrecision
-OpDecorate %353 RelaxedPrecision
-OpDecorate %356 RelaxedPrecision
-OpDecorate %359 RelaxedPrecision
-OpDecorate %362 RelaxedPrecision
-OpDecorate %368 RelaxedPrecision
-OpDecorate %371 RelaxedPrecision
-OpDecorate %374 RelaxedPrecision
-OpDecorate %377 RelaxedPrecision
+OpDecorate %350 RelaxedPrecision
+OpDecorate %351 RelaxedPrecision
+OpDecorate %357 RelaxedPrecision
+OpDecorate %360 RelaxedPrecision
+OpDecorate %363 RelaxedPrecision
+OpDecorate %366 RelaxedPrecision
+OpDecorate %367 RelaxedPrecision
+OpDecorate %373 RelaxedPrecision
+OpDecorate %376 RelaxedPrecision
+OpDecorate %379 RelaxedPrecision
+OpDecorate %382 RelaxedPrecision
 OpDecorate %383 RelaxedPrecision
-OpDecorate %386 RelaxedPrecision
 OpDecorate %389 RelaxedPrecision
 OpDecorate %392 RelaxedPrecision
+OpDecorate %395 RelaxedPrecision
 OpDecorate %398 RelaxedPrecision
-OpDecorate %401 RelaxedPrecision
-OpDecorate %404 RelaxedPrecision
-OpDecorate %407 RelaxedPrecision
-OpDecorate %413 RelaxedPrecision
-OpDecorate %416 RelaxedPrecision
-OpDecorate %419 RelaxedPrecision
-OpDecorate %422 RelaxedPrecision
-OpDecorate %428 RelaxedPrecision
+OpDecorate %399 RelaxedPrecision
+OpDecorate %405 RelaxedPrecision
+OpDecorate %408 RelaxedPrecision
+OpDecorate %411 RelaxedPrecision
+OpDecorate %414 RelaxedPrecision
+OpDecorate %415 RelaxedPrecision
+OpDecorate %421 RelaxedPrecision
+OpDecorate %424 RelaxedPrecision
+OpDecorate %427 RelaxedPrecision
+OpDecorate %430 RelaxedPrecision
 OpDecorate %431 RelaxedPrecision
-OpDecorate %434 RelaxedPrecision
 OpDecorate %437 RelaxedPrecision
+OpDecorate %440 RelaxedPrecision
 OpDecorate %443 RelaxedPrecision
 OpDecorate %446 RelaxedPrecision
-OpDecorate %449 RelaxedPrecision
-OpDecorate %452 RelaxedPrecision
-OpDecorate %458 RelaxedPrecision
-OpDecorate %461 RelaxedPrecision
-OpDecorate %464 RelaxedPrecision
-OpDecorate %467 RelaxedPrecision
-OpDecorate %473 RelaxedPrecision
-OpDecorate %476 RelaxedPrecision
+OpDecorate %447 RelaxedPrecision
+OpDecorate %453 RelaxedPrecision
+OpDecorate %456 RelaxedPrecision
+OpDecorate %459 RelaxedPrecision
+OpDecorate %462 RelaxedPrecision
+OpDecorate %463 RelaxedPrecision
+OpDecorate %469 RelaxedPrecision
+OpDecorate %472 RelaxedPrecision
+OpDecorate %475 RelaxedPrecision
+OpDecorate %478 RelaxedPrecision
 OpDecorate %479 RelaxedPrecision
-OpDecorate %482 RelaxedPrecision
+OpDecorate %485 RelaxedPrecision
 OpDecorate %488 RelaxedPrecision
 OpDecorate %491 RelaxedPrecision
 OpDecorate %494 RelaxedPrecision
-OpDecorate %496 RelaxedPrecision
-OpDecorate %497 RelaxedPrecision
+OpDecorate %495 RelaxedPrecision
+OpDecorate %501 RelaxedPrecision
+OpDecorate %504 RelaxedPrecision
+OpDecorate %507 RelaxedPrecision
+OpDecorate %510 RelaxedPrecision
+OpDecorate %511 RelaxedPrecision
+OpDecorate %517 RelaxedPrecision
+OpDecorate %520 RelaxedPrecision
+OpDecorate %523 RelaxedPrecision
+OpDecorate %525 RelaxedPrecision
+OpDecorate %526 RelaxedPrecision
+OpDecorate %527 RelaxedPrecision
+OpDecorate %528 RelaxedPrecision
+OpDecorate %529 RelaxedPrecision
+OpDecorate %530 RelaxedPrecision
+OpDecorate %531 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %v2float = OpTypeVector %float 2
@@ -197,609 +231,646 @@
 %int_5 = OpConstant %int 5
 %int_4 = OpConstant %int 4
 %void = OpTypeVoid
-%103 = OpTypeFunction %void
+%105 = OpTypeFunction %void
+%109 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %float_0 = OpConstant %float 0
-%108 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%113 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %float_12 = OpConstant %float 12
 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
-%118 = OpConstantComposite %v2float %float_0 %float_0
-%121 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+%123 = OpConstantComposite %v2float %float_0 %float_0
 %int_2 = OpConstant %int 2
 %MatrixEffect_Stage1_c0_c0 = OpFunction %v4float None %26
 %29 = OpFunctionParameter %_ptr_Function_v4float
 %30 = OpFunctionParameter %_ptr_Function_v2float
 %31 = OpLabel
+%_output = OpVariable %_ptr_Function_v4float Function
 %_0_coords = OpVariable %_ptr_Function_v2float Function
-%_1_inCoord = OpVariable %_ptr_Function_v2float Function
-%_2_subsetCoord = OpVariable %_ptr_Function_v2float Function
-%_3_clampedCoord = OpVariable %_ptr_Function_v2float Function
-%_4_textureColor = OpVariable %_ptr_Function_v4float Function
-%_5_snappedX = OpVariable %_ptr_Function_float Function
-%34 = OpAccessChain %_ptr_Uniform_mat3v3float %4 %int_3
-%36 = OpLoad %mat3v3float %34
-%37 = OpLoad %v2float %30
-%38 = OpCompositeExtract %float %37 0
-%39 = OpCompositeExtract %float %37 1
-%41 = OpCompositeConstruct %v3float %38 %39 %float_1
-%42 = OpMatrixTimesVector %v3float %36 %41
-%43 = OpVectorShuffle %v2float %42 %42 0 1
-OpStore %_0_coords %43
-%45 = OpLoad %v2float %_0_coords
-OpStore %_1_inCoord %45
-%46 = OpLoad %v2float %_1_inCoord
-%48 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6
-%50 = OpLoad %v4float %48
-%51 = OpVectorShuffle %v2float %50 %50 0 1
-%52 = OpFMul %v2float %46 %51
-OpStore %_1_inCoord %52
-%54 = OpLoad %v2float %_1_inCoord
-%55 = OpCompositeExtract %float %54 0
-%56 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_0
-OpStore %56 %55
-%59 = OpLoad %v2float %_1_inCoord
-%60 = OpCompositeExtract %float %59 1
-%61 = OpAccessChain %_ptr_Function_float %_2_subsetCoord %int_1
-OpStore %61 %60
-%64 = OpLoad %v2float %_2_subsetCoord
-OpStore %_3_clampedCoord %64
-%67 = OpLoad %22 %uTextureSampler_0_Stage1
-%68 = OpLoad %v2float %_3_clampedCoord
-%69 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6
-%70 = OpLoad %v4float %69
-%71 = OpVectorShuffle %v2float %70 %70 2 3
-%72 = OpFMul %v2float %68 %71
-%66 = OpImageSampleImplicitLod %v4float %67 %72
-OpStore %_4_textureColor %66
-%75 = OpLoad %v2float %_1_inCoord
-%76 = OpCompositeExtract %float %75 0
-%78 = OpFAdd %float %76 %float_0_00100000005
-%74 = OpExtInst %float %1 Floor %78
-%80 = OpFAdd %float %74 %float_0_5
-OpStore %_5_snappedX %80
-%82 = OpLoad %float %_5_snappedX
-%84 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5
-%85 = OpLoad %v4float %84
-%86 = OpCompositeExtract %float %85 0
-%87 = OpFOrdLessThan %bool %82 %86
-OpSelectionMerge %89 None
-OpBranchConditional %87 %89 %88
-%88 = OpLabel
-%90 = OpLoad %float %_5_snappedX
-%91 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5
-%92 = OpLoad %v4float %91
-%93 = OpCompositeExtract %float %92 2
-%94 = OpFOrdGreaterThan %bool %90 %93
-OpBranch %89
-%89 = OpLabel
-%95 = OpPhi %bool %true %31 %94 %88
-OpSelectionMerge %97 None
-OpBranchConditional %95 %96 %97
-%96 = OpLabel
-%99 = OpAccessChain %_ptr_Uniform_v4float %4 %int_4
-%100 = OpLoad %v4float %99
-OpStore %_4_textureColor %100
-OpBranch %97
-%97 = OpLabel
-%101 = OpLoad %v4float %_4_textureColor
-OpReturnValue %101
+%_1_output = OpVariable %_ptr_Function_v4float Function
+%_2_inCoord = OpVariable %_ptr_Function_v2float Function
+%_3_subsetCoord = OpVariable %_ptr_Function_v2float Function
+%_4_clampedCoord = OpVariable %_ptr_Function_v2float Function
+%_5_textureColor = OpVariable %_ptr_Function_v4float Function
+%_6_snappedX = OpVariable %_ptr_Function_float Function
+%35 = OpAccessChain %_ptr_Uniform_mat3v3float %4 %int_3
+%37 = OpLoad %mat3v3float %35
+%38 = OpLoad %v2float %30
+%39 = OpCompositeExtract %float %38 0
+%40 = OpCompositeExtract %float %38 1
+%42 = OpCompositeConstruct %v3float %39 %40 %float_1
+%43 = OpMatrixTimesVector %v3float %37 %42
+%44 = OpVectorShuffle %v2float %43 %43 0 1
+OpStore %_0_coords %44
+%47 = OpLoad %v2float %_0_coords
+OpStore %_2_inCoord %47
+%48 = OpLoad %v2float %_2_inCoord
+%50 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6
+%52 = OpLoad %v4float %50
+%53 = OpVectorShuffle %v2float %52 %52 0 1
+%54 = OpFMul %v2float %48 %53
+OpStore %_2_inCoord %54
+%56 = OpLoad %v2float %_2_inCoord
+%57 = OpCompositeExtract %float %56 0
+%58 = OpAccessChain %_ptr_Function_float %_3_subsetCoord %int_0
+OpStore %58 %57
+%61 = OpLoad %v2float %_2_inCoord
+%62 = OpCompositeExtract %float %61 1
+%63 = OpAccessChain %_ptr_Function_float %_3_subsetCoord %int_1
+OpStore %63 %62
+%66 = OpLoad %v2float %_3_subsetCoord
+OpStore %_4_clampedCoord %66
+%69 = OpLoad %22 %uTextureSampler_0_Stage1
+%70 = OpLoad %v2float %_4_clampedCoord
+%71 = OpAccessChain %_ptr_Uniform_v4float %4 %int_6
+%72 = OpLoad %v4float %71
+%73 = OpVectorShuffle %v2float %72 %72 2 3
+%74 = OpFMul %v2float %70 %73
+%68 = OpImageSampleImplicitLod %v4float %69 %74
+OpStore %_5_textureColor %68
+%77 = OpLoad %v2float %_2_inCoord
+%78 = OpCompositeExtract %float %77 0
+%80 = OpFAdd %float %78 %float_0_00100000005
+%76 = OpExtInst %float %1 Floor %80
+%82 = OpFAdd %float %76 %float_0_5
+OpStore %_6_snappedX %82
+%84 = OpLoad %float %_6_snappedX
+%86 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5
+%87 = OpLoad %v4float %86
+%88 = OpCompositeExtract %float %87 0
+%89 = OpFOrdLessThan %bool %84 %88
+OpSelectionMerge %91 None
+OpBranchConditional %89 %91 %90
+%90 = OpLabel
+%92 = OpLoad %float %_6_snappedX
+%93 = OpAccessChain %_ptr_Uniform_v4float %4 %int_5
+%94 = OpLoad %v4float %93
+%95 = OpCompositeExtract %float %94 2
+%96 = OpFOrdGreaterThan %bool %92 %95
+OpBranch %91
+%91 = OpLabel
+%97 = OpPhi %bool %true %31 %96 %90
+OpSelectionMerge %99 None
+OpBranchConditional %97 %98 %99
+%98 = OpLabel
+%101 = OpAccessChain %_ptr_Uniform_v4float %4 %int_4
+%102 = OpLoad %v4float %101
+OpStore %_5_textureColor %102
+OpBranch %99
+%99 = OpLabel
+%103 = OpLoad %v4float %_5_textureColor
+OpReturnValue %103
 OpFunctionEnd
-%main = OpFunction %void None %103
-%104 = OpLabel
+%main = OpFunction %void None %105
+%106 = OpLabel
+%outputColor_Stage0 = OpVariable %_ptr_Function_v4float Function
+%outputCoverage_Stage0 = OpVariable %_ptr_Function_v4float Function
 %output_Stage1 = OpVariable %_ptr_Function_v4float Function
-%_6_output = OpVariable %_ptr_Function_v4float Function
-%_7_coord = OpVariable %_ptr_Function_v2float Function
-%_8_coordSampled = OpVariable %_ptr_Function_v2float Function
-%122 = OpVariable %_ptr_Function_v4float Function
-%124 = OpVariable %_ptr_Function_v2float Function
-%138 = OpVariable %_ptr_Function_v4float Function
-%140 = OpVariable %_ptr_Function_v2float Function
-%153 = OpVariable %_ptr_Function_v4float Function
-%155 = OpVariable %_ptr_Function_v2float Function
-%168 = OpVariable %_ptr_Function_v4float Function
-%170 = OpVariable %_ptr_Function_v2float Function
-%183 = OpVariable %_ptr_Function_v4float Function
-%185 = OpVariable %_ptr_Function_v2float Function
-%198 = OpVariable %_ptr_Function_v4float Function
-%200 = OpVariable %_ptr_Function_v2float Function
-%213 = OpVariable %_ptr_Function_v4float Function
-%215 = OpVariable %_ptr_Function_v2float Function
-%228 = OpVariable %_ptr_Function_v4float Function
-%230 = OpVariable %_ptr_Function_v2float Function
-%243 = OpVariable %_ptr_Function_v4float Function
-%245 = OpVariable %_ptr_Function_v2float Function
-%258 = OpVariable %_ptr_Function_v4float Function
-%260 = OpVariable %_ptr_Function_v2float Function
-%273 = OpVariable %_ptr_Function_v4float Function
-%275 = OpVariable %_ptr_Function_v2float Function
+%_7_output = OpVariable %_ptr_Function_v4float Function
+%_8_coord = OpVariable %_ptr_Function_v2float Function
+%_9_coordSampled = OpVariable %_ptr_Function_v2float Function
+%127 = OpVariable %_ptr_Function_v4float Function
+%129 = OpVariable %_ptr_Function_v2float Function
+%144 = OpVariable %_ptr_Function_v4float Function
+%146 = OpVariable %_ptr_Function_v2float Function
+%160 = OpVariable %_ptr_Function_v4float Function
+%162 = OpVariable %_ptr_Function_v2float Function
+%176 = OpVariable %_ptr_Function_v4float Function
+%178 = OpVariable %_ptr_Function_v2float Function
+%192 = OpVariable %_ptr_Function_v4float Function
+%194 = OpVariable %_ptr_Function_v2float Function
+%208 = OpVariable %_ptr_Function_v4float Function
+%210 = OpVariable %_ptr_Function_v2float Function
+%224 = OpVariable %_ptr_Function_v4float Function
+%226 = OpVariable %_ptr_Function_v2float Function
+%240 = OpVariable %_ptr_Function_v4float Function
+%242 = OpVariable %_ptr_Function_v2float Function
+%256 = OpVariable %_ptr_Function_v4float Function
+%258 = OpVariable %_ptr_Function_v2float Function
+%272 = OpVariable %_ptr_Function_v4float Function
+%274 = OpVariable %_ptr_Function_v2float Function
 %288 = OpVariable %_ptr_Function_v4float Function
 %290 = OpVariable %_ptr_Function_v2float Function
-%303 = OpVariable %_ptr_Function_v4float Function
-%305 = OpVariable %_ptr_Function_v2float Function
-%318 = OpVariable %_ptr_Function_v4float Function
-%320 = OpVariable %_ptr_Function_v2float Function
-%333 = OpVariable %_ptr_Function_v4float Function
-%335 = OpVariable %_ptr_Function_v2float Function
-%348 = OpVariable %_ptr_Function_v4float Function
-%350 = OpVariable %_ptr_Function_v2float Function
-%363 = OpVariable %_ptr_Function_v4float Function
-%365 = OpVariable %_ptr_Function_v2float Function
-%378 = OpVariable %_ptr_Function_v4float Function
-%380 = OpVariable %_ptr_Function_v2float Function
-%393 = OpVariable %_ptr_Function_v4float Function
-%395 = OpVariable %_ptr_Function_v2float Function
-%408 = OpVariable %_ptr_Function_v4float Function
-%410 = OpVariable %_ptr_Function_v2float Function
-%423 = OpVariable %_ptr_Function_v4float Function
-%425 = OpVariable %_ptr_Function_v2float Function
-%438 = OpVariable %_ptr_Function_v4float Function
-%440 = OpVariable %_ptr_Function_v2float Function
-%453 = OpVariable %_ptr_Function_v4float Function
-%455 = OpVariable %_ptr_Function_v2float Function
-%468 = OpVariable %_ptr_Function_v4float Function
-%470 = OpVariable %_ptr_Function_v2float Function
-%483 = OpVariable %_ptr_Function_v4float Function
-%485 = OpVariable %_ptr_Function_v2float Function
-OpStore %_6_output %108
-%110 = OpLoad %v2float %vLocalCoord_Stage0
-%112 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%114 = OpLoad %v2float %112
-%115 = OpVectorTimesScalar %v2float %114 %float_12
-%116 = OpFSub %v2float %110 %115
-OpStore %_7_coord %116
-OpStore %_8_coordSampled %118
-%119 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %119
-%120 = OpLoad %v4float %_6_output
-OpStore %122 %121
-%123 = OpLoad %v2float %_8_coordSampled
-OpStore %124 %123
-%125 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %122 %124
-%127 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
-%128 = OpLoad %v4float %127
-%129 = OpCompositeExtract %float %128 0
-%130 = OpVectorTimesScalar %v4float %125 %129
-%131 = OpFAdd %v4float %120 %130
-OpStore %_6_output %131
-%132 = OpLoad %v2float %_7_coord
-%133 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%134 = OpLoad %v2float %133
-%135 = OpFAdd %v2float %132 %134
-OpStore %_7_coord %135
-%136 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %136
-%137 = OpLoad %v4float %_6_output
-OpStore %138 %121
-%139 = OpLoad %v2float %_8_coordSampled
-OpStore %140 %139
-%141 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %138 %140
-%142 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
-%143 = OpLoad %v4float %142
-%144 = OpCompositeExtract %float %143 1
-%145 = OpVectorTimesScalar %v4float %141 %144
-%146 = OpFAdd %v4float %137 %145
-OpStore %_6_output %146
-%147 = OpLoad %v2float %_7_coord
-%148 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%149 = OpLoad %v2float %148
-%150 = OpFAdd %v2float %147 %149
-OpStore %_7_coord %150
-%151 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %151
-%152 = OpLoad %v4float %_6_output
-OpStore %153 %121
-%154 = OpLoad %v2float %_8_coordSampled
-OpStore %155 %154
-%156 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %153 %155
-%157 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
-%158 = OpLoad %v4float %157
-%159 = OpCompositeExtract %float %158 2
-%160 = OpVectorTimesScalar %v4float %156 %159
-%161 = OpFAdd %v4float %152 %160
-OpStore %_6_output %161
-%162 = OpLoad %v2float %_7_coord
-%163 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%164 = OpLoad %v2float %163
-%165 = OpFAdd %v2float %162 %164
-OpStore %_7_coord %165
-%166 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %166
-%167 = OpLoad %v4float %_6_output
-OpStore %168 %121
-%169 = OpLoad %v2float %_8_coordSampled
-OpStore %170 %169
-%171 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %168 %170
-%172 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
-%173 = OpLoad %v4float %172
-%174 = OpCompositeExtract %float %173 3
-%175 = OpVectorTimesScalar %v4float %171 %174
-%176 = OpFAdd %v4float %167 %175
-OpStore %_6_output %176
-%177 = OpLoad %v2float %_7_coord
-%178 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%179 = OpLoad %v2float %178
-%180 = OpFAdd %v2float %177 %179
-OpStore %_7_coord %180
-%181 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %181
-%182 = OpLoad %v4float %_6_output
-OpStore %183 %121
-%184 = OpLoad %v2float %_8_coordSampled
-OpStore %185 %184
-%186 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %183 %185
-%187 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
-%188 = OpLoad %v4float %187
-%189 = OpCompositeExtract %float %188 0
-%190 = OpVectorTimesScalar %v4float %186 %189
-%191 = OpFAdd %v4float %182 %190
-OpStore %_6_output %191
-%192 = OpLoad %v2float %_7_coord
-%193 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%194 = OpLoad %v2float %193
-%195 = OpFAdd %v2float %192 %194
-OpStore %_7_coord %195
-%196 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %196
-%197 = OpLoad %v4float %_6_output
-OpStore %198 %121
-%199 = OpLoad %v2float %_8_coordSampled
-OpStore %200 %199
-%201 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %198 %200
-%202 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
-%203 = OpLoad %v4float %202
-%204 = OpCompositeExtract %float %203 1
-%205 = OpVectorTimesScalar %v4float %201 %204
-%206 = OpFAdd %v4float %197 %205
-OpStore %_6_output %206
-%207 = OpLoad %v2float %_7_coord
-%208 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%209 = OpLoad %v2float %208
-%210 = OpFAdd %v2float %207 %209
-OpStore %_7_coord %210
-%211 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %211
-%212 = OpLoad %v4float %_6_output
-OpStore %213 %121
-%214 = OpLoad %v2float %_8_coordSampled
-OpStore %215 %214
-%216 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %213 %215
-%217 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
-%218 = OpLoad %v4float %217
-%219 = OpCompositeExtract %float %218 2
-%220 = OpVectorTimesScalar %v4float %216 %219
-%221 = OpFAdd %v4float %212 %220
-OpStore %_6_output %221
-%222 = OpLoad %v2float %_7_coord
-%223 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%224 = OpLoad %v2float %223
-%225 = OpFAdd %v2float %222 %224
-OpStore %_7_coord %225
-%226 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %226
-%227 = OpLoad %v4float %_6_output
-OpStore %228 %121
-%229 = OpLoad %v2float %_8_coordSampled
-OpStore %230 %229
-%231 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %228 %230
-%232 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
-%233 = OpLoad %v4float %232
-%234 = OpCompositeExtract %float %233 3
-%235 = OpVectorTimesScalar %v4float %231 %234
-%236 = OpFAdd %v4float %227 %235
-OpStore %_6_output %236
-%237 = OpLoad %v2float %_7_coord
-%238 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%239 = OpLoad %v2float %238
-%240 = OpFAdd %v2float %237 %239
-OpStore %_7_coord %240
-%241 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %241
-%242 = OpLoad %v4float %_6_output
-OpStore %243 %121
-%244 = OpLoad %v2float %_8_coordSampled
-OpStore %245 %244
-%246 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %243 %245
-%247 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
-%248 = OpLoad %v4float %247
-%249 = OpCompositeExtract %float %248 0
-%250 = OpVectorTimesScalar %v4float %246 %249
-%251 = OpFAdd %v4float %242 %250
-OpStore %_6_output %251
-%252 = OpLoad %v2float %_7_coord
-%253 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%254 = OpLoad %v2float %253
-%255 = OpFAdd %v2float %252 %254
-OpStore %_7_coord %255
-%256 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %256
-%257 = OpLoad %v4float %_6_output
-OpStore %258 %121
-%259 = OpLoad %v2float %_8_coordSampled
-OpStore %260 %259
-%261 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %258 %260
-%262 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
-%263 = OpLoad %v4float %262
-%264 = OpCompositeExtract %float %263 1
-%265 = OpVectorTimesScalar %v4float %261 %264
-%266 = OpFAdd %v4float %257 %265
-OpStore %_6_output %266
-%267 = OpLoad %v2float %_7_coord
-%268 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%269 = OpLoad %v2float %268
-%270 = OpFAdd %v2float %267 %269
-OpStore %_7_coord %270
-%271 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %271
-%272 = OpLoad %v4float %_6_output
-OpStore %273 %121
-%274 = OpLoad %v2float %_8_coordSampled
-OpStore %275 %274
-%276 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %273 %275
-%277 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
-%278 = OpLoad %v4float %277
-%279 = OpCompositeExtract %float %278 2
-%280 = OpVectorTimesScalar %v4float %276 %279
-%281 = OpFAdd %v4float %272 %280
-OpStore %_6_output %281
-%282 = OpLoad %v2float %_7_coord
-%283 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%284 = OpLoad %v2float %283
-%285 = OpFAdd %v2float %282 %284
-OpStore %_7_coord %285
-%286 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %286
-%287 = OpLoad %v4float %_6_output
-OpStore %288 %121
-%289 = OpLoad %v2float %_8_coordSampled
+%304 = OpVariable %_ptr_Function_v4float Function
+%306 = OpVariable %_ptr_Function_v2float Function
+%320 = OpVariable %_ptr_Function_v4float Function
+%322 = OpVariable %_ptr_Function_v2float Function
+%336 = OpVariable %_ptr_Function_v4float Function
+%338 = OpVariable %_ptr_Function_v2float Function
+%352 = OpVariable %_ptr_Function_v4float Function
+%354 = OpVariable %_ptr_Function_v2float Function
+%368 = OpVariable %_ptr_Function_v4float Function
+%370 = OpVariable %_ptr_Function_v2float Function
+%384 = OpVariable %_ptr_Function_v4float Function
+%386 = OpVariable %_ptr_Function_v2float Function
+%400 = OpVariable %_ptr_Function_v4float Function
+%402 = OpVariable %_ptr_Function_v2float Function
+%416 = OpVariable %_ptr_Function_v4float Function
+%418 = OpVariable %_ptr_Function_v2float Function
+%432 = OpVariable %_ptr_Function_v4float Function
+%434 = OpVariable %_ptr_Function_v2float Function
+%448 = OpVariable %_ptr_Function_v4float Function
+%450 = OpVariable %_ptr_Function_v2float Function
+%464 = OpVariable %_ptr_Function_v4float Function
+%466 = OpVariable %_ptr_Function_v2float Function
+%480 = OpVariable %_ptr_Function_v4float Function
+%482 = OpVariable %_ptr_Function_v2float Function
+%496 = OpVariable %_ptr_Function_v4float Function
+%498 = OpVariable %_ptr_Function_v2float Function
+%512 = OpVariable %_ptr_Function_v4float Function
+%514 = OpVariable %_ptr_Function_v2float Function
+OpStore %outputColor_Stage0 %109
+OpStore %outputCoverage_Stage0 %109
+OpStore %_7_output %113
+%115 = OpLoad %v2float %vLocalCoord_Stage0
+%117 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%119 = OpLoad %v2float %117
+%120 = OpVectorTimesScalar %v2float %119 %float_12
+%121 = OpFSub %v2float %115 %120
+OpStore %_8_coord %121
+OpStore %_9_coordSampled %123
+%124 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %124
+%125 = OpLoad %v4float %_7_output
+%126 = OpLoad %v4float %outputColor_Stage0
+OpStore %127 %126
+%128 = OpLoad %v2float %_9_coordSampled
+OpStore %129 %128
+%130 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %127 %129
+%132 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
+%133 = OpLoad %v4float %132
+%134 = OpCompositeExtract %float %133 0
+%135 = OpVectorTimesScalar %v4float %130 %134
+%136 = OpFAdd %v4float %125 %135
+OpStore %_7_output %136
+%137 = OpLoad %v2float %_8_coord
+%138 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%139 = OpLoad %v2float %138
+%140 = OpFAdd %v2float %137 %139
+OpStore %_8_coord %140
+%141 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %141
+%142 = OpLoad %v4float %_7_output
+%143 = OpLoad %v4float %outputColor_Stage0
+OpStore %144 %143
+%145 = OpLoad %v2float %_9_coordSampled
+OpStore %146 %145
+%147 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %144 %146
+%148 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
+%149 = OpLoad %v4float %148
+%150 = OpCompositeExtract %float %149 1
+%151 = OpVectorTimesScalar %v4float %147 %150
+%152 = OpFAdd %v4float %142 %151
+OpStore %_7_output %152
+%153 = OpLoad %v2float %_8_coord
+%154 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%155 = OpLoad %v2float %154
+%156 = OpFAdd %v2float %153 %155
+OpStore %_8_coord %156
+%157 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %157
+%158 = OpLoad %v4float %_7_output
+%159 = OpLoad %v4float %outputColor_Stage0
+OpStore %160 %159
+%161 = OpLoad %v2float %_9_coordSampled
+OpStore %162 %161
+%163 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %160 %162
+%164 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
+%165 = OpLoad %v4float %164
+%166 = OpCompositeExtract %float %165 2
+%167 = OpVectorTimesScalar %v4float %163 %166
+%168 = OpFAdd %v4float %158 %167
+OpStore %_7_output %168
+%169 = OpLoad %v2float %_8_coord
+%170 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%171 = OpLoad %v2float %170
+%172 = OpFAdd %v2float %169 %171
+OpStore %_8_coord %172
+%173 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %173
+%174 = OpLoad %v4float %_7_output
+%175 = OpLoad %v4float %outputColor_Stage0
+OpStore %176 %175
+%177 = OpLoad %v2float %_9_coordSampled
+OpStore %178 %177
+%179 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %176 %178
+%180 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_0
+%181 = OpLoad %v4float %180
+%182 = OpCompositeExtract %float %181 3
+%183 = OpVectorTimesScalar %v4float %179 %182
+%184 = OpFAdd %v4float %174 %183
+OpStore %_7_output %184
+%185 = OpLoad %v2float %_8_coord
+%186 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%187 = OpLoad %v2float %186
+%188 = OpFAdd %v2float %185 %187
+OpStore %_8_coord %188
+%189 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %189
+%190 = OpLoad %v4float %_7_output
+%191 = OpLoad %v4float %outputColor_Stage0
+OpStore %192 %191
+%193 = OpLoad %v2float %_9_coordSampled
+OpStore %194 %193
+%195 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %192 %194
+%196 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
+%197 = OpLoad %v4float %196
+%198 = OpCompositeExtract %float %197 0
+%199 = OpVectorTimesScalar %v4float %195 %198
+%200 = OpFAdd %v4float %190 %199
+OpStore %_7_output %200
+%201 = OpLoad %v2float %_8_coord
+%202 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%203 = OpLoad %v2float %202
+%204 = OpFAdd %v2float %201 %203
+OpStore %_8_coord %204
+%205 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %205
+%206 = OpLoad %v4float %_7_output
+%207 = OpLoad %v4float %outputColor_Stage0
+OpStore %208 %207
+%209 = OpLoad %v2float %_9_coordSampled
+OpStore %210 %209
+%211 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %208 %210
+%212 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
+%213 = OpLoad %v4float %212
+%214 = OpCompositeExtract %float %213 1
+%215 = OpVectorTimesScalar %v4float %211 %214
+%216 = OpFAdd %v4float %206 %215
+OpStore %_7_output %216
+%217 = OpLoad %v2float %_8_coord
+%218 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%219 = OpLoad %v2float %218
+%220 = OpFAdd %v2float %217 %219
+OpStore %_8_coord %220
+%221 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %221
+%222 = OpLoad %v4float %_7_output
+%223 = OpLoad %v4float %outputColor_Stage0
+OpStore %224 %223
+%225 = OpLoad %v2float %_9_coordSampled
+OpStore %226 %225
+%227 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %224 %226
+%228 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
+%229 = OpLoad %v4float %228
+%230 = OpCompositeExtract %float %229 2
+%231 = OpVectorTimesScalar %v4float %227 %230
+%232 = OpFAdd %v4float %222 %231
+OpStore %_7_output %232
+%233 = OpLoad %v2float %_8_coord
+%234 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%235 = OpLoad %v2float %234
+%236 = OpFAdd %v2float %233 %235
+OpStore %_8_coord %236
+%237 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %237
+%238 = OpLoad %v4float %_7_output
+%239 = OpLoad %v4float %outputColor_Stage0
+OpStore %240 %239
+%241 = OpLoad %v2float %_9_coordSampled
+OpStore %242 %241
+%243 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %240 %242
+%244 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_1
+%245 = OpLoad %v4float %244
+%246 = OpCompositeExtract %float %245 3
+%247 = OpVectorTimesScalar %v4float %243 %246
+%248 = OpFAdd %v4float %238 %247
+OpStore %_7_output %248
+%249 = OpLoad %v2float %_8_coord
+%250 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%251 = OpLoad %v2float %250
+%252 = OpFAdd %v2float %249 %251
+OpStore %_8_coord %252
+%253 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %253
+%254 = OpLoad %v4float %_7_output
+%255 = OpLoad %v4float %outputColor_Stage0
+OpStore %256 %255
+%257 = OpLoad %v2float %_9_coordSampled
+OpStore %258 %257
+%259 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %256 %258
+%260 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
+%261 = OpLoad %v4float %260
+%262 = OpCompositeExtract %float %261 0
+%263 = OpVectorTimesScalar %v4float %259 %262
+%264 = OpFAdd %v4float %254 %263
+OpStore %_7_output %264
+%265 = OpLoad %v2float %_8_coord
+%266 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%267 = OpLoad %v2float %266
+%268 = OpFAdd %v2float %265 %267
+OpStore %_8_coord %268
+%269 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %269
+%270 = OpLoad %v4float %_7_output
+%271 = OpLoad %v4float %outputColor_Stage0
+OpStore %272 %271
+%273 = OpLoad %v2float %_9_coordSampled
+OpStore %274 %273
+%275 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %272 %274
+%276 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
+%277 = OpLoad %v4float %276
+%278 = OpCompositeExtract %float %277 1
+%279 = OpVectorTimesScalar %v4float %275 %278
+%280 = OpFAdd %v4float %270 %279
+OpStore %_7_output %280
+%281 = OpLoad %v2float %_8_coord
+%282 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%283 = OpLoad %v2float %282
+%284 = OpFAdd %v2float %281 %283
+OpStore %_8_coord %284
+%285 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %285
+%286 = OpLoad %v4float %_7_output
+%287 = OpLoad %v4float %outputColor_Stage0
+OpStore %288 %287
+%289 = OpLoad %v2float %_9_coordSampled
 OpStore %290 %289
 %291 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %288 %290
 %292 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
 %293 = OpLoad %v4float %292
-%294 = OpCompositeExtract %float %293 3
+%294 = OpCompositeExtract %float %293 2
 %295 = OpVectorTimesScalar %v4float %291 %294
-%296 = OpFAdd %v4float %287 %295
-OpStore %_6_output %296
-%297 = OpLoad %v2float %_7_coord
+%296 = OpFAdd %v4float %286 %295
+OpStore %_7_output %296
+%297 = OpLoad %v2float %_8_coord
 %298 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
 %299 = OpLoad %v2float %298
 %300 = OpFAdd %v2float %297 %299
-OpStore %_7_coord %300
-%301 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %301
-%302 = OpLoad %v4float %_6_output
-OpStore %303 %121
-%304 = OpLoad %v2float %_8_coordSampled
-OpStore %305 %304
-%306 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %303 %305
-%307 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
-%308 = OpLoad %v4float %307
-%309 = OpCompositeExtract %float %308 0
-%310 = OpVectorTimesScalar %v4float %306 %309
-%311 = OpFAdd %v4float %302 %310
-OpStore %_6_output %311
-%312 = OpLoad %v2float %_7_coord
-%313 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%314 = OpLoad %v2float %313
-%315 = OpFAdd %v2float %312 %314
-OpStore %_7_coord %315
-%316 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %316
-%317 = OpLoad %v4float %_6_output
-OpStore %318 %121
-%319 = OpLoad %v2float %_8_coordSampled
+OpStore %_8_coord %300
+%301 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %301
+%302 = OpLoad %v4float %_7_output
+%303 = OpLoad %v4float %outputColor_Stage0
+OpStore %304 %303
+%305 = OpLoad %v2float %_9_coordSampled
+OpStore %306 %305
+%307 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %304 %306
+%308 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_2
+%309 = OpLoad %v4float %308
+%310 = OpCompositeExtract %float %309 3
+%311 = OpVectorTimesScalar %v4float %307 %310
+%312 = OpFAdd %v4float %302 %311
+OpStore %_7_output %312
+%313 = OpLoad %v2float %_8_coord
+%314 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%315 = OpLoad %v2float %314
+%316 = OpFAdd %v2float %313 %315
+OpStore %_8_coord %316
+%317 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %317
+%318 = OpLoad %v4float %_7_output
+%319 = OpLoad %v4float %outputColor_Stage0
 OpStore %320 %319
-%321 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %318 %320
-%322 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
-%323 = OpLoad %v4float %322
-%324 = OpCompositeExtract %float %323 1
-%325 = OpVectorTimesScalar %v4float %321 %324
-%326 = OpFAdd %v4float %317 %325
-OpStore %_6_output %326
-%327 = OpLoad %v2float %_7_coord
-%328 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%329 = OpLoad %v2float %328
-%330 = OpFAdd %v2float %327 %329
-OpStore %_7_coord %330
-%331 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %331
-%332 = OpLoad %v4float %_6_output
-OpStore %333 %121
-%334 = OpLoad %v2float %_8_coordSampled
-OpStore %335 %334
-%336 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %333 %335
-%337 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
-%338 = OpLoad %v4float %337
-%339 = OpCompositeExtract %float %338 2
-%340 = OpVectorTimesScalar %v4float %336 %339
-%341 = OpFAdd %v4float %332 %340
-OpStore %_6_output %341
-%342 = OpLoad %v2float %_7_coord
-%343 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%344 = OpLoad %v2float %343
-%345 = OpFAdd %v2float %342 %344
-OpStore %_7_coord %345
-%346 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %346
-%347 = OpLoad %v4float %_6_output
-OpStore %348 %121
-%349 = OpLoad %v2float %_8_coordSampled
-OpStore %350 %349
-%351 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %348 %350
-%352 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
-%353 = OpLoad %v4float %352
-%354 = OpCompositeExtract %float %353 3
-%355 = OpVectorTimesScalar %v4float %351 %354
-%356 = OpFAdd %v4float %347 %355
-OpStore %_6_output %356
-%357 = OpLoad %v2float %_7_coord
-%358 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%359 = OpLoad %v2float %358
-%360 = OpFAdd %v2float %357 %359
-OpStore %_7_coord %360
-%361 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %361
-%362 = OpLoad %v4float %_6_output
-OpStore %363 %121
-%364 = OpLoad %v2float %_8_coordSampled
-OpStore %365 %364
-%366 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %363 %365
-%367 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
-%368 = OpLoad %v4float %367
-%369 = OpCompositeExtract %float %368 0
-%370 = OpVectorTimesScalar %v4float %366 %369
-%371 = OpFAdd %v4float %362 %370
-OpStore %_6_output %371
-%372 = OpLoad %v2float %_7_coord
-%373 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%374 = OpLoad %v2float %373
-%375 = OpFAdd %v2float %372 %374
-OpStore %_7_coord %375
-%376 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %376
-%377 = OpLoad %v4float %_6_output
-OpStore %378 %121
-%379 = OpLoad %v2float %_8_coordSampled
-OpStore %380 %379
-%381 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %378 %380
-%382 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
-%383 = OpLoad %v4float %382
-%384 = OpCompositeExtract %float %383 1
-%385 = OpVectorTimesScalar %v4float %381 %384
-%386 = OpFAdd %v4float %377 %385
-OpStore %_6_output %386
-%387 = OpLoad %v2float %_7_coord
-%388 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%389 = OpLoad %v2float %388
-%390 = OpFAdd %v2float %387 %389
-OpStore %_7_coord %390
-%391 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %391
-%392 = OpLoad %v4float %_6_output
-OpStore %393 %121
-%394 = OpLoad %v2float %_8_coordSampled
-OpStore %395 %394
-%396 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %393 %395
-%397 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
-%398 = OpLoad %v4float %397
-%399 = OpCompositeExtract %float %398 2
-%400 = OpVectorTimesScalar %v4float %396 %399
-%401 = OpFAdd %v4float %392 %400
-OpStore %_6_output %401
-%402 = OpLoad %v2float %_7_coord
-%403 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%404 = OpLoad %v2float %403
-%405 = OpFAdd %v2float %402 %404
-OpStore %_7_coord %405
-%406 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %406
-%407 = OpLoad %v4float %_6_output
-OpStore %408 %121
-%409 = OpLoad %v2float %_8_coordSampled
-OpStore %410 %409
-%411 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %408 %410
-%412 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
-%413 = OpLoad %v4float %412
-%414 = OpCompositeExtract %float %413 3
-%415 = OpVectorTimesScalar %v4float %411 %414
-%416 = OpFAdd %v4float %407 %415
-OpStore %_6_output %416
-%417 = OpLoad %v2float %_7_coord
-%418 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%419 = OpLoad %v2float %418
-%420 = OpFAdd %v2float %417 %419
-OpStore %_7_coord %420
-%421 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %421
-%422 = OpLoad %v4float %_6_output
-OpStore %423 %121
-%424 = OpLoad %v2float %_8_coordSampled
-OpStore %425 %424
-%426 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %423 %425
-%427 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
-%428 = OpLoad %v4float %427
-%429 = OpCompositeExtract %float %428 0
-%430 = OpVectorTimesScalar %v4float %426 %429
-%431 = OpFAdd %v4float %422 %430
-OpStore %_6_output %431
-%432 = OpLoad %v2float %_7_coord
-%433 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%434 = OpLoad %v2float %433
-%435 = OpFAdd %v2float %432 %434
-OpStore %_7_coord %435
-%436 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %436
-%437 = OpLoad %v4float %_6_output
-OpStore %438 %121
-%439 = OpLoad %v2float %_8_coordSampled
-OpStore %440 %439
-%441 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %438 %440
-%442 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
-%443 = OpLoad %v4float %442
-%444 = OpCompositeExtract %float %443 1
-%445 = OpVectorTimesScalar %v4float %441 %444
-%446 = OpFAdd %v4float %437 %445
-OpStore %_6_output %446
-%447 = OpLoad %v2float %_7_coord
-%448 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%449 = OpLoad %v2float %448
-%450 = OpFAdd %v2float %447 %449
-OpStore %_7_coord %450
-%451 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %451
-%452 = OpLoad %v4float %_6_output
-OpStore %453 %121
-%454 = OpLoad %v2float %_8_coordSampled
-OpStore %455 %454
-%456 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %453 %455
-%457 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
-%458 = OpLoad %v4float %457
-%459 = OpCompositeExtract %float %458 2
-%460 = OpVectorTimesScalar %v4float %456 %459
-%461 = OpFAdd %v4float %452 %460
-OpStore %_6_output %461
-%462 = OpLoad %v2float %_7_coord
-%463 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%464 = OpLoad %v2float %463
-%465 = OpFAdd %v2float %462 %464
-OpStore %_7_coord %465
-%466 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %466
-%467 = OpLoad %v4float %_6_output
-OpStore %468 %121
-%469 = OpLoad %v2float %_8_coordSampled
-OpStore %470 %469
-%471 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %468 %470
-%472 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
-%473 = OpLoad %v4float %472
-%474 = OpCompositeExtract %float %473 3
-%475 = OpVectorTimesScalar %v4float %471 %474
-%476 = OpFAdd %v4float %467 %475
-OpStore %_6_output %476
-%477 = OpLoad %v2float %_7_coord
-%478 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%479 = OpLoad %v2float %478
-%480 = OpFAdd %v2float %477 %479
-OpStore %_7_coord %480
-%481 = OpLoad %v2float %_7_coord
-OpStore %_8_coordSampled %481
-%482 = OpLoad %v4float %_6_output
-OpStore %483 %121
-%484 = OpLoad %v2float %_8_coordSampled
-OpStore %485 %484
-%486 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %483 %485
-%487 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_6
-%488 = OpLoad %v4float %487
-%489 = OpCompositeExtract %float %488 0
-%490 = OpVectorTimesScalar %v4float %486 %489
-%491 = OpFAdd %v4float %482 %490
-OpStore %_6_output %491
-%492 = OpLoad %v2float %_7_coord
-%493 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
-%494 = OpLoad %v2float %493
-%495 = OpFAdd %v2float %492 %494
-OpStore %_7_coord %495
-%496 = OpLoad %v4float %_6_output
-OpStore %output_Stage1 %496
-%497 = OpLoad %v4float %output_Stage1
-OpStore %sk_FragColor %497
+%321 = OpLoad %v2float %_9_coordSampled
+OpStore %322 %321
+%323 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %320 %322
+%324 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
+%325 = OpLoad %v4float %324
+%326 = OpCompositeExtract %float %325 0
+%327 = OpVectorTimesScalar %v4float %323 %326
+%328 = OpFAdd %v4float %318 %327
+OpStore %_7_output %328
+%329 = OpLoad %v2float %_8_coord
+%330 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%331 = OpLoad %v2float %330
+%332 = OpFAdd %v2float %329 %331
+OpStore %_8_coord %332
+%333 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %333
+%334 = OpLoad %v4float %_7_output
+%335 = OpLoad %v4float %outputColor_Stage0
+OpStore %336 %335
+%337 = OpLoad %v2float %_9_coordSampled
+OpStore %338 %337
+%339 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %336 %338
+%340 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
+%341 = OpLoad %v4float %340
+%342 = OpCompositeExtract %float %341 1
+%343 = OpVectorTimesScalar %v4float %339 %342
+%344 = OpFAdd %v4float %334 %343
+OpStore %_7_output %344
+%345 = OpLoad %v2float %_8_coord
+%346 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%347 = OpLoad %v2float %346
+%348 = OpFAdd %v2float %345 %347
+OpStore %_8_coord %348
+%349 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %349
+%350 = OpLoad %v4float %_7_output
+%351 = OpLoad %v4float %outputColor_Stage0
+OpStore %352 %351
+%353 = OpLoad %v2float %_9_coordSampled
+OpStore %354 %353
+%355 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %352 %354
+%356 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
+%357 = OpLoad %v4float %356
+%358 = OpCompositeExtract %float %357 2
+%359 = OpVectorTimesScalar %v4float %355 %358
+%360 = OpFAdd %v4float %350 %359
+OpStore %_7_output %360
+%361 = OpLoad %v2float %_8_coord
+%362 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%363 = OpLoad %v2float %362
+%364 = OpFAdd %v2float %361 %363
+OpStore %_8_coord %364
+%365 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %365
+%366 = OpLoad %v4float %_7_output
+%367 = OpLoad %v4float %outputColor_Stage0
+OpStore %368 %367
+%369 = OpLoad %v2float %_9_coordSampled
+OpStore %370 %369
+%371 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %368 %370
+%372 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_3
+%373 = OpLoad %v4float %372
+%374 = OpCompositeExtract %float %373 3
+%375 = OpVectorTimesScalar %v4float %371 %374
+%376 = OpFAdd %v4float %366 %375
+OpStore %_7_output %376
+%377 = OpLoad %v2float %_8_coord
+%378 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%379 = OpLoad %v2float %378
+%380 = OpFAdd %v2float %377 %379
+OpStore %_8_coord %380
+%381 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %381
+%382 = OpLoad %v4float %_7_output
+%383 = OpLoad %v4float %outputColor_Stage0
+OpStore %384 %383
+%385 = OpLoad %v2float %_9_coordSampled
+OpStore %386 %385
+%387 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %384 %386
+%388 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
+%389 = OpLoad %v4float %388
+%390 = OpCompositeExtract %float %389 0
+%391 = OpVectorTimesScalar %v4float %387 %390
+%392 = OpFAdd %v4float %382 %391
+OpStore %_7_output %392
+%393 = OpLoad %v2float %_8_coord
+%394 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%395 = OpLoad %v2float %394
+%396 = OpFAdd %v2float %393 %395
+OpStore %_8_coord %396
+%397 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %397
+%398 = OpLoad %v4float %_7_output
+%399 = OpLoad %v4float %outputColor_Stage0
+OpStore %400 %399
+%401 = OpLoad %v2float %_9_coordSampled
+OpStore %402 %401
+%403 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %400 %402
+%404 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
+%405 = OpLoad %v4float %404
+%406 = OpCompositeExtract %float %405 1
+%407 = OpVectorTimesScalar %v4float %403 %406
+%408 = OpFAdd %v4float %398 %407
+OpStore %_7_output %408
+%409 = OpLoad %v2float %_8_coord
+%410 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%411 = OpLoad %v2float %410
+%412 = OpFAdd %v2float %409 %411
+OpStore %_8_coord %412
+%413 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %413
+%414 = OpLoad %v4float %_7_output
+%415 = OpLoad %v4float %outputColor_Stage0
+OpStore %416 %415
+%417 = OpLoad %v2float %_9_coordSampled
+OpStore %418 %417
+%419 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %416 %418
+%420 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
+%421 = OpLoad %v4float %420
+%422 = OpCompositeExtract %float %421 2
+%423 = OpVectorTimesScalar %v4float %419 %422
+%424 = OpFAdd %v4float %414 %423
+OpStore %_7_output %424
+%425 = OpLoad %v2float %_8_coord
+%426 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%427 = OpLoad %v2float %426
+%428 = OpFAdd %v2float %425 %427
+OpStore %_8_coord %428
+%429 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %429
+%430 = OpLoad %v4float %_7_output
+%431 = OpLoad %v4float %outputColor_Stage0
+OpStore %432 %431
+%433 = OpLoad %v2float %_9_coordSampled
+OpStore %434 %433
+%435 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %432 %434
+%436 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_4
+%437 = OpLoad %v4float %436
+%438 = OpCompositeExtract %float %437 3
+%439 = OpVectorTimesScalar %v4float %435 %438
+%440 = OpFAdd %v4float %430 %439
+OpStore %_7_output %440
+%441 = OpLoad %v2float %_8_coord
+%442 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%443 = OpLoad %v2float %442
+%444 = OpFAdd %v2float %441 %443
+OpStore %_8_coord %444
+%445 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %445
+%446 = OpLoad %v4float %_7_output
+%447 = OpLoad %v4float %outputColor_Stage0
+OpStore %448 %447
+%449 = OpLoad %v2float %_9_coordSampled
+OpStore %450 %449
+%451 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %448 %450
+%452 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
+%453 = OpLoad %v4float %452
+%454 = OpCompositeExtract %float %453 0
+%455 = OpVectorTimesScalar %v4float %451 %454
+%456 = OpFAdd %v4float %446 %455
+OpStore %_7_output %456
+%457 = OpLoad %v2float %_8_coord
+%458 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%459 = OpLoad %v2float %458
+%460 = OpFAdd %v2float %457 %459
+OpStore %_8_coord %460
+%461 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %461
+%462 = OpLoad %v4float %_7_output
+%463 = OpLoad %v4float %outputColor_Stage0
+OpStore %464 %463
+%465 = OpLoad %v2float %_9_coordSampled
+OpStore %466 %465
+%467 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %464 %466
+%468 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
+%469 = OpLoad %v4float %468
+%470 = OpCompositeExtract %float %469 1
+%471 = OpVectorTimesScalar %v4float %467 %470
+%472 = OpFAdd %v4float %462 %471
+OpStore %_7_output %472
+%473 = OpLoad %v2float %_8_coord
+%474 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%475 = OpLoad %v2float %474
+%476 = OpFAdd %v2float %473 %475
+OpStore %_8_coord %476
+%477 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %477
+%478 = OpLoad %v4float %_7_output
+%479 = OpLoad %v4float %outputColor_Stage0
+OpStore %480 %479
+%481 = OpLoad %v2float %_9_coordSampled
+OpStore %482 %481
+%483 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %480 %482
+%484 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
+%485 = OpLoad %v4float %484
+%486 = OpCompositeExtract %float %485 2
+%487 = OpVectorTimesScalar %v4float %483 %486
+%488 = OpFAdd %v4float %478 %487
+OpStore %_7_output %488
+%489 = OpLoad %v2float %_8_coord
+%490 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%491 = OpLoad %v2float %490
+%492 = OpFAdd %v2float %489 %491
+OpStore %_8_coord %492
+%493 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %493
+%494 = OpLoad %v4float %_7_output
+%495 = OpLoad %v4float %outputColor_Stage0
+OpStore %496 %495
+%497 = OpLoad %v2float %_9_coordSampled
+OpStore %498 %497
+%499 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %496 %498
+%500 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_5
+%501 = OpLoad %v4float %500
+%502 = OpCompositeExtract %float %501 3
+%503 = OpVectorTimesScalar %v4float %499 %502
+%504 = OpFAdd %v4float %494 %503
+OpStore %_7_output %504
+%505 = OpLoad %v2float %_8_coord
+%506 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%507 = OpLoad %v2float %506
+%508 = OpFAdd %v2float %505 %507
+OpStore %_8_coord %508
+%509 = OpLoad %v2float %_8_coord
+OpStore %_9_coordSampled %509
+%510 = OpLoad %v4float %_7_output
+%511 = OpLoad %v4float %outputColor_Stage0
+OpStore %512 %511
+%513 = OpLoad %v2float %_9_coordSampled
+OpStore %514 %513
+%515 = OpFunctionCall %v4float %MatrixEffect_Stage1_c0_c0 %512 %514
+%516 = OpAccessChain %_ptr_Uniform_v4float %4 %int_2 %int_6
+%517 = OpLoad %v4float %516
+%518 = OpCompositeExtract %float %517 0
+%519 = OpVectorTimesScalar %v4float %515 %518
+%520 = OpFAdd %v4float %510 %519
+OpStore %_7_output %520
+%521 = OpLoad %v2float %_8_coord
+%522 = OpAccessChain %_ptr_Uniform_v2float %4 %int_1
+%523 = OpLoad %v2float %522
+%524 = OpFAdd %v2float %521 %523
+OpStore %_8_coord %524
+%525 = OpLoad %v4float %_7_output
+%526 = OpLoad %v4float %outputColor_Stage0
+%527 = OpFMul %v4float %525 %526
+OpStore %_7_output %527
+%528 = OpLoad %v4float %_7_output
+OpStore %output_Stage1 %528
+%529 = OpLoad %v4float %output_Stage1
+%530 = OpLoad %v4float %outputCoverage_Stage0
+%531 = OpFMul %v4float %529 %530
+OpStore %sk_FragColor %531
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/GaussianBlur.glsl b/tests/sksl/shared/GaussianBlur.glsl
index ffb0776..2285d1f 100644
--- a/tests/sksl/shared/GaussianBlur.glsl
+++ b/tests/sksl/shared/GaussianBlur.glsl
@@ -12,106 +12,115 @@
 };
 layout (location = 0) in vec2 vLocalCoord_Stage0;
 vec4 MatrixEffect_Stage1_c0_c0(vec4 _input, vec2 _coords) {
+    vec4 _output;
     vec2 _0_coords = (umatrix_Stage1_c0_c0 * vec3(_coords, 1.0)).xy;
-    vec2 _1_inCoord = _0_coords;
-    _1_inCoord *= unorm_Stage1_c0_c0_c0.xy;
-    vec2 _2_subsetCoord;
-    _2_subsetCoord.x = _1_inCoord.x;
-    _2_subsetCoord.y = _1_inCoord.y;
-    vec2 _3_clampedCoord;
-    _3_clampedCoord = _2_subsetCoord;
-    vec4 _4_textureColor = texture(uTextureSampler_0_Stage1, _3_clampedCoord * unorm_Stage1_c0_c0_c0.zw);
-    float _5_snappedX = floor(_1_inCoord.x + 0.0010000000474974513) + 0.5;
-    if (_5_snappedX < usubset_Stage1_c0_c0_c0.x || _5_snappedX > usubset_Stage1_c0_c0_c0.z) {
-        _4_textureColor = uborder_Stage1_c0_c0_c0;
+    vec4 _1_output;
+    vec2 _2_inCoord = _0_coords;
+    _2_inCoord *= unorm_Stage1_c0_c0_c0.xy;
+    vec2 _3_subsetCoord;
+    _3_subsetCoord.x = _2_inCoord.x;
+    _3_subsetCoord.y = _2_inCoord.y;
+    vec2 _4_clampedCoord;
+    _4_clampedCoord = _3_subsetCoord;
+    vec4 _5_textureColor = texture(uTextureSampler_0_Stage1, _4_clampedCoord * unorm_Stage1_c0_c0_c0.zw);
+    float _6_snappedX = floor(_2_inCoord.x + 0.0010000000474974513) + 0.5;
+    if (_6_snappedX < usubset_Stage1_c0_c0_c0.x || _6_snappedX > usubset_Stage1_c0_c0_c0.z) {
+        _5_textureColor = uborder_Stage1_c0_c0_c0;
     }
-    return _4_textureColor;
+    return _5_textureColor;
 
 }
 void main() {
+    vec4 outputColor_Stage0;
+    vec4 outputCoverage_Stage0;
+    {
+        outputColor_Stage0 = vec4(1.0);
+        outputCoverage_Stage0 = vec4(1.0);
+    }
     vec4 output_Stage1;
-    vec4 _6_output;
-    _6_output = vec4(0.0, 0.0, 0.0, 0.0);
-    vec2 _7_coord = vLocalCoord_Stage0 - 12.0 * uIncrement_Stage1_c0;
-    vec2 _8_coordSampled = vec2(0.0, 0.0);
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[0].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[0].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[0].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[0].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[1].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[1].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[1].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[1].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[2].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[2].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[2].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[2].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[3].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[3].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[3].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[3].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[4].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[4].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[4].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[4].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[5].x;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[5].y;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[5].z;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[5].w;
-    _7_coord += uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(vec4(1.0), _8_coordSampled) * uKernel_Stage1_c0[6].x;
-    _7_coord += uIncrement_Stage1_c0;
-    output_Stage1 = _6_output;
+    vec4 _7_output;
+    _7_output = vec4(0.0, 0.0, 0.0, 0.0);
+    vec2 _8_coord = vLocalCoord_Stage0 - 12.0 * uIncrement_Stage1_c0;
+    vec2 _9_coordSampled = vec2(0.0, 0.0);
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[0].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[0].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[0].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[0].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[1].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[1].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[1].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[1].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[2].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[2].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[2].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[2].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[3].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[3].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[3].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[3].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[4].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[4].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[4].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[4].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[5].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[5].y;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[5].z;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[5].w;
+    _8_coord += uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(outputColor_Stage0, _9_coordSampled) * uKernel_Stage1_c0[6].x;
+    _8_coord += uIncrement_Stage1_c0;
+    _7_output *= outputColor_Stage0;
+    output_Stage1 = _7_output;
 
     {
-        sk_FragColor = output_Stage1;
+        sk_FragColor = output_Stage1 * outputCoverage_Stage0;
     }
 }
diff --git a/tests/sksl/shared/GaussianBlur.metal b/tests/sksl/shared/GaussianBlur.metal
index e21b1c2..8ca3ecd 100644
--- a/tests/sksl/shared/GaussianBlur.metal
+++ b/tests/sksl/shared/GaussianBlur.metal
@@ -25,20 +25,22 @@
 
 
 float4 MatrixEffect_Stage1_c0_c0(thread Globals& _globals, float4 _input, float2 _coords) {
+    float4 _output;
     float2 _0_coords = (_globals._anonInterface0->umatrix_Stage1_c0_c0 * float3(_coords, 1.0)).xy;
-    float2 _1_inCoord = _0_coords;
-    _1_inCoord *= _globals._anonInterface0->unorm_Stage1_c0_c0_c0.xy;
-    float2 _2_subsetCoord;
-    _2_subsetCoord.x = _1_inCoord.x;
-    _2_subsetCoord.y = _1_inCoord.y;
-    float2 _3_clampedCoord;
-    _3_clampedCoord = _2_subsetCoord;
-    float4 _4_textureColor = _globals.uTextureSampler_0_Stage1.sample(_globals.uTextureSampler_0_Stage1Smplr, _3_clampedCoord * _globals._anonInterface0->unorm_Stage1_c0_c0_c0.zw);
-    float _5_snappedX = floor(_1_inCoord.x + 0.0010000000474974513) + 0.5;
-    if (_5_snappedX < _globals._anonInterface0->usubset_Stage1_c0_c0_c0.x || _5_snappedX > _globals._anonInterface0->usubset_Stage1_c0_c0_c0.z) {
-        _4_textureColor = _globals._anonInterface0->uborder_Stage1_c0_c0_c0;
+    float4 _1_output;
+    float2 _2_inCoord = _0_coords;
+    _2_inCoord *= _globals._anonInterface0->unorm_Stage1_c0_c0_c0.xy;
+    float2 _3_subsetCoord;
+    _3_subsetCoord.x = _2_inCoord.x;
+    _3_subsetCoord.y = _2_inCoord.y;
+    float2 _4_clampedCoord;
+    _4_clampedCoord = _3_subsetCoord;
+    float4 _5_textureColor = _globals.uTextureSampler_0_Stage1.sample(_globals.uTextureSampler_0_Stage1Smplr, _4_clampedCoord * _globals._anonInterface0->unorm_Stage1_c0_c0_c0.zw);
+    float _6_snappedX = floor(_2_inCoord.x + 0.0010000000474974513) + 0.5;
+    if (_6_snappedX < _globals._anonInterface0->usubset_Stage1_c0_c0_c0.x || _6_snappedX > _globals._anonInterface0->usubset_Stage1_c0_c0_c0.z) {
+        _5_textureColor = _globals._anonInterface0->uborder_Stage1_c0_c0_c0;
     }
-    return _4_textureColor;
+    return _5_textureColor;
 
 }
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], texture2d<float> uTextureSampler_0_Stage1[[texture(0)]], sampler uTextureSampler_0_Stage1Smplr[[sampler(0)]], constant uniformBuffer& _anonInterface0 [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
@@ -46,90 +48,97 @@
     (void)_globals;
     Outputs _out;
     (void)_out;
+    float4 outputColor_Stage0;
+    float4 outputCoverage_Stage0;
+    {
+        outputColor_Stage0 = float4(1.0);
+        outputCoverage_Stage0 = float4(1.0);
+    }
     float4 output_Stage1;
-    float4 _6_output;
-    _6_output = float4(0.0, 0.0, 0.0, 0.0);
-    float2 _7_coord = _in.vLocalCoord_Stage0 - 12.0 * _globals._anonInterface0->uIncrement_Stage1_c0;
-    float2 _8_coordSampled = float2(0.0, 0.0);
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].y;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].z;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].w;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    _8_coordSampled = _7_coord;
-    _6_output += MatrixEffect_Stage1_c0_c0(_globals, float4(1.0), _8_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[6].x;
-    _7_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
-    output_Stage1 = _6_output;
+    float4 _7_output;
+    _7_output = float4(0.0, 0.0, 0.0, 0.0);
+    float2 _8_coord = _in.vLocalCoord_Stage0 - 12.0 * _globals._anonInterface0->uIncrement_Stage1_c0;
+    float2 _9_coordSampled = float2(0.0, 0.0);
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[0].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[1].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[2].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[3].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[4].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].y;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].z;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[5].w;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _9_coordSampled = _8_coord;
+    _7_output += MatrixEffect_Stage1_c0_c0(_globals, outputColor_Stage0, _9_coordSampled) * _globals._anonInterface0->uKernel_Stage1_c0[6].x;
+    _8_coord += _globals._anonInterface0->uIncrement_Stage1_c0;
+    _7_output *= outputColor_Stage0;
+    output_Stage1 = _7_output;
 
     {
-        _out.sk_FragColor = output_Stage1;
+        _out.sk_FragColor = output_Stage1 * outputCoverage_Stage0;
     }
     return _out;
 }
diff --git a/tests/sksl/shared/GeometricIntrinsics.asm.frag b/tests/sksl/shared/GeometricIntrinsics.asm.frag
index f0526d3..4c14e79 100644
--- a/tests/sksl/shared/GeometricIntrinsics.asm.frag
+++ b/tests/sksl/shared/GeometricIntrinsics.asm.frag
@@ -10,7 +10,9 @@
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
 OpName %_0_x "_0_x"
+OpName %x "x"
 OpName %_1_x "_1_x"
+OpName %y "y"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -21,7 +23,7 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %52 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -40,10 +42,10 @@
 %float_2 = OpConstant %float 2
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
-%34 = OpConstantComposite %v2float %float_1 %float_2
+%37 = OpConstantComposite %v2float %float_1 %float_2
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
-%41 = OpConstantComposite %v2float %float_3 %float_4
+%45 = OpConstantComposite %v2float %float_3 %float_4
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
@@ -56,35 +58,43 @@
 %main = OpFunction %v4float None %18
 %19 = OpLabel
 %_0_x = OpVariable %_ptr_Function_float Function
+%x = OpVariable %_ptr_Function_float Function
 %_1_x = OpVariable %_ptr_Function_v2float Function
+%y = OpVariable %_ptr_Function_v2float Function
 OpStore %_0_x %float_1
-%23 = OpExtInst %float %1 Length %float_1
+%24 = OpLoad %float %_0_x
+%23 = OpExtInst %float %1 Length %24
 OpStore %_0_x %23
-%25 = OpLoad %float %_0_x
-%24 = OpExtInst %float %1 Distance %25 %float_2
-OpStore %_0_x %24
-%28 = OpLoad %float %_0_x
-%27 = OpFMul %float %28 %float_2
-OpStore %_0_x %27
-%30 = OpLoad %float %_0_x
-%29 = OpExtInst %float %1 Normalize %30
-OpStore %_0_x %29
-OpStore %_1_x %34
-%35 = OpExtInst %float %1 Length %34
-%36 = OpCompositeConstruct %v2float %35 %35
-OpStore %_1_x %36
-%38 = OpLoad %v2float %_1_x
-%37 = OpExtInst %float %1 Distance %38 %41
-%42 = OpCompositeConstruct %v2float %37 %37
-OpStore %_1_x %42
-%44 = OpLoad %v2float %_1_x
-%43 = OpDot %float %44 %41
-%45 = OpCompositeConstruct %v2float %43 %43
-OpStore %_1_x %45
-%47 = OpLoad %v2float %_1_x
-%46 = OpExtInst %v2float %1 Normalize %47
+%26 = OpLoad %float %_0_x
+%25 = OpExtInst %float %1 Distance %26 %float_2
+OpStore %_0_x %25
+%29 = OpLoad %float %_0_x
+%28 = OpFMul %float %29 %float_2
+OpStore %_0_x %28
+%31 = OpLoad %float %_0_x
+%30 = OpExtInst %float %1 Normalize %31
+OpStore %_0_x %30
+%33 = OpLoad %float %_0_x
+OpStore %x %33
+OpStore %_1_x %37
+%39 = OpLoad %v2float %_1_x
+%38 = OpExtInst %float %1 Length %39
+%40 = OpCompositeConstruct %v2float %38 %38
+OpStore %_1_x %40
+%42 = OpLoad %v2float %_1_x
+%41 = OpExtInst %float %1 Distance %42 %45
+%46 = OpCompositeConstruct %v2float %41 %41
 OpStore %_1_x %46
-%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%52 = OpLoad %v4float %48
-OpReturnValue %52
+%48 = OpLoad %v2float %_1_x
+%47 = OpDot %float %48 %45
+%49 = OpCompositeConstruct %v2float %47 %47
+OpStore %_1_x %49
+%51 = OpLoad %v2float %_1_x
+%50 = OpExtInst %v2float %1 Normalize %51
+OpStore %_1_x %50
+%53 = OpLoad %v2float %_1_x
+OpStore %y %53
+%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%58 = OpLoad %v4float %54
+OpReturnValue %58
 OpFunctionEnd
diff --git a/tests/sksl/shared/GeometricIntrinsics.glsl b/tests/sksl/shared/GeometricIntrinsics.glsl
index 2eb4046..180833a 100644
--- a/tests/sksl/shared/GeometricIntrinsics.glsl
+++ b/tests/sksl/shared/GeometricIntrinsics.glsl
@@ -3,16 +3,18 @@
 uniform vec4 colorGreen;
 vec4 main() {
     float _0_x = 1.0;
-    _0_x = length(1.0);
+    _0_x = length(_0_x);
     _0_x = distance(_0_x, 2.0);
     _0_x = dot(_0_x, 2.0);
     _0_x = normalize(_0_x);
+    float x = _0_x;
 
     vec2 _1_x = vec2(1.0, 2.0);
-    _1_x = vec2(length(vec2(1.0, 2.0)));
+    _1_x = vec2(length(_1_x));
     _1_x = vec2(distance(_1_x, vec2(3.0, 4.0)));
     _1_x = vec2(dot(_1_x, vec2(3.0, 4.0)));
     _1_x = normalize(_1_x);
+    vec2 y = _1_x;
 
     return colorGreen;
 }
diff --git a/tests/sksl/shared/GeometricIntrinsics.metal b/tests/sksl/shared/GeometricIntrinsics.metal
index 4fc2a0e..fe486cf 100644
--- a/tests/sksl/shared/GeometricIntrinsics.metal
+++ b/tests/sksl/shared/GeometricIntrinsics.metal
@@ -14,16 +14,18 @@
     Outputs _out;
     (void)_out;
     float _0_x = 1.0;
-    _0_x = abs(1.0);
+    _0_x = abs(_0_x);
     _0_x = abs(_0_x - 2.0);
     _0_x = (_0_x * 2.0);
     _0_x = sign(_0_x);
+    float x = _0_x;
 
     float2 _1_x = float2(1.0, 2.0);
-    _1_x = float2(length(float2(1.0, 2.0)));
+    _1_x = float2(length(_1_x));
     _1_x = float2(distance(_1_x, float2(3.0, 4.0)));
     _1_x = float2(dot(_1_x, float2(3.0, 4.0)));
     _1_x = normalize(_1_x);
+    float2 y = _1_x;
 
     _out.sk_FragColor = _uniforms.colorGreen;
     return _out;
diff --git a/tests/sksl/shared/GeometryNoGSInvocations.asm.geom b/tests/sksl/shared/GeometryNoGSInvocations.asm.geom
index 38f8287..9784c7c 100644
--- a/tests/sksl/shared/GeometryNoGSInvocations.asm.geom
+++ b/tests/sksl/shared/GeometryNoGSInvocations.asm.geom
@@ -36,6 +36,7 @@
 %float_0 = OpConstant %float 0
 %_ptr_Output_v4float = OpTypePointer Output %v4float
 %float_n0_5 = OpConstant %float -0.5
+%false = OpConstantFalse %bool
 %main = OpFunction %void None %16
 %17 = OpLabel
 OpStore %sk_InvocationID %int_0
@@ -69,9 +70,9 @@
 OpEndPrimitive
 OpBranch %22
 %22 = OpLabel
-%50 = OpLoad %int %sk_InvocationID
-%51 = OpIAdd %int %50 %int_1
-OpStore %sk_InvocationID %51
+%51 = OpLoad %int %sk_InvocationID
+%52 = OpIAdd %int %51 %int_1
+OpStore %sk_InvocationID %52
 OpBranch %19
 %23 = OpLabel
 OpReturn
diff --git a/tests/sksl/shared/GeometryNoGSInvocations.glsl b/tests/sksl/shared/GeometryNoGSInvocations.glsl
index 08d9d4f..d5eccfc 100644
--- a/tests/sksl/shared/GeometryNoGSInvocations.glsl
+++ b/tests/sksl/shared/GeometryNoGSInvocations.glsl
@@ -9,6 +9,7 @@
 
         gl_Position = gl_in[0].gl_Position + vec4(-0.5, 0.0, 0.0, float(sk_InvocationID));
         EmitVertex();
+        false;
 
         EndPrimitive();
     }
diff --git a/tests/sksl/shared/GeometryNoGSInvocationsReorder.asm.geom b/tests/sksl/shared/GeometryNoGSInvocationsReorder.asm.geom
index 5cec76d..007ed4d 100644
--- a/tests/sksl/shared/GeometryNoGSInvocationsReorder.asm.geom
+++ b/tests/sksl/shared/GeometryNoGSInvocationsReorder.asm.geom
@@ -36,6 +36,7 @@
 %float_0 = OpConstant %float 0
 %_ptr_Output_v4float = OpTypePointer Output %v4float
 %float_n0_5 = OpConstant %float -0.5
+%false = OpConstantFalse %bool
 %main = OpFunction %void None %16
 %17 = OpLabel
 OpStore %sk_InvocationID %int_0
@@ -69,9 +70,9 @@
 OpEndPrimitive
 OpBranch %22
 %22 = OpLabel
-%50 = OpLoad %int %sk_InvocationID
-%51 = OpIAdd %int %50 %int_1
-OpStore %sk_InvocationID %51
+%51 = OpLoad %int %sk_InvocationID
+%52 = OpIAdd %int %51 %int_1
+OpStore %sk_InvocationID %52
 OpBranch %19
 %23 = OpLabel
 OpReturn
diff --git a/tests/sksl/shared/GeometryNoGSInvocationsReorder.glsl b/tests/sksl/shared/GeometryNoGSInvocationsReorder.glsl
index 176a02c..79e2a44 100644
--- a/tests/sksl/shared/GeometryNoGSInvocationsReorder.glsl
+++ b/tests/sksl/shared/GeometryNoGSInvocationsReorder.glsl
@@ -9,6 +9,7 @@
 
         gl_Position = gl_in[0].gl_Position + vec4(-0.5, 0.0, 0.0, float(sk_InvocationID));
         EmitVertex();
+        false;
 
         EndPrimitive();
     }
diff --git a/tests/sksl/shared/Matrices.asm.frag b/tests/sksl/shared/Matrices.asm.frag
index 4be40ac..332b33b 100644
--- a/tests/sksl/shared/Matrices.asm.frag
+++ b/tests/sksl/shared/Matrices.asm.frag
@@ -9,15 +9,32 @@
 OpMemberName %_UniformBuffer 0 "colorGreen"
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
+OpName %test_half "test_half"
+OpName %v1 "v1"
+OpName %v2 "v2"
+OpName %m1 "m1"
+OpName %m2 "m2"
+OpName %m3 "m3"
+OpName %m4 "m4"
+OpName %m5 "m5"
+OpName %m6 "m6"
+OpName %m7 "m7"
+OpName %m9 "m9"
+OpName %m10 "m10"
+OpName %m11 "m11"
 OpName %main "main"
-OpName %_0_m3 "_0_m3"
-OpName %_1_m5 "_1_m5"
-OpName %_2_m6 "_2_m6"
-OpName %_3_m11 "_3_m11"
+OpName %_0_v1 "_0_v1"
+OpName %_1_v2 "_1_v2"
+OpName %_2_m1 "_2_m1"
+OpName %_3_m2 "_3_m2"
 OpName %_4_m3 "_4_m3"
-OpName %_5_m5 "_5_m5"
-OpName %_6_m6 "_6_m6"
-OpName %_7_m11 "_7_m11"
+OpName %_5_m4 "_5_m4"
+OpName %_6_m5 "_6_m5"
+OpName %_7_m6 "_7_m6"
+OpName %_8_m7 "_8_m7"
+OpName %_9_m9 "_9_m9"
+OpName %_10_m10 "_10_m10"
+OpName %_11_m11 "_11_m11"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -28,43 +45,64 @@
 OpMemberDecorate %_UniformBuffer 1 Offset 16
 OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
 OpDecorate %_UniformBuffer Block
-OpDecorate %10 Binding 0
-OpDecorate %10 DescriptorSet 0
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
+OpDecorate %11 Binding 0
+OpDecorate %11 DescriptorSet 0
+OpDecorate %27 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %25 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %37 RelaxedPrecision
+OpDecorate %38 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %47 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
+OpDecorate %62 RelaxedPrecision
+OpDecorate %63 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
+OpDecorate %64 RelaxedPrecision
+OpDecorate %65 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %78 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %96 RelaxedPrecision
-OpDecorate %103 RelaxedPrecision
-OpDecorate %104 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
 OpDecorate %102 RelaxedPrecision
-OpDecorate %106 RelaxedPrecision
+OpDecorate %103 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %100 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
 OpDecorate %109 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %113 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
 OpDecorate %114 RelaxedPrecision
-OpDecorate %112 RelaxedPrecision
 OpDecorate %115 RelaxedPrecision
 OpDecorate %116 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %127 RelaxedPrecision
-OpDecorate %128 RelaxedPrecision
-OpDecorate %129 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
-OpDecorate %125 RelaxedPrecision
-OpDecorate %130 RelaxedPrecision
-OpDecorate %132 RelaxedPrecision
-OpDecorate %133 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
+OpDecorate %119 RelaxedPrecision
+OpDecorate %237 RelaxedPrecision
+OpDecorate %240 RelaxedPrecision
+OpDecorate %241 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -74,165 +112,280 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %_UniformBuffer = OpTypeStruct %v4float %v4float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
-%10 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%11 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%15 = OpTypeFunction %void
-%18 = OpTypeFunction %v4float
+%16 = OpTypeFunction %void
+%19 = OpTypeFunction %bool
+%v3float = OpTypeVector %float 3
+%_ptr_Function_v3float = OpTypePointer Function %v3float
+%float_1 = OpConstant %float 1
+%float_0 = OpConstant %float 0
+%mat3v3float = OpTypeMatrix %v3float 3
+%float_2 = OpConstant %float 2
+%32 = OpConstantComposite %v3float %float_2 %float_2 %float_2
 %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
-%float_1 = OpConstant %float 1
-%float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
-%float_0 = OpConstant %float 0
+%50 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %_ptr_Function_v2float = OpTypePointer Function %v2float
+%float_5 = OpConstant %float 5
+%float_6 = OpConstant %float 6
+%float_7 = OpConstant %float 7
+%float_8 = OpConstant %float 8
+%_ptr_Function_mat3v3float = OpTypePointer Function %mat3v3float
 %mat4v4float = OpTypeMatrix %v4float 4
 %_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
+%true = OpConstantTrue %bool
+%134 = OpTypeFunction %v4float
+%false = OpConstantFalse %bool
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%_entrypoint = OpFunction %void None %15
-%16 = OpLabel
-%17 = OpFunctionCall %v4float %main
-OpStore %sk_FragColor %17
+%int_1 = OpConstant %int 1
+%_entrypoint = OpFunction %void None %16
+%17 = OpLabel
+%18 = OpFunctionCall %v4float %main
+OpStore %sk_FragColor %18
 OpReturn
 OpFunctionEnd
-%main = OpFunction %v4float None %18
-%19 = OpLabel
-%_0_m3 = OpVariable %_ptr_Function_mat2v2float Function
-%_1_m5 = OpVariable %_ptr_Function_mat2v2float Function
-%38 = OpVariable %_ptr_Function_mat2v2float Function
-%_2_m6 = OpVariable %_ptr_Function_mat2v2float Function
-%_3_m11 = OpVariable %_ptr_Function_mat4v4float Function
+%test_half = OpFunction %bool None %19
+%20 = OpLabel
+%v1 = OpVariable %_ptr_Function_v3float Function
+%v2 = OpVariable %_ptr_Function_v3float Function
+%m1 = OpVariable %_ptr_Function_mat2v2float Function
+%m2 = OpVariable %_ptr_Function_mat2v2float Function
+%m3 = OpVariable %_ptr_Function_mat2v2float Function
+%m4 = OpVariable %_ptr_Function_mat2v2float Function
+%m5 = OpVariable %_ptr_Function_mat2v2float Function
+%m6 = OpVariable %_ptr_Function_mat2v2float Function
+%m7 = OpVariable %_ptr_Function_mat2v2float Function
+%m9 = OpVariable %_ptr_Function_mat3v3float Function
+%m10 = OpVariable %_ptr_Function_mat4v4float Function
+%m11 = OpVariable %_ptr_Function_mat4v4float Function
+%27 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%28 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%29 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%25 = OpCompositeConstruct %mat3v3float %27 %28 %29
+%33 = OpMatrixTimesVector %v3float %25 %32
+OpStore %v1 %33
+%36 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%37 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%38 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%35 = OpCompositeConstruct %mat3v3float %36 %37 %38
+%39 = OpVectorTimesMatrix %v3float %32 %35
+OpStore %v2 %39
+%47 = OpCompositeConstruct %v2float %float_1 %float_2
+%48 = OpCompositeConstruct %v2float %float_3 %float_4
+%46 = OpCompositeConstruct %mat2v2float %47 %48
+OpStore %m1 %46
+%52 = OpCompositeExtract %float %50 0
+%53 = OpCompositeExtract %float %50 1
+%54 = OpCompositeExtract %float %50 2
+%55 = OpCompositeExtract %float %50 3
+%56 = OpCompositeConstruct %v2float %52 %53
+%57 = OpCompositeConstruct %v2float %54 %55
+%51 = OpCompositeConstruct %mat2v2float %56 %57
+OpStore %m2 %51
+%59 = OpLoad %mat2v2float %m1
+OpStore %m3 %59
+%62 = OpCompositeConstruct %v2float %float_1 %float_0
+%63 = OpCompositeConstruct %v2float %float_0 %float_1
+%61 = OpCompositeConstruct %mat2v2float %62 %63
+OpStore %m4 %61
+%64 = OpLoad %mat2v2float %m3
+%65 = OpLoad %mat2v2float %m4
+%66 = OpMatrixTimesMatrix %mat2v2float %64 %65
+OpStore %m3 %66
+%70 = OpAccessChain %_ptr_Function_v2float %m1 %int_0
+%72 = OpLoad %v2float %70
+%73 = OpCompositeExtract %float %72 0
+%75 = OpCompositeConstruct %v2float %73 %float_0
+%76 = OpCompositeConstruct %v2float %float_0 %73
+%74 = OpCompositeConstruct %mat2v2float %75 %76
+OpStore %m5 %74
+%79 = OpCompositeConstruct %v2float %float_1 %float_2
+%80 = OpCompositeConstruct %v2float %float_3 %float_4
+%78 = OpCompositeConstruct %mat2v2float %79 %80
+OpStore %m6 %78
+%81 = OpLoad %mat2v2float %m6
+%82 = OpLoad %mat2v2float %m5
+%83 = OpCompositeExtract %v2float %81 0
+%84 = OpCompositeExtract %v2float %82 0
+%85 = OpFAdd %v2float %83 %84
+%86 = OpCompositeExtract %v2float %81 1
+%87 = OpCompositeExtract %v2float %82 1
+%88 = OpFAdd %v2float %86 %87
+%89 = OpCompositeConstruct %mat2v2float %85 %88
+OpStore %m6 %89
+%96 = OpCompositeConstruct %v2float %float_5 %float_6
+%97 = OpCompositeConstruct %v2float %float_7 %float_8
+%95 = OpCompositeConstruct %mat2v2float %96 %97
+OpStore %m7 %95
+%101 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%102 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%103 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%100 = OpCompositeConstruct %mat3v3float %101 %102 %103
+OpStore %m9 %100
+%108 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
+%109 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
+%110 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
+%111 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
+%107 = OpCompositeConstruct %mat4v4float %108 %109 %110 %111
+OpStore %m10 %107
+%114 = OpCompositeConstruct %v4float %float_2 %float_0 %float_0 %float_0
+%115 = OpCompositeConstruct %v4float %float_0 %float_2 %float_0 %float_0
+%116 = OpCompositeConstruct %v4float %float_0 %float_0 %float_2 %float_0
+%117 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_2
+%113 = OpCompositeConstruct %mat4v4float %114 %115 %116 %117
+OpStore %m11 %113
+%118 = OpLoad %mat4v4float %m11
+%119 = OpLoad %mat4v4float %m10
+%120 = OpCompositeExtract %v4float %118 0
+%121 = OpCompositeExtract %v4float %119 0
+%122 = OpFSub %v4float %120 %121
+%123 = OpCompositeExtract %v4float %118 1
+%124 = OpCompositeExtract %v4float %119 1
+%125 = OpFSub %v4float %123 %124
+%126 = OpCompositeExtract %v4float %118 2
+%127 = OpCompositeExtract %v4float %119 2
+%128 = OpFSub %v4float %126 %127
+%129 = OpCompositeExtract %v4float %118 3
+%130 = OpCompositeExtract %v4float %119 3
+%131 = OpFSub %v4float %129 %130
+%132 = OpCompositeConstruct %mat4v4float %122 %125 %128 %131
+OpStore %m11 %132
+OpReturnValue %true
+OpFunctionEnd
+%main = OpFunction %v4float None %134
+%135 = OpLabel
+%_0_v1 = OpVariable %_ptr_Function_v3float Function
+%_1_v2 = OpVariable %_ptr_Function_v3float Function
+%_2_m1 = OpVariable %_ptr_Function_mat2v2float Function
+%_3_m2 = OpVariable %_ptr_Function_mat2v2float Function
 %_4_m3 = OpVariable %_ptr_Function_mat2v2float Function
-%_5_m5 = OpVariable %_ptr_Function_mat2v2float Function
-%101 = OpVariable %_ptr_Function_mat2v2float Function
-%_6_m6 = OpVariable %_ptr_Function_mat2v2float Function
-%_7_m11 = OpVariable %_ptr_Function_mat4v4float Function
-%29 = OpCompositeConstruct %v2float %float_1 %float_2
-%30 = OpCompositeConstruct %v2float %float_3 %float_4
-%28 = OpCompositeConstruct %mat2v2float %29 %30
-OpStore %_0_m3 %28
-%31 = OpLoad %mat2v2float %_0_m3
-%34 = OpCompositeConstruct %v2float %float_1 %float_0
-%35 = OpCompositeConstruct %v2float %float_0 %float_1
-%32 = OpCompositeConstruct %mat2v2float %34 %35
-%36 = OpMatrixTimesMatrix %mat2v2float %31 %32
-OpStore %_0_m3 %36
-%40 = OpCompositeConstruct %v2float %float_1 %float_2
-%41 = OpCompositeConstruct %v2float %float_3 %float_4
-%39 = OpCompositeConstruct %mat2v2float %40 %41
-OpStore %38 %39
-%44 = OpAccessChain %_ptr_Function_v2float %38 %int_0
-%46 = OpLoad %v2float %44
-%47 = OpCompositeExtract %float %46 0
-%49 = OpCompositeConstruct %v2float %47 %float_0
-%50 = OpCompositeConstruct %v2float %float_0 %47
-%48 = OpCompositeConstruct %mat2v2float %49 %50
-OpStore %_1_m5 %48
-%53 = OpCompositeConstruct %v2float %float_1 %float_2
-%54 = OpCompositeConstruct %v2float %float_3 %float_4
-%52 = OpCompositeConstruct %mat2v2float %53 %54
-OpStore %_2_m6 %52
-%55 = OpLoad %mat2v2float %_2_m6
-%56 = OpLoad %mat2v2float %_1_m5
-%57 = OpCompositeExtract %v2float %55 0
-%58 = OpCompositeExtract %v2float %56 0
-%59 = OpFAdd %v2float %57 %58
-%60 = OpCompositeExtract %v2float %55 1
-%61 = OpCompositeExtract %v2float %56 1
-%62 = OpFAdd %v2float %60 %61
-%63 = OpCompositeConstruct %mat2v2float %59 %62
-OpStore %_2_m6 %63
-%68 = OpCompositeConstruct %v4float %float_2 %float_0 %float_0 %float_0
-%69 = OpCompositeConstruct %v4float %float_0 %float_2 %float_0 %float_0
-%70 = OpCompositeConstruct %v4float %float_0 %float_0 %float_2 %float_0
-%71 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_2
-%67 = OpCompositeConstruct %mat4v4float %68 %69 %70 %71
-OpStore %_3_m11 %67
-%72 = OpLoad %mat4v4float %_3_m11
-%74 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
-%75 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
-%76 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
-%77 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
-%73 = OpCompositeConstruct %mat4v4float %74 %75 %76 %77
-%78 = OpCompositeExtract %v4float %72 0
-%79 = OpCompositeExtract %v4float %73 0
-%80 = OpFSub %v4float %78 %79
-%81 = OpCompositeExtract %v4float %72 1
-%82 = OpCompositeExtract %v4float %73 1
-%83 = OpFSub %v4float %81 %82
-%84 = OpCompositeExtract %v4float %72 2
-%85 = OpCompositeExtract %v4float %73 2
-%86 = OpFSub %v4float %84 %85
-%87 = OpCompositeExtract %v4float %72 3
-%88 = OpCompositeExtract %v4float %73 3
-%89 = OpFSub %v4float %87 %88
-%90 = OpCompositeConstruct %mat4v4float %80 %83 %86 %89
-OpStore %_3_m11 %90
-%93 = OpCompositeConstruct %v2float %float_1 %float_2
-%94 = OpCompositeConstruct %v2float %float_3 %float_4
-%92 = OpCompositeConstruct %mat2v2float %93 %94
-OpStore %_4_m3 %92
-%95 = OpLoad %mat2v2float %_4_m3
-%97 = OpCompositeConstruct %v2float %float_1 %float_0
-%98 = OpCompositeConstruct %v2float %float_0 %float_1
-%96 = OpCompositeConstruct %mat2v2float %97 %98
-%99 = OpMatrixTimesMatrix %mat2v2float %95 %96
-OpStore %_4_m3 %99
-%103 = OpCompositeConstruct %v2float %float_1 %float_2
-%104 = OpCompositeConstruct %v2float %float_3 %float_4
-%102 = OpCompositeConstruct %mat2v2float %103 %104
-OpStore %101 %102
-%105 = OpAccessChain %_ptr_Function_v2float %101 %int_0
-%106 = OpLoad %v2float %105
-%107 = OpCompositeExtract %float %106 0
-%109 = OpCompositeConstruct %v2float %107 %float_0
-%110 = OpCompositeConstruct %v2float %float_0 %107
-%108 = OpCompositeConstruct %mat2v2float %109 %110
-OpStore %_5_m5 %108
-%113 = OpCompositeConstruct %v2float %float_1 %float_2
-%114 = OpCompositeConstruct %v2float %float_3 %float_4
-%112 = OpCompositeConstruct %mat2v2float %113 %114
-OpStore %_6_m6 %112
-%115 = OpLoad %mat2v2float %_6_m6
-%116 = OpLoad %mat2v2float %_5_m5
-%117 = OpCompositeExtract %v2float %115 0
-%118 = OpCompositeExtract %v2float %116 0
-%119 = OpFAdd %v2float %117 %118
-%120 = OpCompositeExtract %v2float %115 1
-%121 = OpCompositeExtract %v2float %116 1
-%122 = OpFAdd %v2float %120 %121
-%123 = OpCompositeConstruct %mat2v2float %119 %122
-OpStore %_6_m6 %123
-%126 = OpCompositeConstruct %v4float %float_2 %float_0 %float_0 %float_0
-%127 = OpCompositeConstruct %v4float %float_0 %float_2 %float_0 %float_0
-%128 = OpCompositeConstruct %v4float %float_0 %float_0 %float_2 %float_0
-%129 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_2
-%125 = OpCompositeConstruct %mat4v4float %126 %127 %128 %129
-OpStore %_7_m11 %125
-%130 = OpLoad %mat4v4float %_7_m11
-%132 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
-%133 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
-%134 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
-%135 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
-%131 = OpCompositeConstruct %mat4v4float %132 %133 %134 %135
-%136 = OpCompositeExtract %v4float %130 0
-%137 = OpCompositeExtract %v4float %131 0
-%138 = OpFSub %v4float %136 %137
-%139 = OpCompositeExtract %v4float %130 1
-%140 = OpCompositeExtract %v4float %131 1
-%141 = OpFSub %v4float %139 %140
-%142 = OpCompositeExtract %v4float %130 2
-%143 = OpCompositeExtract %v4float %131 2
-%144 = OpFSub %v4float %142 %143
-%145 = OpCompositeExtract %v4float %130 3
-%146 = OpCompositeExtract %v4float %131 3
-%147 = OpFSub %v4float %145 %146
-%148 = OpCompositeConstruct %mat4v4float %138 %141 %144 %147
-OpStore %_7_m11 %148
-%149 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%151 = OpLoad %v4float %149
-OpReturnValue %151
+%_5_m4 = OpVariable %_ptr_Function_mat2v2float Function
+%_6_m5 = OpVariable %_ptr_Function_mat2v2float Function
+%_7_m6 = OpVariable %_ptr_Function_mat2v2float Function
+%_8_m7 = OpVariable %_ptr_Function_mat2v2float Function
+%_9_m9 = OpVariable %_ptr_Function_mat3v3float Function
+%_10_m10 = OpVariable %_ptr_Function_mat4v4float Function
+%_11_m11 = OpVariable %_ptr_Function_mat4v4float Function
+%230 = OpVariable %_ptr_Function_v4float Function
+%138 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%139 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%140 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%137 = OpCompositeConstruct %mat3v3float %138 %139 %140
+%141 = OpMatrixTimesVector %v3float %137 %32
+OpStore %_0_v1 %141
+%144 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%145 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%146 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%143 = OpCompositeConstruct %mat3v3float %144 %145 %146
+%147 = OpVectorTimesMatrix %v3float %32 %143
+OpStore %_1_v2 %147
+%150 = OpCompositeConstruct %v2float %float_1 %float_2
+%151 = OpCompositeConstruct %v2float %float_3 %float_4
+%149 = OpCompositeConstruct %mat2v2float %150 %151
+OpStore %_2_m1 %149
+%154 = OpCompositeExtract %float %50 0
+%155 = OpCompositeExtract %float %50 1
+%156 = OpCompositeExtract %float %50 2
+%157 = OpCompositeExtract %float %50 3
+%158 = OpCompositeConstruct %v2float %154 %155
+%159 = OpCompositeConstruct %v2float %156 %157
+%153 = OpCompositeConstruct %mat2v2float %158 %159
+OpStore %_3_m2 %153
+%161 = OpLoad %mat2v2float %_2_m1
+OpStore %_4_m3 %161
+%164 = OpCompositeConstruct %v2float %float_1 %float_0
+%165 = OpCompositeConstruct %v2float %float_0 %float_1
+%163 = OpCompositeConstruct %mat2v2float %164 %165
+OpStore %_5_m4 %163
+%166 = OpLoad %mat2v2float %_4_m3
+%167 = OpLoad %mat2v2float %_5_m4
+%168 = OpMatrixTimesMatrix %mat2v2float %166 %167
+OpStore %_4_m3 %168
+%170 = OpAccessChain %_ptr_Function_v2float %_2_m1 %int_0
+%171 = OpLoad %v2float %170
+%172 = OpCompositeExtract %float %171 0
+%174 = OpCompositeConstruct %v2float %172 %float_0
+%175 = OpCompositeConstruct %v2float %float_0 %172
+%173 = OpCompositeConstruct %mat2v2float %174 %175
+OpStore %_6_m5 %173
+%178 = OpCompositeConstruct %v2float %float_1 %float_2
+%179 = OpCompositeConstruct %v2float %float_3 %float_4
+%177 = OpCompositeConstruct %mat2v2float %178 %179
+OpStore %_7_m6 %177
+%180 = OpLoad %mat2v2float %_7_m6
+%181 = OpLoad %mat2v2float %_6_m5
+%182 = OpCompositeExtract %v2float %180 0
+%183 = OpCompositeExtract %v2float %181 0
+%184 = OpFAdd %v2float %182 %183
+%185 = OpCompositeExtract %v2float %180 1
+%186 = OpCompositeExtract %v2float %181 1
+%187 = OpFAdd %v2float %185 %186
+%188 = OpCompositeConstruct %mat2v2float %184 %187
+OpStore %_7_m6 %188
+%191 = OpCompositeConstruct %v2float %float_5 %float_6
+%192 = OpCompositeConstruct %v2float %float_7 %float_8
+%190 = OpCompositeConstruct %mat2v2float %191 %192
+OpStore %_8_m7 %190
+%195 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%196 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%197 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%194 = OpCompositeConstruct %mat3v3float %195 %196 %197
+OpStore %_9_m9 %194
+%200 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
+%201 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
+%202 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
+%203 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
+%199 = OpCompositeConstruct %mat4v4float %200 %201 %202 %203
+OpStore %_10_m10 %199
+%206 = OpCompositeConstruct %v4float %float_2 %float_0 %float_0 %float_0
+%207 = OpCompositeConstruct %v4float %float_0 %float_2 %float_0 %float_0
+%208 = OpCompositeConstruct %v4float %float_0 %float_0 %float_2 %float_0
+%209 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_2
+%205 = OpCompositeConstruct %mat4v4float %206 %207 %208 %209
+OpStore %_11_m11 %205
+%210 = OpLoad %mat4v4float %_11_m11
+%211 = OpLoad %mat4v4float %_10_m10
+%212 = OpCompositeExtract %v4float %210 0
+%213 = OpCompositeExtract %v4float %211 0
+%214 = OpFSub %v4float %212 %213
+%215 = OpCompositeExtract %v4float %210 1
+%216 = OpCompositeExtract %v4float %211 1
+%217 = OpFSub %v4float %215 %216
+%218 = OpCompositeExtract %v4float %210 2
+%219 = OpCompositeExtract %v4float %211 2
+%220 = OpFSub %v4float %218 %219
+%221 = OpCompositeExtract %v4float %210 3
+%222 = OpCompositeExtract %v4float %211 3
+%223 = OpFSub %v4float %221 %222
+%224 = OpCompositeConstruct %mat4v4float %214 %217 %220 %223
+OpStore %_11_m11 %224
+OpSelectionMerge %227 None
+OpBranchConditional %true %226 %227
+%226 = OpLabel
+%228 = OpFunctionCall %bool %test_half
+OpBranch %227
+%227 = OpLabel
+%229 = OpPhi %bool %false %135 %228 %226
+OpSelectionMerge %234 None
+OpBranchConditional %229 %232 %233
+%232 = OpLabel
+%235 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%237 = OpLoad %v4float %235
+OpStore %230 %237
+OpBranch %234
+%233 = OpLabel
+%238 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%240 = OpLoad %v4float %238
+OpStore %230 %240
+OpBranch %234
+%234 = OpLabel
+%241 = OpLoad %v4float %230
+OpReturnValue %241
 OpFunctionEnd
diff --git a/tests/sksl/shared/Matrices.glsl b/tests/sksl/shared/Matrices.glsl
index 5562b34..62992e5 100644
--- a/tests/sksl/shared/Matrices.glsl
+++ b/tests/sksl/shared/Matrices.glsl
@@ -2,22 +2,40 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+bool test_half() {
+    vec3 v1 = mat3(1.0) * vec3(2.0);
+    vec3 v2 = vec3(2.0) * mat3(1.0);
+    mat2 m1 = mat2(1.0, 2.0, 3.0, 4.0);
+    mat2 m2 = mat2(vec4(0.0));
+    mat2 m3 = m1;
+    mat2 m4 = mat2(1.0);
+    m3 *= m4;
+    mat2 m5 = mat2(m1[0].x);
+    mat2 m6 = mat2(1.0, 2.0, 3.0, 4.0);
+    m6 += m5;
+    mat2 m7 = mat2(5.0, 6.0, 7.0, 8.0);
+    mat3 m9 = mat3(1.0);
+    mat4 m10 = mat4(1.0);
+    mat4 m11 = mat4(2.0);
+    m11 -= m10;
+    return true;
+}
 vec4 main() {
-    mat2 _0_m3 = mat2(1.0, 2.0, 3.0, 4.0);
-    _0_m3 *= mat2(1.0);
-    mat2 _1_m5 = mat2(mat2(1.0, 2.0, 3.0, 4.0)[0].x);
-    mat2 _2_m6 = mat2(1.0, 2.0, 3.0, 4.0);
-    _2_m6 += _1_m5;
-    mat4 _3_m11 = mat4(2.0);
-    _3_m11 -= mat4(1.0);
-    mat2 _4_m3 = mat2(1.0, 2.0, 3.0, 4.0);
-    _4_m3 *= mat2(1.0);
-    mat2 _5_m5 = mat2(mat2(1.0, 2.0, 3.0, 4.0)[0].x);
-    mat2 _6_m6 = mat2(1.0, 2.0, 3.0, 4.0);
-    _6_m6 += _5_m5;
-    mat4 _7_m11 = mat4(2.0);
-    _7_m11 -= mat4(1.0);
-    return colorGreen;
-
+    vec3 _0_v1 = mat3(1.0) * vec3(2.0);
+    vec3 _1_v2 = vec3(2.0) * mat3(1.0);
+    mat2 _2_m1 = mat2(1.0, 2.0, 3.0, 4.0);
+    mat2 _3_m2 = mat2(vec4(0.0));
+    mat2 _4_m3 = _2_m1;
+    mat2 _5_m4 = mat2(1.0);
+    _4_m3 *= _5_m4;
+    mat2 _6_m5 = mat2(_2_m1[0].x);
+    mat2 _7_m6 = mat2(1.0, 2.0, 3.0, 4.0);
+    _7_m6 += _6_m5;
+    mat2 _8_m7 = mat2(5.0, 6.0, 7.0, 8.0);
+    mat3 _9_m9 = mat3(1.0);
+    mat4 _10_m10 = mat4(1.0);
+    mat4 _11_m11 = mat4(2.0);
+    _11_m11 -= _10_m10;
+    return true && test_half() ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/Matrices.metal b/tests/sksl/shared/Matrices.metal
index cf8f616..0450293 100644
--- a/tests/sksl/shared/Matrices.metal
+++ b/tests/sksl/shared/Matrices.metal
@@ -10,31 +10,52 @@
 struct Outputs {
     float4 sk_FragColor [[color(0)]];
 };
+float2x2 float2x2_from_float4(float4 x0) {
+    return float2x2(float2(x0[0], x0[1]), float2(x0[2], x0[3]));
+}
 thread float2x2& operator*=(thread float2x2& left, thread const float2x2& right) {
     left = left * right;
     return left;
 }
 
 
+bool test_half() {
+    float3 v1 = float3x3(1.0) * float3(2.0);
+    float3 v2 = float3(2.0) * float3x3(1.0);
+    float2x2 m1 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    float2x2 m2 = float2x2_from_float4(float4(0.0));
+    float2x2 m3 = m1;
+    float2x2 m4 = float2x2(1.0);
+    m3 *= m4;
+    float2x2 m5 = float2x2(m1[0].x);
+    float2x2 m6 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    m6 += m5;
+    float2x2 m7 = float2x2(float2(5.0, 6.0), float2(7.0, 8.0));
+    float3x3 m9 = float3x3(1.0);
+    float4x4 m10 = float4x4(1.0);
+    float4x4 m11 = float4x4(2.0);
+    m11 -= m10;
+    return true;
+}
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float2x2 _0_m3 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    _0_m3 *= float2x2(1.0);
-    float2x2 _1_m5 = float2x2(float2x2(float2(1.0, 2.0), float2(3.0, 4.0))[0].x);
-    float2x2 _2_m6 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    _2_m6 += _1_m5;
-    float4x4 _3_m11 = float4x4(2.0);
-    _3_m11 -= float4x4(1.0);
-    float2x2 _4_m3 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    _4_m3 *= float2x2(1.0);
-    float2x2 _5_m5 = float2x2(float2x2(float2(1.0, 2.0), float2(3.0, 4.0))[0].x);
-    float2x2 _6_m6 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
-    _6_m6 += _5_m5;
-    float4x4 _7_m11 = float4x4(2.0);
-    _7_m11 -= float4x4(1.0);
-    _out.sk_FragColor = _uniforms.colorGreen;
+    float3 _0_v1 = float3x3(1.0) * float3(2.0);
+    float3 _1_v2 = float3(2.0) * float3x3(1.0);
+    float2x2 _2_m1 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    float2x2 _3_m2 = float2x2_from_float4(float4(0.0));
+    float2x2 _4_m3 = _2_m1;
+    float2x2 _5_m4 = float2x2(1.0);
+    _4_m3 *= _5_m4;
+    float2x2 _6_m5 = float2x2(_2_m1[0].x);
+    float2x2 _7_m6 = float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    _7_m6 += _6_m5;
+    float2x2 _8_m7 = float2x2(float2(5.0, 6.0), float2(7.0, 8.0));
+    float3x3 _9_m9 = float3x3(1.0);
+    float4x4 _10_m10 = float4x4(1.0);
+    float4x4 _11_m11 = float4x4(2.0);
+    _11_m11 -= _10_m10;
+    _out.sk_FragColor = true && test_half() ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
-
 }
diff --git a/tests/sksl/shared/MatricesNonsquare.glsl b/tests/sksl/shared/MatricesNonsquare.glsl
index 1b8d367..51404d8 100644
--- a/tests/sksl/shared/MatricesNonsquare.glsl
+++ b/tests/sksl/shared/MatricesNonsquare.glsl
@@ -2,20 +2,34 @@
 out vec4 sk_FragColor;
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
+bool test_half() {
+    mat2x3 m23 = mat2x3(23.0);
+    mat2x4 m24 = mat2x4(24.0);
+    mat3x2 m32 = mat3x2(32.0);
+    mat3x4 m34 = mat3x4(34.0);
+    mat4x2 m42 = mat4x2(42.0);
+    mat4x3 m43 = mat4x3(44.0);
+    mat2 m22 = m32 * m23;
+    m22 *= m22;
+    mat3 m33 = m43 * m34;
+    m33 *= m33;
+    mat4 m44 = m24 * m42;
+    m44 *= m44;
+    return true;
+}
 vec4 main() {
-    mat2 _0_m22 = mat3x2(32.0) * mat2x3(23.0);
-    _0_m22 *= _0_m22;
-    mat3 _1_m33 = mat4x3(44.0) * mat3x4(34.0);
-    _1_m33 *= _1_m33;
-    mat4 _2_m44 = mat2x4(24.0) * mat4x2(42.0);
-    _2_m44 *= _2_m44;
-    mat2 _3_m22 = mat3x2(32.0) * mat2x3(23.0);
-    _3_m22 *= _3_m22;
-    mat3 _4_m33 = mat4x3(44.0) * mat3x4(34.0);
-    _4_m33 *= _4_m33;
-    mat4 _5_m44 = mat2x4(24.0) * mat4x2(42.0);
-    _5_m44 *= _5_m44;
-    return colorGreen;
-
+    mat2x3 _0_m23 = mat2x3(23.0);
+    mat2x4 _1_m24 = mat2x4(24.0);
+    mat3x2 _2_m32 = mat3x2(32.0);
+    mat3x4 _3_m34 = mat3x4(34.0);
+    mat4x2 _4_m42 = mat4x2(42.0);
+    mat4x3 _5_m43 = mat4x3(44.0);
+    mat2 _6_m22 = _2_m32 * _0_m23;
+    _6_m22 *= _6_m22;
+    mat3 _7_m33 = _5_m43 * _3_m34;
+    _7_m33 *= _7_m33;
+    mat4 _8_m44 = _1_m24 * _4_m42;
+    _8_m44 *= _8_m44;
+    return true && test_half() ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/MatricesNonsquare.metal b/tests/sksl/shared/MatricesNonsquare.metal
index a83056b..5760aa4 100644
--- a/tests/sksl/shared/MatricesNonsquare.metal
+++ b/tests/sksl/shared/MatricesNonsquare.metal
@@ -24,23 +24,37 @@
 }
 
 
+bool test_half() {
+    float2x3 m23 = float2x3(23.0);
+    float2x4 m24 = float2x4(24.0);
+    float3x2 m32 = float3x2(32.0);
+    float3x4 m34 = float3x4(34.0);
+    float4x2 m42 = float4x2(42.0);
+    float4x3 m43 = float4x3(44.0);
+    float2x2 m22 = m32 * m23;
+    m22 *= m22;
+    float3x3 m33 = m43 * m34;
+    m33 *= m33;
+    float4x4 m44 = m24 * m42;
+    m44 *= m44;
+    return true;
+}
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float2x2 _0_m22 = float3x2(32.0) * float2x3(23.0);
-    _0_m22 *= _0_m22;
-    float3x3 _1_m33 = float4x3(44.0) * float3x4(34.0);
-    _1_m33 *= _1_m33;
-    float4x4 _2_m44 = float2x4(24.0) * float4x2(42.0);
-    _2_m44 *= _2_m44;
-    float2x2 _3_m22 = float3x2(32.0) * float2x3(23.0);
-    _3_m22 *= _3_m22;
-    float3x3 _4_m33 = float4x3(44.0) * float3x4(34.0);
-    _4_m33 *= _4_m33;
-    float4x4 _5_m44 = float2x4(24.0) * float4x2(42.0);
-    _5_m44 *= _5_m44;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    float2x3 _0_m23 = float2x3(23.0);
+    float2x4 _1_m24 = float2x4(24.0);
+    float3x2 _2_m32 = float3x2(32.0);
+    float3x4 _3_m34 = float3x4(34.0);
+    float4x2 _4_m42 = float4x2(42.0);
+    float4x3 _5_m43 = float4x3(44.0);
+    float2x2 _6_m22 = _2_m32 * _0_m23;
+    _6_m22 *= _6_m22;
+    float3x3 _7_m33 = _5_m43 * _3_m34;
+    _7_m33 *= _7_m33;
+    float4x4 _8_m44 = _1_m24 * _4_m42;
+    _8_m44 *= _8_m44;
+    _out.sk_FragColor = true && test_half() ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
-
 }
diff --git a/tests/sksl/shared/MatrixEquality.asm.frag b/tests/sksl/shared/MatrixEquality.asm.frag
index 25427a7..e0d2076 100644
--- a/tests/sksl/shared/MatrixEquality.asm.frag
+++ b/tests/sksl/shared/MatrixEquality.asm.frag
@@ -33,32 +33,33 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %31 RelaxedPrecision
-OpDecorate %37 RelaxedPrecision
-OpDecorate %38 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
-OpDecorate %56 RelaxedPrecision
-OpDecorate %63 RelaxedPrecision
-OpDecorate %64 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %41 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
+OpDecorate %54 RelaxedPrecision
+OpDecorate %60 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %69 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
 OpDecorate %86 RelaxedPrecision
 OpDecorate %90 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %88 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
 OpDecorate %106 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %109 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
-OpDecorate %107 RelaxedPrecision
-OpDecorate %126 RelaxedPrecision
-OpDecorate %135 RelaxedPrecision
-OpDecorate %138 RelaxedPrecision
+OpDecorate %112 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %130 RelaxedPrecision
 OpDecorate %139 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -78,6 +79,7 @@
 %22 = OpTypeFunction %v4float
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
+%false = OpConstantFalse %bool
 %_ptr_Uniform_mat2v2float = OpTypePointer Uniform %mat2v2float
 %int = OpTypeInt 32 1
 %int_2 = OpConstant %int 2
@@ -86,7 +88,6 @@
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
 %v2bool = OpTypeVector %bool 2
-%false = OpConstantFalse %bool
 %_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
 %int_3 = OpConstant %int 3
 %float_5 = OpConstant %float 5
@@ -110,115 +111,122 @@
 %main = OpFunction %v4float None %22
 %23 = OpLabel
 %_0_ok = OpVariable %_ptr_Function_bool Function
-%127 = OpVariable %_ptr_Function_v4float Function
+%131 = OpVariable %_ptr_Function_v4float Function
 OpStore %_0_ok %true
-%27 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
-%31 = OpLoad %mat2v2float %27
-%37 = OpCompositeConstruct %v2float %float_1 %float_2
-%38 = OpCompositeConstruct %v2float %float_3 %float_4
-%36 = OpCompositeConstruct %mat2v2float %37 %38
-%40 = OpCompositeExtract %v2float %31 0
-%41 = OpCompositeExtract %v2float %36 0
-%42 = OpFOrdEqual %v2bool %40 %41
-%43 = OpAll %bool %42
-%44 = OpCompositeExtract %v2float %31 1
-%45 = OpCompositeExtract %v2float %36 1
+%28 = OpLoad %bool %_0_ok
+OpSelectionMerge %30 None
+OpBranchConditional %28 %29 %30
+%29 = OpLabel
+%31 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
+%35 = OpLoad %mat2v2float %31
+%41 = OpCompositeConstruct %v2float %float_1 %float_2
+%42 = OpCompositeConstruct %v2float %float_3 %float_4
+%40 = OpCompositeConstruct %mat2v2float %41 %42
+%44 = OpCompositeExtract %v2float %35 0
+%45 = OpCompositeExtract %v2float %40 0
 %46 = OpFOrdEqual %v2bool %44 %45
 %47 = OpAll %bool %46
-%48 = OpLogicalAnd %bool %43 %47
-OpStore %_0_ok %48
-%50 = OpLoad %bool %_0_ok
-OpSelectionMerge %52 None
-OpBranchConditional %50 %51 %52
-%51 = OpLabel
-%53 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3
-%56 = OpLoad %mat3v3float %53
-%63 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
-%64 = OpCompositeConstruct %v3float %float_4 %float_5 %float_6
-%65 = OpCompositeConstruct %v3float %float_7 %float_8 %float_9
-%62 = OpCompositeConstruct %mat3v3float %63 %64 %65
-%67 = OpCompositeExtract %v3float %56 0
-%68 = OpCompositeExtract %v3float %62 0
-%69 = OpFOrdEqual %v3bool %67 %68
-%70 = OpAll %bool %69
-%71 = OpCompositeExtract %v3float %56 1
-%72 = OpCompositeExtract %v3float %62 1
+%48 = OpCompositeExtract %v2float %35 1
+%49 = OpCompositeExtract %v2float %40 1
+%50 = OpFOrdEqual %v2bool %48 %49
+%51 = OpAll %bool %50
+%52 = OpLogicalAnd %bool %47 %51
+OpBranch %30
+%30 = OpLabel
+%53 = OpPhi %bool %false %23 %52 %29
+OpStore %_0_ok %53
+%54 = OpLoad %bool %_0_ok
+OpSelectionMerge %56 None
+OpBranchConditional %54 %55 %56
+%55 = OpLabel
+%57 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3
+%60 = OpLoad %mat3v3float %57
+%67 = OpCompositeConstruct %v3float %float_1 %float_2 %float_3
+%68 = OpCompositeConstruct %v3float %float_4 %float_5 %float_6
+%69 = OpCompositeConstruct %v3float %float_7 %float_8 %float_9
+%66 = OpCompositeConstruct %mat3v3float %67 %68 %69
+%71 = OpCompositeExtract %v3float %60 0
+%72 = OpCompositeExtract %v3float %66 0
 %73 = OpFOrdEqual %v3bool %71 %72
 %74 = OpAll %bool %73
-%75 = OpLogicalAnd %bool %70 %74
-%76 = OpCompositeExtract %v3float %56 2
-%77 = OpCompositeExtract %v3float %62 2
-%78 = OpFOrdEqual %v3bool %76 %77
-%79 = OpAll %bool %78
-%80 = OpLogicalAnd %bool %75 %79
-OpBranch %52
-%52 = OpLabel
-%81 = OpPhi %bool %false %23 %80 %51
-OpStore %_0_ok %81
-%82 = OpLoad %bool %_0_ok
-OpSelectionMerge %84 None
-OpBranchConditional %82 %83 %84
-%83 = OpLabel
-%85 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
-%86 = OpLoad %mat2v2float %85
-%90 = OpCompositeConstruct %v2float %float_100 %float_0
-%91 = OpCompositeConstruct %v2float %float_0 %float_100
-%88 = OpCompositeConstruct %mat2v2float %90 %91
-%92 = OpCompositeExtract %v2float %86 0
-%93 = OpCompositeExtract %v2float %88 0
-%94 = OpFOrdNotEqual %v2bool %92 %93
-%95 = OpAny %bool %94
-%96 = OpCompositeExtract %v2float %86 1
-%97 = OpCompositeExtract %v2float %88 1
+%75 = OpCompositeExtract %v3float %60 1
+%76 = OpCompositeExtract %v3float %66 1
+%77 = OpFOrdEqual %v3bool %75 %76
+%78 = OpAll %bool %77
+%79 = OpLogicalAnd %bool %74 %78
+%80 = OpCompositeExtract %v3float %60 2
+%81 = OpCompositeExtract %v3float %66 2
+%82 = OpFOrdEqual %v3bool %80 %81
+%83 = OpAll %bool %82
+%84 = OpLogicalAnd %bool %79 %83
+OpBranch %56
+%56 = OpLabel
+%85 = OpPhi %bool %false %30 %84 %55
+OpStore %_0_ok %85
+%86 = OpLoad %bool %_0_ok
+OpSelectionMerge %88 None
+OpBranchConditional %86 %87 %88
+%87 = OpLabel
+%89 = OpAccessChain %_ptr_Uniform_mat2v2float %10 %int_2
+%90 = OpLoad %mat2v2float %89
+%94 = OpCompositeConstruct %v2float %float_100 %float_0
+%95 = OpCompositeConstruct %v2float %float_0 %float_100
+%92 = OpCompositeConstruct %mat2v2float %94 %95
+%96 = OpCompositeExtract %v2float %90 0
+%97 = OpCompositeExtract %v2float %92 0
 %98 = OpFOrdNotEqual %v2bool %96 %97
 %99 = OpAny %bool %98
-%100 = OpLogicalOr %bool %95 %99
-OpBranch %84
-%84 = OpLabel
-%101 = OpPhi %bool %false %52 %100 %83
-OpStore %_0_ok %101
-%102 = OpLoad %bool %_0_ok
-OpSelectionMerge %104 None
-OpBranchConditional %102 %103 %104
-%103 = OpLabel
-%105 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3
-%106 = OpLoad %mat3v3float %105
-%108 = OpCompositeConstruct %v3float %float_9 %float_8 %float_7
-%109 = OpCompositeConstruct %v3float %float_6 %float_5 %float_4
-%110 = OpCompositeConstruct %v3float %float_3 %float_2 %float_1
-%107 = OpCompositeConstruct %mat3v3float %108 %109 %110
-%111 = OpCompositeExtract %v3float %106 0
-%112 = OpCompositeExtract %v3float %107 0
-%113 = OpFOrdNotEqual %v3bool %111 %112
-%114 = OpAny %bool %113
-%115 = OpCompositeExtract %v3float %106 1
-%116 = OpCompositeExtract %v3float %107 1
+%100 = OpCompositeExtract %v2float %90 1
+%101 = OpCompositeExtract %v2float %92 1
+%102 = OpFOrdNotEqual %v2bool %100 %101
+%103 = OpAny %bool %102
+%104 = OpLogicalOr %bool %99 %103
+OpBranch %88
+%88 = OpLabel
+%105 = OpPhi %bool %false %56 %104 %87
+OpStore %_0_ok %105
+%106 = OpLoad %bool %_0_ok
+OpSelectionMerge %108 None
+OpBranchConditional %106 %107 %108
+%107 = OpLabel
+%109 = OpAccessChain %_ptr_Uniform_mat3v3float %10 %int_3
+%110 = OpLoad %mat3v3float %109
+%112 = OpCompositeConstruct %v3float %float_9 %float_8 %float_7
+%113 = OpCompositeConstruct %v3float %float_6 %float_5 %float_4
+%114 = OpCompositeConstruct %v3float %float_3 %float_2 %float_1
+%111 = OpCompositeConstruct %mat3v3float %112 %113 %114
+%115 = OpCompositeExtract %v3float %110 0
+%116 = OpCompositeExtract %v3float %111 0
 %117 = OpFOrdNotEqual %v3bool %115 %116
 %118 = OpAny %bool %117
-%119 = OpLogicalOr %bool %114 %118
-%120 = OpCompositeExtract %v3float %106 2
-%121 = OpCompositeExtract %v3float %107 2
-%122 = OpFOrdNotEqual %v3bool %120 %121
-%123 = OpAny %bool %122
-%124 = OpLogicalOr %bool %119 %123
-OpBranch %104
-%104 = OpLabel
-%125 = OpPhi %bool %false %84 %124 %103
-OpStore %_0_ok %125
-%126 = OpLoad %bool %_0_ok
-OpSelectionMerge %131 None
-OpBranchConditional %126 %129 %130
-%129 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%135 = OpLoad %v4float %132
-OpStore %127 %135
-OpBranch %131
-%130 = OpLabel
-%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%138 = OpLoad %v4float %136
-OpStore %127 %138
-OpBranch %131
-%131 = OpLabel
-%139 = OpLoad %v4float %127
-OpReturnValue %139
+%119 = OpCompositeExtract %v3float %110 1
+%120 = OpCompositeExtract %v3float %111 1
+%121 = OpFOrdNotEqual %v3bool %119 %120
+%122 = OpAny %bool %121
+%123 = OpLogicalOr %bool %118 %122
+%124 = OpCompositeExtract %v3float %110 2
+%125 = OpCompositeExtract %v3float %111 2
+%126 = OpFOrdNotEqual %v3bool %124 %125
+%127 = OpAny %bool %126
+%128 = OpLogicalOr %bool %123 %127
+OpBranch %108
+%108 = OpLabel
+%129 = OpPhi %bool %false %88 %128 %107
+OpStore %_0_ok %129
+%130 = OpLoad %bool %_0_ok
+OpSelectionMerge %135 None
+OpBranchConditional %130 %133 %134
+%133 = OpLabel
+%136 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%139 = OpLoad %v4float %136
+OpStore %131 %139
+OpBranch %135
+%134 = OpLabel
+%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%142 = OpLoad %v4float %140
+OpStore %131 %142
+OpBranch %135
+%135 = OpLabel
+%143 = OpLoad %v4float %131
+OpReturnValue %143
 OpFunctionEnd
diff --git a/tests/sksl/shared/MatrixEquality.glsl b/tests/sksl/shared/MatrixEquality.glsl
index d8e8bf5..e0c4a86 100644
--- a/tests/sksl/shared/MatrixEquality.glsl
+++ b/tests/sksl/shared/MatrixEquality.glsl
@@ -6,7 +6,7 @@
 uniform mat3 testMatrix3x3;
 vec4 main() {
     bool _0_ok = true;
-    _0_ok = testMatrix2x2 == mat2(1.0, 2.0, 3.0, 4.0);
+    _0_ok = _0_ok && testMatrix2x2 == mat2(1.0, 2.0, 3.0, 4.0);
     _0_ok = _0_ok && testMatrix3x3 == mat3(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0);
     _0_ok = _0_ok && testMatrix2x2 != mat2(100.0);
     _0_ok = _0_ok && testMatrix3x3 != mat3(9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0);
diff --git a/tests/sksl/shared/MatrixEquality.metal b/tests/sksl/shared/MatrixEquality.metal
index 3f900b6..9d7148a 100644
--- a/tests/sksl/shared/MatrixEquality.metal
+++ b/tests/sksl/shared/MatrixEquality.metal
@@ -32,7 +32,7 @@
     Outputs _out;
     (void)_out;
     bool _0_ok = true;
-    _0_ok = _uniforms.testMatrix2x2 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
+    _0_ok = _0_ok && _uniforms.testMatrix2x2 == float2x2(float2(1.0, 2.0), float2(3.0, 4.0));
     _0_ok = _0_ok && _uniforms.testMatrix3x3 == float3x3(float3(1.0, 2.0, 3.0), float3(4.0, 5.0, 6.0), float3(7.0, 8.0, 9.0));
     _0_ok = _0_ok && _uniforms.testMatrix2x2 != float2x2(100.0);
     _0_ok = _0_ok && _uniforms.testMatrix3x3 != float3x3(float3(9.0, 8.0, 7.0), float3(6.0, 5.0, 4.0), float3(3.0, 2.0, 1.0));
diff --git a/tests/sksl/shared/MultipleAssignments.asm.frag b/tests/sksl/shared/MultipleAssignments.asm.frag
index 61d2e7b..6bfef27 100644
--- a/tests/sksl/shared/MultipleAssignments.asm.frag
+++ b/tests/sksl/shared/MultipleAssignments.asm.frag
@@ -7,11 +7,20 @@
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %x "x"
+OpName %y "y"
+OpName %a "a"
+OpName %b "b"
+OpName %c "c"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpDecorate %25 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
+OpDecorate %29 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -22,9 +31,9 @@
 %void = OpTypeVoid
 %12 = OpTypeFunction %void
 %15 = OpTypeFunction %v4float
-%float_0 = OpConstant %float 0
+%_ptr_Function_float = OpTypePointer Function %float
 %float_1 = OpConstant %float 1
-%19 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+%float_0 = OpConstant %float 0
 %_entrypoint = OpFunction %void None %12
 %13 = OpLabel
 %14 = OpFunctionCall %v4float %main
@@ -33,5 +42,22 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %15
 %16 = OpLabel
-OpReturnValue %19
+%x = OpVariable %_ptr_Function_float Function
+%y = OpVariable %_ptr_Function_float Function
+%a = OpVariable %_ptr_Function_float Function
+%b = OpVariable %_ptr_Function_float Function
+%c = OpVariable %_ptr_Function_float Function
+OpStore %y %float_1
+OpStore %x %float_1
+OpStore %c %float_0
+OpStore %b %float_0
+OpStore %a %float_0
+%25 = OpLoad %float %a
+%26 = OpLoad %float %b
+%27 = OpFMul %float %25 %26
+%28 = OpLoad %float %x
+%29 = OpLoad %float %c
+%30 = OpLoad %float %y
+%31 = OpCompositeConstruct %v4float %27 %28 %29 %30
+OpReturnValue %31
 OpFunctionEnd
diff --git a/tests/sksl/shared/MultipleAssignments.glsl b/tests/sksl/shared/MultipleAssignments.glsl
index e26d14f..1ce9f60 100644
--- a/tests/sksl/shared/MultipleAssignments.glsl
+++ b/tests/sksl/shared/MultipleAssignments.glsl
@@ -1,5 +1,13 @@
 
 out vec4 sk_FragColor;
 vec4 main() {
-    return vec4(0.0, 1.0, 0.0, 1.0);
+    float x;
+    float y;
+    x = (y = 1.0);
+    float a;
+    float b;
+    float c;
+
+    a = (b = (c = 0.0));
+    return vec4(a * b, x, c, y);
 }
diff --git a/tests/sksl/shared/MultipleAssignments.metal b/tests/sksl/shared/MultipleAssignments.metal
index 7254bd8..17a4f0a 100644
--- a/tests/sksl/shared/MultipleAssignments.metal
+++ b/tests/sksl/shared/MultipleAssignments.metal
@@ -9,6 +9,14 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(0.0, 1.0, 0.0, 1.0);
+    float x;
+    float y;
+    x = (y = 1.0);
+    float a;
+    float b;
+    float c;
+
+    a = (b = (c = 0.0));
+    _out.sk_FragColor = float4(a * b, x, c, y);
     return _out;
 }
diff --git a/tests/sksl/shared/NegatedVectorLiteral.asm.frag b/tests/sksl/shared/NegatedVectorLiteral.asm.frag
index 6221f16..dd3d663 100644
--- a/tests/sksl/shared/NegatedVectorLiteral.asm.frag
+++ b/tests/sksl/shared/NegatedVectorLiteral.asm.frag
@@ -10,9 +10,13 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %test_int "test_int"
+OpName %one "one"
+OpName %two "two"
 OpName %result "result"
 OpName %main "main"
-OpName %_0_result "_0_result"
+OpName %_0_one "_0_one"
+OpName %_1_two "_1_two"
+OpName %_2_result "_2_result"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,9 +29,11 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %11 Binding 0
 OpDecorate %11 DescriptorSet 0
-OpDecorate %80 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -42,17 +48,27 @@
 %16 = OpTypeFunction %void
 %19 = OpTypeFunction %bool
 %int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+%int_1 = OpConstant %int 1
+%int_2 = OpConstant %int 2
 %v4int = OpTypeVector %int 4
 %_ptr_Function_v4int = OpTypePointer Function %v4int
-%int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
-%int_2 = OpConstant %int 2
+%int_n2 = OpConstant %int -2
+%37 = OpConstantComposite %v4int %int_n2 %int_n2 %int_n2 %int_n2
+%v4bool = OpTypeVector %bool 4
+%v2int = OpTypeVector %int 2
+%v2bool = OpTypeVector %bool 2
 %int_3 = OpConstant %int 3
-%46 = OpTypeFunction %v4float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
-%float_1 = OpConstant %float 1
+%75 = OpTypeFunction %v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%float_1 = OpConstant %float 1
+%float_2 = OpConstant %float 2
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+%v3float = OpTypeVector %float 3
+%v2float = OpTypeVector %float 2
+%float_n2 = OpConstant %float -2
+%106 = OpConstantComposite %v2float %float_1 %float_n2
 %false = OpConstantFalse %bool
 %float_0 = OpConstant %float 0
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
@@ -64,73 +80,129 @@
 OpFunctionEnd
 %test_int = OpFunction %bool None %19
 %20 = OpLabel
+%one = OpVariable %_ptr_Function_int Function
+%two = OpVariable %_ptr_Function_int Function
 %result = OpVariable %_ptr_Function_v4int Function
-%26 = OpAccessChain %_ptr_Function_int %result %int_0
-OpStore %26 %int_1
-%29 = OpAccessChain %_ptr_Function_int %result %int_1
-OpStore %29 %int_1
-%30 = OpAccessChain %_ptr_Function_int %result %int_2
+OpStore %one %int_1
+OpStore %two %int_2
+%30 = OpAccessChain %_ptr_Function_int %result %int_0
 OpStore %30 %int_1
-%32 = OpAccessChain %_ptr_Function_int %result %int_3
+%32 = OpAccessChain %_ptr_Function_int %result %int_1
 OpStore %32 %int_1
-%34 = OpLoad %v4int %result
-%35 = OpCompositeExtract %int %34 0
-%36 = OpLoad %v4int %result
-%37 = OpCompositeExtract %int %36 1
-%38 = OpIMul %int %35 %37
-%39 = OpLoad %v4int %result
-%40 = OpCompositeExtract %int %39 2
-%41 = OpIMul %int %38 %40
-%42 = OpLoad %v4int %result
-%43 = OpCompositeExtract %int %42 3
-%44 = OpIMul %int %41 %43
-%45 = OpINotEqual %bool %44 %int_0
-OpReturnValue %45
+%34 = OpLoad %int %two
+%35 = OpCompositeConstruct %v4int %34 %34 %34 %34
+%33 = OpSNegate %v4int %35
+%38 = OpIEqual %v4bool %33 %37
+%40 = OpAll %bool %38
+%41 = OpSelect %int %40 %int_1 %int_0
+%42 = OpAccessChain %_ptr_Function_int %result %int_2
+OpStore %42 %41
+%46 = OpLoad %int %one
+%45 = OpSNegate %int %46
+%47 = OpLoad %int %one
+%48 = OpLoad %int %one
+%49 = OpIAdd %int %47 %48
+%50 = OpCompositeConstruct %v2int %45 %49
+%43 = OpSNegate %v2int %50
+%52 = OpLoad %int %one
+%53 = OpLoad %int %two
+%54 = OpISub %int %52 %53
+%55 = OpLoad %int %two
+%56 = OpCompositeConstruct %v2int %54 %55
+%51 = OpSNegate %v2int %56
+%57 = OpIEqual %v2bool %43 %51
+%59 = OpAll %bool %57
+%60 = OpSelect %int %59 %int_1 %int_0
+%61 = OpAccessChain %_ptr_Function_int %result %int_3
+OpStore %61 %60
+%63 = OpLoad %v4int %result
+%64 = OpCompositeExtract %int %63 0
+%65 = OpLoad %v4int %result
+%66 = OpCompositeExtract %int %65 1
+%67 = OpIMul %int %64 %66
+%68 = OpLoad %v4int %result
+%69 = OpCompositeExtract %int %68 2
+%70 = OpIMul %int %67 %69
+%71 = OpLoad %v4int %result
+%72 = OpCompositeExtract %int %71 3
+%73 = OpIMul %int %70 %72
+%74 = OpINotEqual %bool %73 %int_0
+OpReturnValue %74
 OpFunctionEnd
-%main = OpFunction %v4float None %46
-%47 = OpLabel
-%_0_result = OpVariable %_ptr_Function_v4float Function
-%74 = OpVariable %_ptr_Function_v4float Function
-%51 = OpAccessChain %_ptr_Function_float %_0_result %int_0
-OpStore %51 %float_1
-%53 = OpAccessChain %_ptr_Function_float %_0_result %int_1
-OpStore %53 %float_1
-%54 = OpAccessChain %_ptr_Function_float %_0_result %int_2
-OpStore %54 %float_1
-%55 = OpAccessChain %_ptr_Function_float %_0_result %int_3
-OpStore %55 %float_1
-%57 = OpLoad %v4float %_0_result
-%58 = OpCompositeExtract %float %57 0
-%59 = OpLoad %v4float %_0_result
-%60 = OpCompositeExtract %float %59 1
-%61 = OpFMul %float %58 %60
-%62 = OpLoad %v4float %_0_result
-%63 = OpCompositeExtract %float %62 2
-%64 = OpFMul %float %61 %63
-%65 = OpLoad %v4float %_0_result
-%66 = OpCompositeExtract %float %65 3
-%67 = OpFMul %float %64 %66
-%68 = OpFUnordNotEqual %bool %67 %float_0
-OpSelectionMerge %71 None
-OpBranchConditional %68 %70 %71
-%70 = OpLabel
-%72 = OpFunctionCall %bool %test_int
-OpBranch %71
-%71 = OpLabel
-%73 = OpPhi %bool %false %47 %72 %70
-OpSelectionMerge %77 None
-OpBranchConditional %73 %75 %76
-%75 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%80 = OpLoad %v4float %78
-OpStore %74 %80
-OpBranch %77
+%main = OpFunction %v4float None %75
 %76 = OpLabel
-%81 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%82 = OpLoad %v4float %81
-OpStore %74 %82
-OpBranch %77
-%77 = OpLabel
-%83 = OpLoad %v4float %74
-OpReturnValue %83
+%_0_one = OpVariable %_ptr_Function_float Function
+%_1_two = OpVariable %_ptr_Function_float Function
+%_2_result = OpVariable %_ptr_Function_v4float Function
+%136 = OpVariable %_ptr_Function_v4float Function
+OpStore %_0_one %float_1
+OpStore %_1_two %float_2
+%84 = OpAccessChain %_ptr_Function_float %_2_result %int_0
+OpStore %84 %float_1
+%85 = OpAccessChain %_ptr_Function_float %_2_result %int_1
+OpStore %85 %float_1
+%87 = OpLoad %float %_1_two
+%88 = OpCompositeConstruct %v4float %87 %87 %87 %87
+%86 = OpFNegate %v4float %88
+%90 = OpLoad %float %_1_two
+%89 = OpFNegate %float %90
+%92 = OpLoad %float %_1_two
+%91 = OpFNegate %float %92
+%93 = OpCompositeConstruct %v3float %91 %91 %91
+%95 = OpCompositeExtract %float %93 0
+%96 = OpCompositeExtract %float %93 1
+%97 = OpCompositeExtract %float %93 2
+%98 = OpCompositeConstruct %v4float %89 %95 %96 %97
+%99 = OpFOrdEqual %v4bool %86 %98
+%100 = OpAll %bool %99
+%101 = OpSelect %int %100 %int_1 %int_0
+%102 = OpConvertSToF %float %101
+%103 = OpAccessChain %_ptr_Function_float %_2_result %int_2
+OpStore %103 %102
+%108 = OpLoad %float %_0_one
+%109 = OpLoad %float %_1_two
+%110 = OpFSub %float %108 %109
+%111 = OpLoad %float %_1_two
+%112 = OpCompositeConstruct %v2float %110 %111
+%107 = OpFNegate %v2float %112
+%113 = OpFOrdEqual %v2bool %106 %107
+%114 = OpAll %bool %113
+%115 = OpSelect %int %114 %int_1 %int_0
+%116 = OpConvertSToF %float %115
+%117 = OpAccessChain %_ptr_Function_float %_2_result %int_3
+OpStore %117 %116
+%119 = OpLoad %v4float %_2_result
+%120 = OpCompositeExtract %float %119 0
+%121 = OpLoad %v4float %_2_result
+%122 = OpCompositeExtract %float %121 1
+%123 = OpFMul %float %120 %122
+%124 = OpLoad %v4float %_2_result
+%125 = OpCompositeExtract %float %124 2
+%126 = OpFMul %float %123 %125
+%127 = OpLoad %v4float %_2_result
+%128 = OpCompositeExtract %float %127 3
+%129 = OpFMul %float %126 %128
+%130 = OpFUnordNotEqual %bool %129 %float_0
+OpSelectionMerge %133 None
+OpBranchConditional %130 %132 %133
+%132 = OpLabel
+%134 = OpFunctionCall %bool %test_int
+OpBranch %133
+%133 = OpLabel
+%135 = OpPhi %bool %false %76 %134 %132
+OpSelectionMerge %139 None
+OpBranchConditional %135 %137 %138
+%137 = OpLabel
+%140 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%142 = OpLoad %v4float %140
+OpStore %136 %142
+OpBranch %139
+%138 = OpLabel
+%143 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%144 = OpLoad %v4float %143
+OpStore %136 %144
+OpBranch %139
+%139 = OpLabel
+%145 = OpLoad %v4float %136
+OpReturnValue %145
 OpFunctionEnd
diff --git a/tests/sksl/shared/NegatedVectorLiteral.glsl b/tests/sksl/shared/NegatedVectorLiteral.glsl
index 15522e5..475658c 100644
--- a/tests/sksl/shared/NegatedVectorLiteral.glsl
+++ b/tests/sksl/shared/NegatedVectorLiteral.glsl
@@ -3,19 +3,23 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 bool test_int() {
+    int one = 1;
+    const int two = 2;
     ivec4 result;
     result.x = 1;
     result.y = 1;
-    result.z = 1;
-    result.w = 1;
+    result.z = int(-ivec4(two) == ivec4(-2, ivec3(-2)) ? 1 : 0);
+    result.w = int(-ivec2(-one, one + one) == -ivec2(one - two, two) ? 1 : 0);
     return bool(((result.x * result.y) * result.z) * result.w);
 }
 vec4 main() {
-    vec4 _0_result;
-    _0_result.x = 1.0;
-    _0_result.y = 1.0;
-    _0_result.z = 1.0;
-    _0_result.w = 1.0;
-    return bool(((_0_result.x * _0_result.y) * _0_result.z) * _0_result.w) && test_int() ? colorGreen : colorRed;
+    const float _0_one = 1.0;
+    float _1_two = 2.0;
+    vec4 _2_result;
+    _2_result.x = 1.0;
+    _2_result.y = 1.0;
+    _2_result.z = float(-vec4(_1_two) == vec4(-_1_two, vec3(-_1_two)) ? 1 : 0);
+    _2_result.w = float(vec2(1.0, -2.0) == -vec2(_0_one - _1_two, _1_two) ? 1 : 0);
+    return bool(((_2_result.x * _2_result.y) * _2_result.z) * _2_result.w) && test_int() ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/NegatedVectorLiteral.metal b/tests/sksl/shared/NegatedVectorLiteral.metal
index 5eefb38..b3e8842 100644
--- a/tests/sksl/shared/NegatedVectorLiteral.metal
+++ b/tests/sksl/shared/NegatedVectorLiteral.metal
@@ -13,22 +13,26 @@
 
 
 bool test_int() {
+    int one = 1;
+    const int two = 2;
     int4 result;
     result.x = 1;
     result.y = 1;
-    result.z = 1;
-    result.w = 1;
+    result.z = int(all(-int4(two) == int4(-2, int3(-2))) ? 1 : 0);
+    result.w = int(all(-int2(-one, one + one) == -int2(one - two, two)) ? 1 : 0);
     return bool(((result.x * result.y) * result.z) * result.w);
 }
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float4 _0_result;
-    _0_result.x = 1.0;
-    _0_result.y = 1.0;
-    _0_result.z = 1.0;
-    _0_result.w = 1.0;
-    _out.sk_FragColor = bool(((_0_result.x * _0_result.y) * _0_result.z) * _0_result.w) && test_int() ? _uniforms.colorGreen : _uniforms.colorRed;
+    const float _0_one = 1.0;
+    float _1_two = 2.0;
+    float4 _2_result;
+    _2_result.x = 1.0;
+    _2_result.y = 1.0;
+    _2_result.z = float(all(-float4(_1_two) == float4(-_1_two, float3(-_1_two))) ? 1 : 0);
+    _2_result.w = float(all(float2(1.0, -2.0) == -float2(_0_one - _1_two, _1_two)) ? 1 : 0);
+    _out.sk_FragColor = bool(((_2_result.x * _2_result.y) * _2_result.z) * _2_result.w) && test_int() ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
 }
diff --git a/tests/sksl/shared/OperatorsES2.asm.frag b/tests/sksl/shared/OperatorsES2.asm.frag
index cfe58d5..f244e4b 100644
--- a/tests/sksl/shared/OperatorsES2.asm.frag
+++ b/tests/sksl/shared/OperatorsES2.asm.frag
@@ -12,9 +12,12 @@
 OpName %main "main"
 OpName %x "x"
 OpName %y "y"
+OpName %z "z"
+OpName %b "b"
 OpName %c "c"
 OpName %d "d"
 OpName %e "e"
+OpName %f "f"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -27,12 +30,20 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %32 RelaxedPrecision
-OpDecorate %35 RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
-OpDecorate %50 RelaxedPrecision
-OpDecorate %53 RelaxedPrecision
-OpDecorate %60 RelaxedPrecision
+OpDecorate %79 RelaxedPrecision
+OpDecorate %80 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %105 RelaxedPrecision
+OpDecorate %108 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %114 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %147 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -49,15 +60,23 @@
 %_ptr_Function_float = OpTypePointer Function %float
 %float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
-%float_0_5 = OpConstant %float 0.5
+%int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
+%int_3 = OpConstant %int 3
+%int_2 = OpConstant %int 2
+%int_4 = OpConstant %int 4
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
+%float_4 = OpConstant %float 4
+%false = OpConstantFalse %bool
 %float_12 = OpConstant %float 12
 %float_10 = OpConstant %float 10
 %float_6 = OpConstant %float 6
 %float_0 = OpConstant %float 0
+%int_1 = OpConstant %int 1
+%int_6 = OpConstant %int 6
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
@@ -69,45 +88,154 @@
 %19 = OpLabel
 %x = OpVariable %_ptr_Function_float Function
 %y = OpVariable %_ptr_Function_float Function
+%z = OpVariable %_ptr_Function_int Function
+%b = OpVariable %_ptr_Function_bool Function
 %c = OpVariable %_ptr_Function_bool Function
 %d = OpVariable %_ptr_Function_bool Function
 %e = OpVariable %_ptr_Function_bool Function
+%f = OpVariable %_ptr_Function_bool Function
+%136 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_2
-OpStore %x %float_2
-OpStore %y %float_0_5
-%28 = OpExtInst %float %1 Sqrt %float_2
-%29 = OpFOrdGreaterThan %bool %28 %float_2
-OpStore %c %29
-%32 = OpLoad %bool %c
-%33 = OpLogicalNotEqual %bool %true %32
-OpStore %d %33
-%35 = OpLoad %bool %c
-OpStore %e %35
-%36 = OpLoad %float %x
-%38 = OpFAdd %float %36 %float_12
-OpStore %x %38
-%39 = OpLoad %float %x
-%40 = OpFSub %float %39 %float_12
-OpStore %x %40
-%41 = OpLoad %float %x
-%42 = OpLoad %float %y
-%44 = OpFDiv %float %42 %float_10
-OpStore %y %44
-%45 = OpFMul %float %41 %44
-OpStore %x %45
+OpStore %z %int_3
+%29 = OpLoad %float %x
+%30 = OpLoad %float %x
+%31 = OpFSub %float %29 %30
+%32 = OpLoad %float %y
+%33 = OpLoad %float %x
+%34 = OpFMul %float %32 %33
+%35 = OpLoad %float %x
+%36 = OpFMul %float %34 %35
+%37 = OpLoad %float %y
+%38 = OpLoad %float %x
+%39 = OpFSub %float %37 %38
+%40 = OpFMul %float %36 %39
+%41 = OpFAdd %float %31 %40
+OpStore %x %41
+%42 = OpLoad %float %x
+%43 = OpLoad %float %y
+%44 = OpFDiv %float %42 %43
+%45 = OpLoad %float %x
+%46 = OpFDiv %float %44 %45
+OpStore %y %46
+%47 = OpLoad %int %z
+%49 = OpSDiv %int %47 %int_2
+%50 = OpIMul %int %49 %int_3
+%52 = OpIAdd %int %50 %int_4
+%53 = OpISub %int %52 %int_2
+OpStore %z %53
+%57 = OpLoad %float %x
+%59 = OpFOrdGreaterThan %bool %57 %float_4
+%60 = OpLoad %float %x
+%61 = OpFOrdLessThan %bool %60 %float_2
+%62 = OpLogicalEqual %bool %59 %61
+OpSelectionMerge %64 None
+OpBranchConditional %62 %64 %63
+%63 = OpLabel
+%66 = OpExtInst %float %1 Sqrt %float_2
+%67 = OpFOrdGreaterThanEqual %bool %float_2 %66
+OpSelectionMerge %69 None
+OpBranchConditional %67 %68 %69
+%68 = OpLabel
+%70 = OpLoad %float %y
+%71 = OpLoad %float %x
+%72 = OpFOrdLessThanEqual %bool %70 %71
+OpBranch %69
+%69 = OpLabel
+%73 = OpPhi %bool %false %63 %72 %68
+OpBranch %64
+%64 = OpLabel
+%74 = OpPhi %bool %true %19 %73 %69
+OpStore %b %74
+%76 = OpExtInst %float %1 Sqrt %float_2
+%77 = OpFOrdGreaterThan %bool %76 %float_2
+OpStore %c %77
+%79 = OpLoad %bool %b
+%80 = OpLoad %bool %c
+%81 = OpLogicalNotEqual %bool %79 %80
+OpStore %d %81
+%83 = OpLoad %bool %b
+OpSelectionMerge %85 None
+OpBranchConditional %83 %84 %85
+%84 = OpLabel
+%86 = OpLoad %bool %c
+OpBranch %85
+%85 = OpLabel
+%87 = OpPhi %bool %false %64 %86 %84
+OpStore %e %87
+%89 = OpLoad %bool %b
+OpSelectionMerge %91 None
+OpBranchConditional %89 %91 %90
+%90 = OpLabel
+%92 = OpLoad %bool %c
+OpBranch %91
+%91 = OpLabel
+%93 = OpPhi %bool %true %85 %92 %90
+OpStore %f %93
+%94 = OpLoad %float %x
+%96 = OpFAdd %float %94 %float_12
+OpStore %x %96
+%97 = OpLoad %float %x
+%98 = OpFSub %float %97 %float_12
+OpStore %x %98
+%99 = OpLoad %float %x
+%100 = OpLoad %float %y
+%102 = OpFDiv %float %100 %float_10
+OpStore %y %102
+%103 = OpFMul %float %99 %102
+OpStore %x %103
 OpStore %x %float_6
-%47 = OpLoad %bool %c
-%48 = OpSelect %float %47 %float_1 %float_0
-%50 = OpLoad %bool %d
-%51 = OpSelect %float %50 %float_1 %float_0
-%52 = OpFMul %float %48 %51
-%53 = OpLoad %bool %e
-%54 = OpSelect %float %53 %float_1 %float_0
-%55 = OpFMul %float %52 %54
-OpStore %y %55
+%105 = OpLoad %bool %b
+%106 = OpSelect %float %105 %float_1 %float_0
+%108 = OpLoad %bool %c
+%109 = OpSelect %float %108 %float_1 %float_0
+%110 = OpFMul %float %106 %109
+%111 = OpLoad %bool %d
+%112 = OpSelect %float %111 %float_1 %float_0
+%113 = OpFMul %float %110 %112
+%114 = OpLoad %bool %e
+%115 = OpSelect %float %114 %float_1 %float_0
+%116 = OpFMul %float %113 %115
+%117 = OpLoad %bool %f
+%118 = OpSelect %float %117 %float_1 %float_0
+%119 = OpFMul %float %116 %118
+OpStore %y %119
 OpStore %y %float_6
-%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%60 = OpLoad %v4float %56
-OpReturnValue %60
+%120 = OpLoad %int %z
+%122 = OpISub %int %120 %int_1
+OpStore %z %122
+OpStore %z %int_6
+%124 = OpLoad %float %x
+%125 = OpFOrdEqual %bool %124 %float_6
+OpSelectionMerge %127 None
+OpBranchConditional %125 %126 %127
+%126 = OpLabel
+%128 = OpLoad %float %y
+%129 = OpFOrdEqual %bool %128 %float_6
+OpBranch %127
+%127 = OpLabel
+%130 = OpPhi %bool %false %91 %129 %126
+OpSelectionMerge %132 None
+OpBranchConditional %130 %131 %132
+%131 = OpLabel
+%133 = OpLoad %int %z
+%134 = OpIEqual %bool %133 %int_6
+OpBranch %132
+%132 = OpLabel
+%135 = OpPhi %bool %false %127 %134 %131
+OpSelectionMerge %140 None
+OpBranchConditional %135 %138 %139
+%138 = OpLabel
+%141 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%144 = OpLoad %v4float %141
+OpStore %136 %144
+OpBranch %140
+%139 = OpLabel
+%145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%146 = OpLoad %v4float %145
+OpStore %136 %146
+OpBranch %140
+%140 = OpLabel
+%147 = OpLoad %v4float %136
+OpReturnValue %147
 OpFunctionEnd
diff --git a/tests/sksl/shared/OperatorsES2.glsl b/tests/sksl/shared/OperatorsES2.glsl
index 1376e86..192ae99 100644
--- a/tests/sksl/shared/OperatorsES2.glsl
+++ b/tests/sksl/shared/OperatorsES2.glsl
@@ -6,16 +6,22 @@
     float x = 1.0;
     float y = 2.0;
 
-    x = 2.0;
-    y = 0.5;
+    int z = 3;
+    x = (x - x) + ((y * x) * x) * (y - x);
+    y = (x / y) / x;
+    z = ((z / 2) * 3 + 4) - 2;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
     bool c = sqrt(2.0) > 2.0;
-    bool d = true ^^ c;
-    bool e = c;
+    bool d = b ^^ c;
+    bool e = b && c;
+    bool f = b || c;
     x += 12.0;
     x -= 12.0;
     x *= (y /= 10.0);
     x = 6.0;
-    y = (float(c) * float(d)) * float(e);
+    y = (((float(b) * float(c)) * float(d)) * float(e)) * float(f);
     y = 6.0;
-    return colorGreen;
+    z = z - 1;
+    z = 6;
+    return (x == 6.0 && y == 6.0) && z == 6 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/OperatorsES2.metal b/tests/sksl/shared/OperatorsES2.metal
index 973b430..c56f31f 100644
--- a/tests/sksl/shared/OperatorsES2.metal
+++ b/tests/sksl/shared/OperatorsES2.metal
@@ -18,17 +18,23 @@
     float x = 1.0;
     float y = 2.0;
 
-    x = 2.0;
-    y = 0.5;
+    int z = 3;
+    x = (x - x) + ((y * x) * x) * (y - x);
+    y = (x / y) / x;
+    z = ((z / 2) * 3 + 4) - 2;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
     bool c = sqrt(2.0) > 2.0;
-    bool d = true != c;
-    bool e = c;
+    bool d = b != c;
+    bool e = b && c;
+    bool f = b || c;
     x += 12.0;
     x -= 12.0;
     x *= (y /= 10.0);
     x = 6.0;
-    y = (float(c) * float(d)) * float(e);
+    y = (((float(b) * float(c)) * float(d)) * float(e)) * float(f);
     y = 6.0;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    z = z - 1;
+    z = 6;
+    _out.sk_FragColor = (x == 6.0 && y == 6.0) && z == 6 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/OperatorsES3.asm.frag b/tests/sksl/shared/OperatorsES3.asm.frag
index a31484a..2d30582 100644
--- a/tests/sksl/shared/OperatorsES3.asm.frag
+++ b/tests/sksl/shared/OperatorsES3.asm.frag
@@ -13,6 +13,11 @@
 OpName %x "x"
 OpName %y "y"
 OpName %z "z"
+OpName %b "b"
+OpName %c "c"
+OpName %d "d"
+OpName %e "e"
+OpName %f "f"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,7 +30,15 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %62 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
+OpDecorate %142 RelaxedPrecision
+OpDecorate %144 RelaxedPrecision
+OpDecorate %145 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,17 +58,21 @@
 %int = OpTypeInt 32 1
 %_ptr_Function_int = OpTypePointer Function %int
 %int_3 = OpConstant %int 3
-%float_0_5 = OpConstant %float 0.5
-%int_8 = OpConstant %int 8
+%int_2 = OpConstant %int 2
+%int_4 = OpConstant %int 4
+%int_1 = OpConstant %int 1
+%_ptr_Function_bool = OpTypePointer Function %bool
+%true = OpConstantTrue %bool
+%float_4 = OpConstant %float 4
+%false = OpConstantFalse %bool
 %float_12 = OpConstant %float 12
 %float_10 = OpConstant %float 10
 %int_0 = OpConstant %int 0
 %int_n1 = OpConstant %int -1
-%int_2 = OpConstant %int 2
-%int_4 = OpConstant %int 4
 %int_5 = OpConstant %int 5
 %float_6 = OpConstant %float 6
 %int_6 = OpConstant %int 6
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
@@ -68,46 +85,154 @@
 %x = OpVariable %_ptr_Function_float Function
 %y = OpVariable %_ptr_Function_float Function
 %z = OpVariable %_ptr_Function_int Function
+%b = OpVariable %_ptr_Function_bool Function
+%c = OpVariable %_ptr_Function_bool Function
+%d = OpVariable %_ptr_Function_bool Function
+%e = OpVariable %_ptr_Function_bool Function
+%f = OpVariable %_ptr_Function_bool Function
+%135 = OpVariable %_ptr_Function_v4float Function
 OpStore %x %float_1
 OpStore %y %float_2
 OpStore %z %int_3
-OpStore %x %float_2
-OpStore %y %float_0_5
-OpStore %z %int_8
-%31 = OpLoad %float %x
-%33 = OpFAdd %float %31 %float_12
-OpStore %x %33
-%34 = OpLoad %float %x
-%35 = OpFSub %float %34 %float_12
-OpStore %x %35
-%36 = OpLoad %float %x
+%29 = OpLoad %float %x
+%30 = OpLoad %float %x
+%31 = OpFSub %float %29 %30
+%32 = OpLoad %float %y
+%33 = OpLoad %float %x
+%34 = OpFMul %float %32 %33
+%35 = OpLoad %float %x
+%36 = OpFMul %float %34 %35
 %37 = OpLoad %float %y
-%39 = OpFDiv %float %37 %float_10
-OpStore %y %39
+%38 = OpLoad %float %x
+%39 = OpFSub %float %37 %38
 %40 = OpFMul %float %36 %39
-OpStore %x %40
-%41 = OpLoad %int %z
-%43 = OpBitwiseOr %int %41 %int_0
-OpStore %z %43
-%44 = OpLoad %int %z
-%46 = OpBitwiseAnd %int %44 %int_n1
-OpStore %z %46
+%41 = OpFAdd %float %31 %40
+OpStore %x %41
+%42 = OpLoad %float %x
+%43 = OpLoad %float %y
+%44 = OpFDiv %float %42 %43
+%45 = OpLoad %float %x
+%46 = OpFDiv %float %44 %45
+OpStore %y %46
 %47 = OpLoad %int %z
-%48 = OpBitwiseXor %int %47 %int_0
-OpStore %z %48
-%49 = OpLoad %int %z
-%51 = OpShiftRightArithmetic %int %49 %int_2
-OpStore %z %51
-%52 = OpLoad %int %z
-%54 = OpShiftLeftLogical %int %52 %int_4
-OpStore %z %54
-%55 = OpLoad %int %z
-%57 = OpSMod %int %55 %int_5
-OpStore %z %57
+%49 = OpSDiv %int %47 %int_2
+%50 = OpSMod %int %49 %int_3
+%52 = OpShiftLeftLogical %int %50 %int_4
+%53 = OpShiftRightArithmetic %int %52 %int_2
+%55 = OpShiftLeftLogical %int %53 %int_1
+OpStore %z %55
+%59 = OpLoad %float %x
+%61 = OpFOrdGreaterThan %bool %59 %float_4
+%62 = OpLoad %float %x
+%63 = OpFOrdLessThan %bool %62 %float_2
+%64 = OpLogicalEqual %bool %61 %63
+OpSelectionMerge %66 None
+OpBranchConditional %64 %66 %65
+%65 = OpLabel
+%68 = OpExtInst %float %1 Sqrt %float_2
+%69 = OpFOrdGreaterThanEqual %bool %float_2 %68
+OpSelectionMerge %71 None
+OpBranchConditional %69 %70 %71
+%70 = OpLabel
+%72 = OpLoad %float %y
+%73 = OpLoad %float %x
+%74 = OpFOrdLessThanEqual %bool %72 %73
+OpBranch %71
+%71 = OpLabel
+%75 = OpPhi %bool %false %65 %74 %70
+OpBranch %66
+%66 = OpLabel
+%76 = OpPhi %bool %true %19 %75 %71
+OpStore %b %76
+%78 = OpExtInst %float %1 Sqrt %float_2
+%79 = OpFOrdGreaterThan %bool %78 %float_2
+OpStore %c %79
+%81 = OpLoad %bool %b
+%82 = OpLoad %bool %c
+%83 = OpLogicalNotEqual %bool %81 %82
+OpStore %d %83
+%85 = OpLoad %bool %b
+OpSelectionMerge %87 None
+OpBranchConditional %85 %86 %87
+%86 = OpLabel
+%88 = OpLoad %bool %c
+OpBranch %87
+%87 = OpLabel
+%89 = OpPhi %bool %false %66 %88 %86
+OpStore %e %89
+%91 = OpLoad %bool %b
+OpSelectionMerge %93 None
+OpBranchConditional %91 %93 %92
+%92 = OpLabel
+%94 = OpLoad %bool %c
+OpBranch %93
+%93 = OpLabel
+%95 = OpPhi %bool %true %87 %94 %92
+OpStore %f %95
+%96 = OpLoad %float %x
+%98 = OpFAdd %float %96 %float_12
+OpStore %x %98
+%99 = OpLoad %float %x
+%100 = OpFSub %float %99 %float_12
+OpStore %x %100
+%101 = OpLoad %float %x
+%102 = OpLoad %float %y
+%104 = OpFDiv %float %102 %float_10
+OpStore %y %104
+%105 = OpFMul %float %101 %104
+OpStore %x %105
+%106 = OpLoad %int %z
+%108 = OpBitwiseOr %int %106 %int_0
+OpStore %z %108
+%109 = OpLoad %int %z
+%111 = OpBitwiseAnd %int %109 %int_n1
+OpStore %z %111
+%112 = OpLoad %int %z
+%113 = OpBitwiseXor %int %112 %int_0
+OpStore %z %113
+%114 = OpLoad %int %z
+%115 = OpShiftRightArithmetic %int %114 %int_2
+OpStore %z %115
+%116 = OpLoad %int %z
+%117 = OpShiftLeftLogical %int %116 %int_4
+OpStore %z %117
+%118 = OpLoad %int %z
+%120 = OpSMod %int %118 %int_5
+OpStore %z %120
 OpStore %x %float_6
 OpStore %y %float_6
 OpStore %z %int_6
-%60 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%62 = OpLoad %v4float %60
-OpReturnValue %62
+%123 = OpLoad %float %x
+%124 = OpFOrdEqual %bool %123 %float_6
+OpSelectionMerge %126 None
+OpBranchConditional %124 %125 %126
+%125 = OpLabel
+%127 = OpLoad %float %y
+%128 = OpFOrdEqual %bool %127 %float_6
+OpBranch %126
+%126 = OpLabel
+%129 = OpPhi %bool %false %93 %128 %125
+OpSelectionMerge %131 None
+OpBranchConditional %129 %130 %131
+%130 = OpLabel
+%132 = OpLoad %int %z
+%133 = OpIEqual %bool %132 %int_6
+OpBranch %131
+%131 = OpLabel
+%134 = OpPhi %bool %false %126 %133 %130
+OpSelectionMerge %139 None
+OpBranchConditional %134 %137 %138
+%137 = OpLabel
+%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%142 = OpLoad %v4float %140
+OpStore %135 %142
+OpBranch %139
+%138 = OpLabel
+%143 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%144 = OpLoad %v4float %143
+OpStore %135 %144
+OpBranch %139
+%139 = OpLabel
+%145 = OpLoad %v4float %135
+OpReturnValue %145
 OpFunctionEnd
diff --git a/tests/sksl/shared/OperatorsES3.glsl b/tests/sksl/shared/OperatorsES3.glsl
index ab4bb55..cae4c92 100644
--- a/tests/sksl/shared/OperatorsES3.glsl
+++ b/tests/sksl/shared/OperatorsES3.glsl
@@ -7,9 +7,14 @@
     float y = 2.0;
 
     int z = 3;
-    x = 2.0;
-    y = 0.5;
-    z = 8;
+    x = (x - x) + ((y * x) * x) * (y - x);
+    y = (x / y) / x;
+    z = (((z / 2) % 3 << 4) >> 2) << 1;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
+    bool c = sqrt(2.0) > 2.0;
+    bool d = b ^^ c;
+    bool e = b && c;
+    bool f = b || c;
     x += 12.0;
     x -= 12.0;
     x *= (y /= 10.0);
@@ -22,5 +27,5 @@
     x = 6.0;
     y = 6.0;
     z = 6;
-    return colorGreen;
+    return (x == 6.0 && y == 6.0) && z == 6 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/OperatorsES3.metal b/tests/sksl/shared/OperatorsES3.metal
index 4d9a9b9..d9e3c42 100644
--- a/tests/sksl/shared/OperatorsES3.metal
+++ b/tests/sksl/shared/OperatorsES3.metal
@@ -19,9 +19,14 @@
     float y = 2.0;
 
     int z = 3;
-    x = 2.0;
-    y = 0.5;
-    z = 8;
+    x = (x - x) + ((y * x) * x) * (y - x);
+    y = (x / y) / x;
+    z = (((z / 2) % 3 << 4) >> 2) << 1;
+    bool b = x > 4.0 == x < 2.0 || 2.0 >= sqrt(2.0) && y <= x;
+    bool c = sqrt(2.0) > 2.0;
+    bool d = b != c;
+    bool e = b && c;
+    bool f = b || c;
     x += 12.0;
     x -= 12.0;
     x *= (y /= 10.0);
@@ -34,6 +39,6 @@
     x = 6.0;
     y = 6.0;
     z = 6;
-    _out.sk_FragColor = _uniforms.colorGreen;
+    _out.sk_FragColor = (x == 6.0 && y == 6.0) && z == 6 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/Ossfuzz26167.asm.frag b/tests/sksl/shared/Ossfuzz26167.asm.frag
index b4a67d5..b2b4c28 100644
--- a/tests/sksl/shared/Ossfuzz26167.asm.frag
+++ b/tests/sksl/shared/Ossfuzz26167.asm.frag
@@ -5,6 +5,8 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %_0_y "_0_y"
+OpName %_1_z "_1_z"
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 %bool = OpTypeBool
@@ -12,7 +14,16 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %7 = OpTypeFunction %void
+%float = OpTypeFloat 32
+%_ptr_Function_float = OpTypePointer Function %float
+%float_0 = OpConstant %float 0
+%false = OpConstantFalse %bool
 %main = OpFunction %void None %7
 %8 = OpLabel
+%_0_y = OpVariable %_ptr_Function_float Function
+%_1_z = OpVariable %_ptr_Function_float Function
+OpStore %_0_y %float_0
+%14 = OpLoad %float %_0_y
+OpStore %_1_z %14
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Ossfuzz26167.glsl b/tests/sksl/shared/Ossfuzz26167.glsl
index 2933520..ff4f6ca 100644
--- a/tests/sksl/shared/Ossfuzz26167.glsl
+++ b/tests/sksl/shared/Ossfuzz26167.glsl
@@ -1,3 +1,9 @@
 
 void main() {
+    float _0_y = 0.0;
+    float _1_z = _0_y;
+
+
+    false;
+
 }
diff --git a/tests/sksl/shared/Ossfuzz26167.metal b/tests/sksl/shared/Ossfuzz26167.metal
index 2402b80..6d40f3b 100644
--- a/tests/sksl/shared/Ossfuzz26167.metal
+++ b/tests/sksl/shared/Ossfuzz26167.metal
@@ -9,5 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float _0_y = 0.0;
+    float _1_z = _0_y;
+
+
+    false;
+
     return _out;
 }
diff --git a/tests/sksl/shared/Ossfuzz28794.asm.frag b/tests/sksl/shared/Ossfuzz28794.asm.frag
index 569dba1..11517a9 100644
--- a/tests/sksl/shared/Ossfuzz28794.asm.frag
+++ b/tests/sksl/shared/Ossfuzz28794.asm.frag
@@ -25,7 +25,6 @@
 %_ptr_Function_int = OpTypePointer Function %int
 %float_1 = OpConstant %float 1
 %int_3 = OpConstant %int 3
-%float_3 = OpConstant %float 3
 %_ptr_Output_float = OpTypePointer Output %float
 %int_0 = OpConstant %int 0
 %main = OpFunction %void None %11
@@ -37,7 +36,9 @@
 %19 = OpLoad %int %i
 OpStore %i %int_3
 %21 = OpIMul %int %19 %int_3
-%23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %23 %float_3
+%22 = OpLoad %int %i
+%23 = OpConvertSToF %float %22
+%24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
+OpStore %24 %23
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Ossfuzz28794.glsl b/tests/sksl/shared/Ossfuzz28794.glsl
index baefdb9..d9a11c0 100644
--- a/tests/sksl/shared/Ossfuzz28794.glsl
+++ b/tests/sksl/shared/Ossfuzz28794.glsl
@@ -3,5 +3,5 @@
 void main() {
     int i = int(sqrt(1.0));
     i * (i = 3);
-    sk_FragColor.x = 3.0;
+    sk_FragColor.x = float(i);
 }
diff --git a/tests/sksl/shared/Ossfuzz28794.metal b/tests/sksl/shared/Ossfuzz28794.metal
index d8bd850..210ba53 100644
--- a/tests/sksl/shared/Ossfuzz28794.metal
+++ b/tests/sksl/shared/Ossfuzz28794.metal
@@ -11,6 +11,6 @@
     (void)_out;
     int i = int(sqrt(1.0));
     i * (i = 3);
-    _out.sk_FragColor.x = 3.0;
+    _out.sk_FragColor.x = float(i);
     return _out;
 }
diff --git a/tests/sksl/shared/Ossfuzz28904.asm.frag b/tests/sksl/shared/Ossfuzz28904.asm.frag
index 89d4085..6777fea 100644
--- a/tests/sksl/shared/Ossfuzz28904.asm.frag
+++ b/tests/sksl/shared/Ossfuzz28904.asm.frag
@@ -20,10 +20,11 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%false = OpConstantFalse %bool
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%15 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+OpStore %sk_FragColor %15
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Ossfuzz28904.glsl b/tests/sksl/shared/Ossfuzz28904.glsl
index 604f63c..3c6fe9a 100644
--- a/tests/sksl/shared/Ossfuzz28904.glsl
+++ b/tests/sksl/shared/Ossfuzz28904.glsl
@@ -1,5 +1,7 @@
 
 out vec4 sk_FragColor;
 void main() {
+    false;
+
     sk_FragColor = vec4(0.0);
 }
diff --git a/tests/sksl/shared/Ossfuzz28904.metal b/tests/sksl/shared/Ossfuzz28904.metal
index 2e1f57e..47b6cbd 100644
--- a/tests/sksl/shared/Ossfuzz28904.metal
+++ b/tests/sksl/shared/Ossfuzz28904.metal
@@ -9,6 +9,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    false;
+
     _out.sk_FragColor = float4(0.0);
     return _out;
 }
diff --git a/tests/sksl/shared/Ossfuzz29494.asm.frag b/tests/sksl/shared/Ossfuzz29494.asm.frag
index 89d4085..6777fea 100644
--- a/tests/sksl/shared/Ossfuzz29494.asm.frag
+++ b/tests/sksl/shared/Ossfuzz29494.asm.frag
@@ -20,10 +20,11 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%false = OpConstantFalse %bool
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%15 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+OpStore %sk_FragColor %15
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/Ossfuzz29494.glsl b/tests/sksl/shared/Ossfuzz29494.glsl
index 604f63c..3c6fe9a 100644
--- a/tests/sksl/shared/Ossfuzz29494.glsl
+++ b/tests/sksl/shared/Ossfuzz29494.glsl
@@ -1,5 +1,7 @@
 
 out vec4 sk_FragColor;
 void main() {
+    false;
+
     sk_FragColor = vec4(0.0);
 }
diff --git a/tests/sksl/shared/Ossfuzz29494.metal b/tests/sksl/shared/Ossfuzz29494.metal
index 2e1f57e..47b6cbd 100644
--- a/tests/sksl/shared/Ossfuzz29494.metal
+++ b/tests/sksl/shared/Ossfuzz29494.metal
@@ -9,6 +9,8 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    false;
+
     _out.sk_FragColor = float4(0.0);
     return _out;
 }
diff --git a/tests/sksl/shared/OutParams.asm.frag b/tests/sksl/shared/OutParams.asm.frag
index ce722fd..3e6164a 100644
--- a/tests/sksl/shared/OutParams.asm.frag
+++ b/tests/sksl/shared/OutParams.asm.frag
@@ -11,6 +11,7 @@
 OpMemberName %_UniformBuffer 2 "colorWhite"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %result "result"
 OpName %h "h"
 OpName %h2 "h2"
 OpName %h3 "h3"
@@ -48,83 +49,84 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %26 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
-OpDecorate %39 RelaxedPrecision
-OpDecorate %45 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %54 RelaxedPrecision
-OpDecorate %58 RelaxedPrecision
+OpDecorate %28 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %42 RelaxedPrecision
+OpDecorate %47 RelaxedPrecision
+OpDecorate %51 RelaxedPrecision
+OpDecorate %56 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
-OpDecorate %64 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
+OpDecorate %62 RelaxedPrecision
+OpDecorate %66 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
+OpDecorate %75 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
 OpDecorate %73 RelaxedPrecision
-OpDecorate %74 RelaxedPrecision
-OpDecorate %71 RelaxedPrecision
-OpDecorate %71 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
-OpDecorate %82 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
 OpDecorate %84 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %81 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
 OpDecorate %94 RelaxedPrecision
 OpDecorate %95 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
-OpDecorate %91 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
 OpDecorate %97 RelaxedPrecision
-OpDecorate %102 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %116 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
-OpDecorate %131 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
-OpDecorate %151 RelaxedPrecision
-OpDecorate %157 RelaxedPrecision
-OpDecorate %161 RelaxedPrecision
-OpDecorate %166 RelaxedPrecision
-OpDecorate %171 RelaxedPrecision
-OpDecorate %175 RelaxedPrecision
-OpDecorate %181 RelaxedPrecision
-OpDecorate %186 RelaxedPrecision
-OpDecorate %193 RelaxedPrecision
-OpDecorate %201 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
-OpDecorate %216 RelaxedPrecision
-OpDecorate %223 RelaxedPrecision
-OpDecorate %231 RelaxedPrecision
-OpDecorate %239 RelaxedPrecision
-OpDecorate %244 RelaxedPrecision
-OpDecorate %249 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %93 RelaxedPrecision
+OpDecorate %99 RelaxedPrecision
+OpDecorate %104 RelaxedPrecision
+OpDecorate %110 RelaxedPrecision
+OpDecorate %118 RelaxedPrecision
+OpDecorate %125 RelaxedPrecision
+OpDecorate %133 RelaxedPrecision
+OpDecorate %141 RelaxedPrecision
+OpDecorate %146 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
+OpDecorate %163 RelaxedPrecision
+OpDecorate %168 RelaxedPrecision
+OpDecorate %173 RelaxedPrecision
+OpDecorate %177 RelaxedPrecision
+OpDecorate %183 RelaxedPrecision
+OpDecorate %188 RelaxedPrecision
+OpDecorate %195 RelaxedPrecision
+OpDecorate %203 RelaxedPrecision
+OpDecorate %211 RelaxedPrecision
+OpDecorate %218 RelaxedPrecision
+OpDecorate %225 RelaxedPrecision
+OpDecorate %233 RelaxedPrecision
+OpDecorate %241 RelaxedPrecision
+OpDecorate %246 RelaxedPrecision
 OpDecorate %251 RelaxedPrecision
-OpDecorate %258 RelaxedPrecision
+OpDecorate %253 RelaxedPrecision
 OpDecorate %259 RelaxedPrecision
-OpDecorate %261 RelaxedPrecision
-OpDecorate %262 RelaxedPrecision
+OpDecorate %263 RelaxedPrecision
 OpDecorate %264 RelaxedPrecision
-OpDecorate %265 RelaxedPrecision
+OpDecorate %266 RelaxedPrecision
 OpDecorate %267 RelaxedPrecision
 OpDecorate %269 RelaxedPrecision
-OpDecorate %271 RelaxedPrecision
-OpDecorate %273 RelaxedPrecision
-OpDecorate %275 RelaxedPrecision
-OpDecorate %277 RelaxedPrecision
-OpDecorate %279 RelaxedPrecision
+OpDecorate %270 RelaxedPrecision
+OpDecorate %272 RelaxedPrecision
+OpDecorate %274 RelaxedPrecision
+OpDecorate %276 RelaxedPrecision
+OpDecorate %278 RelaxedPrecision
+OpDecorate %280 RelaxedPrecision
 OpDecorate %282 RelaxedPrecision
-OpDecorate %309 RelaxedPrecision
-OpDecorate %324 RelaxedPrecision
-OpDecorate %327 RelaxedPrecision
-OpDecorate %330 RelaxedPrecision
+OpDecorate %284 RelaxedPrecision
+OpDecorate %287 RelaxedPrecision
+OpDecorate %314 RelaxedPrecision
+OpDecorate %329 RelaxedPrecision
+OpDecorate %332 RelaxedPrecision
 OpDecorate %335 RelaxedPrecision
 OpDecorate %340 RelaxedPrecision
-OpDecorate %344 RelaxedPrecision
-OpDecorate %350 RelaxedPrecision
-OpDecorate %352 RelaxedPrecision
-OpDecorate %353 RelaxedPrecision
+OpDecorate %345 RelaxedPrecision
+OpDecorate %349 RelaxedPrecision
+OpDecorate %355 RelaxedPrecision
+OpDecorate %357 RelaxedPrecision
+OpDecorate %358 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -138,15 +140,16 @@
 %void = OpTypeVoid
 %15 = OpTypeFunction %void
 %18 = OpTypeFunction %v4float
+%_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Function_float = OpTypePointer Function %float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_2 = OpConstant %int 2
+%false = OpConstantFalse %bool
 %v2float = OpTypeVector %float 2
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %v3float = OpTypeVector %float 3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
-%_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %mat2v2float = OpTypeMatrix %v2float 2
 %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
@@ -173,7 +176,6 @@
 %_ptr_Function_v4bool = OpTypePointer Function %v4bool
 %true = OpConstantTrue %bool
 %float_1 = OpConstant %float 1
-%false = OpConstantFalse %bool
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -182,6 +184,7 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
+%result = OpVariable %_ptr_Function_v4float Function
 %h = OpVariable %_ptr_Function_float Function
 %h2 = OpVariable %_ptr_Function_v2float Function
 %h3 = OpVariable %_ptr_Function_v3float Function
@@ -205,344 +208,351 @@
 %b3 = OpVariable %_ptr_Function_v3bool Function
 %b4 = OpVariable %_ptr_Function_v4bool Function
 %ok = OpVariable %_ptr_Function_bool Function
-%345 = OpVariable %_ptr_Function_v4float Function
-%22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%26 = OpLoad %v4float %22
-%27 = OpCompositeExtract %float %26 0
-OpStore %h %27
-%31 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%32 = OpLoad %v4float %31
-%33 = OpCompositeExtract %float %32 1
-%34 = OpCompositeConstruct %v2float %33 %33
-OpStore %h2 %34
-%38 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%39 = OpLoad %v4float %38
-%40 = OpCompositeExtract %float %39 2
-%41 = OpCompositeConstruct %v3float %40 %40 %40
-OpStore %h3 %41
-%44 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%45 = OpLoad %v4float %44
-%46 = OpCompositeExtract %float %45 3
-%47 = OpCompositeConstruct %v4float %46 %46 %46 %46
-OpStore %h4 %47
-%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%49 = OpLoad %v4float %48
-%50 = OpCompositeExtract %float %49 0
-%51 = OpAccessChain %_ptr_Function_float %h3 %int_1
-OpStore %51 %50
-%53 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%54 = OpLoad %v4float %53
-%55 = OpCompositeExtract %float %54 1
-%56 = OpCompositeConstruct %v2float %55 %55
-%57 = OpLoad %v3float %h3
-%58 = OpVectorShuffle %v3float %57 %56 3 1 4
-OpStore %h3 %58
-%59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%60 = OpLoad %v4float %59
-%61 = OpCompositeExtract %float %60 3
-%62 = OpCompositeConstruct %v4float %61 %61 %61 %61
-%63 = OpLoad %v4float %h4
-%64 = OpVectorShuffle %v4float %63 %62 6 7 4 5
-OpStore %h4 %64
-%68 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%69 = OpLoad %v4float %68
-%70 = OpCompositeExtract %float %69 0
-%73 = OpCompositeConstruct %v2float %70 %float_0
-%74 = OpCompositeConstruct %v2float %float_0 %70
-%71 = OpCompositeConstruct %mat2v2float %73 %74
-OpStore %h2x2 %71
-%78 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%79 = OpLoad %v4float %78
-%80 = OpCompositeExtract %float %79 1
-%82 = OpCompositeConstruct %v3float %80 %float_0 %float_0
-%83 = OpCompositeConstruct %v3float %float_0 %80 %float_0
-%84 = OpCompositeConstruct %v3float %float_0 %float_0 %80
-%81 = OpCompositeConstruct %mat3v3float %82 %83 %84
-OpStore %h3x3 %81
-%88 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%89 = OpLoad %v4float %88
-%90 = OpCompositeExtract %float %89 2
-%92 = OpCompositeConstruct %v4float %90 %float_0 %float_0 %float_0
-%93 = OpCompositeConstruct %v4float %float_0 %90 %float_0 %float_0
-%94 = OpCompositeConstruct %v4float %float_0 %float_0 %90 %float_0
-%95 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %90
-%91 = OpCompositeConstruct %mat4v4float %92 %93 %94 %95
-OpStore %h4x4 %91
-%96 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%97 = OpLoad %v4float %96
-%98 = OpCompositeExtract %float %97 2
-%99 = OpCompositeConstruct %v3float %98 %98 %98
-%100 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_1
-OpStore %100 %99
-%101 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%102 = OpLoad %v4float %101
-%103 = OpCompositeExtract %float %102 0
-%105 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_3
-%106 = OpAccessChain %_ptr_Function_float %105 %int_3
-OpStore %106 %103
-%107 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%108 = OpLoad %v4float %107
-%109 = OpCompositeExtract %float %108 0
-%111 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0
-%112 = OpAccessChain %_ptr_Function_float %111 %int_0
-OpStore %112 %109
-%115 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%116 = OpLoad %v4float %115
-%117 = OpCompositeExtract %float %116 0
-%118 = OpConvertFToS %int %117
-OpStore %i %118
-%122 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%123 = OpLoad %v4float %122
-%124 = OpCompositeExtract %float %123 1
-%125 = OpConvertFToS %int %124
-%126 = OpCompositeConstruct %v2int %125 %125
-OpStore %i2 %126
-%130 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%131 = OpLoad %v4float %130
-%132 = OpCompositeExtract %float %131 2
-%133 = OpConvertFToS %int %132
-%134 = OpCompositeConstruct %v3int %133 %133 %133
-OpStore %i3 %134
-%138 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%139 = OpLoad %v4float %138
-%140 = OpCompositeExtract %float %139 3
-%141 = OpConvertFToS %int %140
-%142 = OpCompositeConstruct %v4int %141 %141 %141 %141
-OpStore %i4 %142
-%143 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%144 = OpLoad %v4float %143
-%145 = OpCompositeExtract %float %144 2
-%146 = OpConvertFToS %int %145
-%147 = OpCompositeConstruct %v3int %146 %146 %146
-%148 = OpLoad %v4int %i4
-%149 = OpVectorShuffle %v4int %148 %147 4 5 6 3
-OpStore %i4 %149
-%150 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%151 = OpLoad %v4float %150
-%152 = OpCompositeExtract %float %151 0
-%153 = OpConvertFToS %int %152
-%154 = OpAccessChain %_ptr_Function_int %i2 %int_1
-OpStore %154 %153
-%156 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%157 = OpLoad %v4float %156
-%158 = OpCompositeExtract %float %157 0
-OpStore %f %158
-%160 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%161 = OpLoad %v4float %160
-%162 = OpCompositeExtract %float %161 1
-%163 = OpCompositeConstruct %v2float %162 %162
-OpStore %f2 %163
-%165 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%166 = OpLoad %v4float %165
-%167 = OpCompositeExtract %float %166 2
-%168 = OpCompositeConstruct %v3float %167 %167 %167
-OpStore %f3 %168
-%170 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%171 = OpLoad %v4float %170
-%172 = OpCompositeExtract %float %171 3
-%173 = OpCompositeConstruct %v4float %172 %172 %172 %172
-OpStore %f4 %173
-%174 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%175 = OpLoad %v4float %174
-%176 = OpCompositeExtract %float %175 1
-%177 = OpCompositeConstruct %v2float %176 %176
-%178 = OpLoad %v3float %f3
-%179 = OpVectorShuffle %v3float %178 %177 3 4 2
-OpStore %f3 %179
-%180 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%181 = OpLoad %v4float %180
-%182 = OpCompositeExtract %float %181 0
-%183 = OpAccessChain %_ptr_Function_float %f2 %int_0
-OpStore %183 %182
-%185 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%186 = OpLoad %v4float %185
-%187 = OpCompositeExtract %float %186 0
-%189 = OpCompositeConstruct %v2float %187 %float_0
-%190 = OpCompositeConstruct %v2float %float_0 %187
-%188 = OpCompositeConstruct %mat2v2float %189 %190
-OpStore %f2x2 %188
-%192 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%193 = OpLoad %v4float %192
-%194 = OpCompositeExtract %float %193 1
-%196 = OpCompositeConstruct %v3float %194 %float_0 %float_0
-%197 = OpCompositeConstruct %v3float %float_0 %194 %float_0
-%198 = OpCompositeConstruct %v3float %float_0 %float_0 %194
-%195 = OpCompositeConstruct %mat3v3float %196 %197 %198
-OpStore %f3x3 %195
-%200 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%201 = OpLoad %v4float %200
-%202 = OpCompositeExtract %float %201 2
-%204 = OpCompositeConstruct %v4float %202 %float_0 %float_0 %float_0
-%205 = OpCompositeConstruct %v4float %float_0 %202 %float_0 %float_0
-%206 = OpCompositeConstruct %v4float %float_0 %float_0 %202 %float_0
-%207 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %202
-%203 = OpCompositeConstruct %mat4v4float %204 %205 %206 %207
-OpStore %f4x4 %203
-%208 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%209 = OpLoad %v4float %208
-%210 = OpCompositeExtract %float %209 0
-%211 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0
-%212 = OpAccessChain %_ptr_Function_float %211 %int_0
-OpStore %212 %210
-%215 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%216 = OpLoad %v4float %215
-%217 = OpCompositeExtract %float %216 0
-%218 = OpFUnordNotEqual %bool %217 %float_0
-OpStore %b %218
-%222 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%223 = OpLoad %v4float %222
-%224 = OpCompositeExtract %float %223 1
-%225 = OpFUnordNotEqual %bool %224 %float_0
-%226 = OpCompositeConstruct %v2bool %225 %225
-OpStore %b2 %226
-%230 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%231 = OpLoad %v4float %230
-%232 = OpCompositeExtract %float %231 2
-%233 = OpFUnordNotEqual %bool %232 %float_0
-%234 = OpCompositeConstruct %v3bool %233 %233 %233
-OpStore %b3 %234
-%238 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%239 = OpLoad %v4float %238
-%240 = OpCompositeExtract %float %239 3
-%241 = OpFUnordNotEqual %bool %240 %float_0
-%242 = OpCompositeConstruct %v4bool %241 %241 %241 %241
-OpStore %b4 %242
-%243 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%244 = OpLoad %v4float %243
-%245 = OpCompositeExtract %float %244 1
-%246 = OpFUnordNotEqual %bool %245 %float_0
-%247 = OpCompositeConstruct %v2bool %246 %246
-%248 = OpLoad %v4bool %b4
-%249 = OpVectorShuffle %v4bool %248 %247 4 1 2 5
-OpStore %b4 %249
-%250 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
-%251 = OpLoad %v4float %250
-%252 = OpCompositeExtract %float %251 0
-%253 = OpFUnordNotEqual %bool %252 %float_0
-%254 = OpAccessChain %_ptr_Function_bool %b3 %int_2
-OpStore %254 %253
+%350 = OpVariable %_ptr_Function_v4float Function
+%24 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%28 = OpLoad %v4float %24
+%29 = OpCompositeExtract %float %28 0
+OpStore %h %29
+%34 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%35 = OpLoad %v4float %34
+%36 = OpCompositeExtract %float %35 1
+%37 = OpCompositeConstruct %v2float %36 %36
+OpStore %h2 %37
+%41 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%42 = OpLoad %v4float %41
+%43 = OpCompositeExtract %float %42 2
+%44 = OpCompositeConstruct %v3float %43 %43 %43
+OpStore %h3 %44
+%46 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%47 = OpLoad %v4float %46
+%48 = OpCompositeExtract %float %47 3
+%49 = OpCompositeConstruct %v4float %48 %48 %48 %48
+OpStore %h4 %49
+%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%51 = OpLoad %v4float %50
+%52 = OpCompositeExtract %float %51 0
+%53 = OpAccessChain %_ptr_Function_float %h3 %int_1
+OpStore %53 %52
+%55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%56 = OpLoad %v4float %55
+%57 = OpCompositeExtract %float %56 1
+%58 = OpCompositeConstruct %v2float %57 %57
+%59 = OpLoad %v3float %h3
+%60 = OpVectorShuffle %v3float %59 %58 3 1 4
+OpStore %h3 %60
+%61 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%62 = OpLoad %v4float %61
+%63 = OpCompositeExtract %float %62 3
+%64 = OpCompositeConstruct %v4float %63 %63 %63 %63
+%65 = OpLoad %v4float %h4
+%66 = OpVectorShuffle %v4float %65 %64 6 7 4 5
+OpStore %h4 %66
+%70 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%71 = OpLoad %v4float %70
+%72 = OpCompositeExtract %float %71 0
+%75 = OpCompositeConstruct %v2float %72 %float_0
+%76 = OpCompositeConstruct %v2float %float_0 %72
+%73 = OpCompositeConstruct %mat2v2float %75 %76
+OpStore %h2x2 %73
+%80 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%81 = OpLoad %v4float %80
+%82 = OpCompositeExtract %float %81 1
+%84 = OpCompositeConstruct %v3float %82 %float_0 %float_0
+%85 = OpCompositeConstruct %v3float %float_0 %82 %float_0
+%86 = OpCompositeConstruct %v3float %float_0 %float_0 %82
+%83 = OpCompositeConstruct %mat3v3float %84 %85 %86
+OpStore %h3x3 %83
+%90 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%91 = OpLoad %v4float %90
+%92 = OpCompositeExtract %float %91 2
+%94 = OpCompositeConstruct %v4float %92 %float_0 %float_0 %float_0
+%95 = OpCompositeConstruct %v4float %float_0 %92 %float_0 %float_0
+%96 = OpCompositeConstruct %v4float %float_0 %float_0 %92 %float_0
+%97 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %92
+%93 = OpCompositeConstruct %mat4v4float %94 %95 %96 %97
+OpStore %h4x4 %93
+%98 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%99 = OpLoad %v4float %98
+%100 = OpCompositeExtract %float %99 2
+%101 = OpCompositeConstruct %v3float %100 %100 %100
+%102 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_1
+OpStore %102 %101
+%103 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%104 = OpLoad %v4float %103
+%105 = OpCompositeExtract %float %104 0
+%107 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_3
+%108 = OpAccessChain %_ptr_Function_float %107 %int_3
+OpStore %108 %105
+%109 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%110 = OpLoad %v4float %109
+%111 = OpCompositeExtract %float %110 0
+%113 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0
+%114 = OpAccessChain %_ptr_Function_float %113 %int_0
+OpStore %114 %111
+%117 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%118 = OpLoad %v4float %117
+%119 = OpCompositeExtract %float %118 0
+%120 = OpConvertFToS %int %119
+OpStore %i %120
+%124 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%125 = OpLoad %v4float %124
+%126 = OpCompositeExtract %float %125 1
+%127 = OpConvertFToS %int %126
+%128 = OpCompositeConstruct %v2int %127 %127
+OpStore %i2 %128
+%132 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%133 = OpLoad %v4float %132
+%134 = OpCompositeExtract %float %133 2
+%135 = OpConvertFToS %int %134
+%136 = OpCompositeConstruct %v3int %135 %135 %135
+OpStore %i3 %136
+%140 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%141 = OpLoad %v4float %140
+%142 = OpCompositeExtract %float %141 3
+%143 = OpConvertFToS %int %142
+%144 = OpCompositeConstruct %v4int %143 %143 %143 %143
+OpStore %i4 %144
+%145 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%146 = OpLoad %v4float %145
+%147 = OpCompositeExtract %float %146 2
+%148 = OpConvertFToS %int %147
+%149 = OpCompositeConstruct %v3int %148 %148 %148
+%150 = OpLoad %v4int %i4
+%151 = OpVectorShuffle %v4int %150 %149 4 5 6 3
+OpStore %i4 %151
+%152 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%153 = OpLoad %v4float %152
+%154 = OpCompositeExtract %float %153 0
+%155 = OpConvertFToS %int %154
+%156 = OpAccessChain %_ptr_Function_int %i2 %int_1
+OpStore %156 %155
+%158 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%159 = OpLoad %v4float %158
+%160 = OpCompositeExtract %float %159 0
+OpStore %f %160
+%162 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%163 = OpLoad %v4float %162
+%164 = OpCompositeExtract %float %163 1
+%165 = OpCompositeConstruct %v2float %164 %164
+OpStore %f2 %165
+%167 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%168 = OpLoad %v4float %167
+%169 = OpCompositeExtract %float %168 2
+%170 = OpCompositeConstruct %v3float %169 %169 %169
+OpStore %f3 %170
+%172 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%173 = OpLoad %v4float %172
+%174 = OpCompositeExtract %float %173 3
+%175 = OpCompositeConstruct %v4float %174 %174 %174 %174
+OpStore %f4 %175
+%176 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%177 = OpLoad %v4float %176
+%178 = OpCompositeExtract %float %177 1
+%179 = OpCompositeConstruct %v2float %178 %178
+%180 = OpLoad %v3float %f3
+%181 = OpVectorShuffle %v3float %180 %179 3 4 2
+OpStore %f3 %181
+%182 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%183 = OpLoad %v4float %182
+%184 = OpCompositeExtract %float %183 0
+%185 = OpAccessChain %_ptr_Function_float %f2 %int_0
+OpStore %185 %184
+%187 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%188 = OpLoad %v4float %187
+%189 = OpCompositeExtract %float %188 0
+%191 = OpCompositeConstruct %v2float %189 %float_0
+%192 = OpCompositeConstruct %v2float %float_0 %189
+%190 = OpCompositeConstruct %mat2v2float %191 %192
+OpStore %f2x2 %190
+%194 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%195 = OpLoad %v4float %194
+%196 = OpCompositeExtract %float %195 1
+%198 = OpCompositeConstruct %v3float %196 %float_0 %float_0
+%199 = OpCompositeConstruct %v3float %float_0 %196 %float_0
+%200 = OpCompositeConstruct %v3float %float_0 %float_0 %196
+%197 = OpCompositeConstruct %mat3v3float %198 %199 %200
+OpStore %f3x3 %197
+%202 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%203 = OpLoad %v4float %202
+%204 = OpCompositeExtract %float %203 2
+%206 = OpCompositeConstruct %v4float %204 %float_0 %float_0 %float_0
+%207 = OpCompositeConstruct %v4float %float_0 %204 %float_0 %float_0
+%208 = OpCompositeConstruct %v4float %float_0 %float_0 %204 %float_0
+%209 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %204
+%205 = OpCompositeConstruct %mat4v4float %206 %207 %208 %209
+OpStore %f4x4 %205
+%210 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%211 = OpLoad %v4float %210
+%212 = OpCompositeExtract %float %211 0
+%213 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0
+%214 = OpAccessChain %_ptr_Function_float %213 %int_0
+OpStore %214 %212
+%217 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%218 = OpLoad %v4float %217
+%219 = OpCompositeExtract %float %218 0
+%220 = OpFUnordNotEqual %bool %219 %float_0
+OpStore %b %220
+%224 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%225 = OpLoad %v4float %224
+%226 = OpCompositeExtract %float %225 1
+%227 = OpFUnordNotEqual %bool %226 %float_0
+%228 = OpCompositeConstruct %v2bool %227 %227
+OpStore %b2 %228
+%232 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%233 = OpLoad %v4float %232
+%234 = OpCompositeExtract %float %233 2
+%235 = OpFUnordNotEqual %bool %234 %float_0
+%236 = OpCompositeConstruct %v3bool %235 %235 %235
+OpStore %b3 %236
+%240 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%241 = OpLoad %v4float %240
+%242 = OpCompositeExtract %float %241 3
+%243 = OpFUnordNotEqual %bool %242 %float_0
+%244 = OpCompositeConstruct %v4bool %243 %243 %243 %243
+OpStore %b4 %244
+%245 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%246 = OpLoad %v4float %245
+%247 = OpCompositeExtract %float %246 1
+%248 = OpFUnordNotEqual %bool %247 %float_0
+%249 = OpCompositeConstruct %v2bool %248 %248
+%250 = OpLoad %v4bool %b4
+%251 = OpVectorShuffle %v4bool %250 %249 4 1 2 5
+OpStore %b4 %251
+%252 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%253 = OpLoad %v4float %252
+%254 = OpCompositeExtract %float %253 0
+%255 = OpFUnordNotEqual %bool %254 %float_0
+%256 = OpAccessChain %_ptr_Function_bool %b3 %int_2
+OpStore %256 %255
 OpStore %ok %true
-%258 = OpLoad %float %h
-%259 = OpLoad %v2float %h2
-%260 = OpCompositeExtract %float %259 0
-%261 = OpFMul %float %258 %260
-%262 = OpLoad %v3float %h3
-%263 = OpCompositeExtract %float %262 0
-%264 = OpFMul %float %261 %263
-%265 = OpLoad %v4float %h4
-%266 = OpCompositeExtract %float %265 0
-%267 = OpFMul %float %264 %266
-%268 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0
-%269 = OpLoad %v2float %268
-%270 = OpCompositeExtract %float %269 0
-%271 = OpFMul %float %267 %270
-%272 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_0
-%273 = OpLoad %v3float %272
-%274 = OpCompositeExtract %float %273 0
-%275 = OpFMul %float %271 %274
-%276 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_0
-%277 = OpLoad %v4float %276
-%278 = OpCompositeExtract %float %277 0
-%279 = OpFMul %float %275 %278
-%280 = OpFOrdEqual %bool %float_1 %279
-OpStore %ok %280
-%282 = OpLoad %bool %ok
-OpSelectionMerge %284 None
-OpBranchConditional %282 %283 %284
-%283 = OpLabel
-%285 = OpLoad %float %f
-%286 = OpLoad %v2float %f2
-%287 = OpCompositeExtract %float %286 0
-%288 = OpFMul %float %285 %287
-%289 = OpLoad %v3float %f3
-%290 = OpCompositeExtract %float %289 0
-%291 = OpFMul %float %288 %290
-%292 = OpLoad %v4float %f4
-%293 = OpCompositeExtract %float %292 0
-%294 = OpFMul %float %291 %293
-%295 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0
-%296 = OpLoad %v2float %295
-%297 = OpCompositeExtract %float %296 0
-%298 = OpFMul %float %294 %297
-%299 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0
-%300 = OpLoad %v3float %299
-%301 = OpCompositeExtract %float %300 0
-%302 = OpFMul %float %298 %301
-%303 = OpAccessChain %_ptr_Function_v4float %f4x4 %int_0
-%304 = OpLoad %v4float %303
-%305 = OpCompositeExtract %float %304 0
-%306 = OpFMul %float %302 %305
-%307 = OpFOrdEqual %bool %float_1 %306
-OpBranch %284
-%284 = OpLabel
-%308 = OpPhi %bool %false %19 %307 %283
-OpStore %ok %308
-%309 = OpLoad %bool %ok
-OpSelectionMerge %311 None
-OpBranchConditional %309 %310 %311
-%310 = OpLabel
-%312 = OpLoad %int %i
-%313 = OpLoad %v2int %i2
-%314 = OpCompositeExtract %int %313 0
-%315 = OpIMul %int %312 %314
-%316 = OpLoad %v3int %i3
-%317 = OpCompositeExtract %int %316 0
-%318 = OpIMul %int %315 %317
-%319 = OpLoad %v4int %i4
-%320 = OpCompositeExtract %int %319 0
-%321 = OpIMul %int %318 %320
-%322 = OpIEqual %bool %int_1 %321
-OpBranch %311
-%311 = OpLabel
-%323 = OpPhi %bool %false %284 %322 %310
-OpStore %ok %323
-%324 = OpLoad %bool %ok
-OpSelectionMerge %326 None
-OpBranchConditional %324 %325 %326
-%325 = OpLabel
-%327 = OpLoad %bool %b
-OpSelectionMerge %329 None
-OpBranchConditional %327 %328 %329
-%328 = OpLabel
-%330 = OpLoad %v2bool %b2
-%331 = OpCompositeExtract %bool %330 0
-OpBranch %329
-%329 = OpLabel
-%332 = OpPhi %bool %false %325 %331 %328
+%259 = OpLoad %bool %ok
+OpSelectionMerge %261 None
+OpBranchConditional %259 %260 %261
+%260 = OpLabel
+%263 = OpLoad %float %h
+%264 = OpLoad %v2float %h2
+%265 = OpCompositeExtract %float %264 0
+%266 = OpFMul %float %263 %265
+%267 = OpLoad %v3float %h3
+%268 = OpCompositeExtract %float %267 0
+%269 = OpFMul %float %266 %268
+%270 = OpLoad %v4float %h4
+%271 = OpCompositeExtract %float %270 0
+%272 = OpFMul %float %269 %271
+%273 = OpAccessChain %_ptr_Function_v2float %h2x2 %int_0
+%274 = OpLoad %v2float %273
+%275 = OpCompositeExtract %float %274 0
+%276 = OpFMul %float %272 %275
+%277 = OpAccessChain %_ptr_Function_v3float %h3x3 %int_0
+%278 = OpLoad %v3float %277
+%279 = OpCompositeExtract %float %278 0
+%280 = OpFMul %float %276 %279
+%281 = OpAccessChain %_ptr_Function_v4float %h4x4 %int_0
+%282 = OpLoad %v4float %281
+%283 = OpCompositeExtract %float %282 0
+%284 = OpFMul %float %280 %283
+%285 = OpFOrdEqual %bool %float_1 %284
+OpBranch %261
+%261 = OpLabel
+%286 = OpPhi %bool %false %19 %285 %260
+OpStore %ok %286
+%287 = OpLoad %bool %ok
+OpSelectionMerge %289 None
+OpBranchConditional %287 %288 %289
+%288 = OpLabel
+%290 = OpLoad %float %f
+%291 = OpLoad %v2float %f2
+%292 = OpCompositeExtract %float %291 0
+%293 = OpFMul %float %290 %292
+%294 = OpLoad %v3float %f3
+%295 = OpCompositeExtract %float %294 0
+%296 = OpFMul %float %293 %295
+%297 = OpLoad %v4float %f4
+%298 = OpCompositeExtract %float %297 0
+%299 = OpFMul %float %296 %298
+%300 = OpAccessChain %_ptr_Function_v2float %f2x2 %int_0
+%301 = OpLoad %v2float %300
+%302 = OpCompositeExtract %float %301 0
+%303 = OpFMul %float %299 %302
+%304 = OpAccessChain %_ptr_Function_v3float %f3x3 %int_0
+%305 = OpLoad %v3float %304
+%306 = OpCompositeExtract %float %305 0
+%307 = OpFMul %float %303 %306
+%308 = OpAccessChain %_ptr_Function_v4float %f4x4 %int_0
+%309 = OpLoad %v4float %308
+%310 = OpCompositeExtract %float %309 0
+%311 = OpFMul %float %307 %310
+%312 = OpFOrdEqual %bool %float_1 %311
+OpBranch %289
+%289 = OpLabel
+%313 = OpPhi %bool %false %261 %312 %288
+OpStore %ok %313
+%314 = OpLoad %bool %ok
+OpSelectionMerge %316 None
+OpBranchConditional %314 %315 %316
+%315 = OpLabel
+%317 = OpLoad %int %i
+%318 = OpLoad %v2int %i2
+%319 = OpCompositeExtract %int %318 0
+%320 = OpIMul %int %317 %319
+%321 = OpLoad %v3int %i3
+%322 = OpCompositeExtract %int %321 0
+%323 = OpIMul %int %320 %322
+%324 = OpLoad %v4int %i4
+%325 = OpCompositeExtract %int %324 0
+%326 = OpIMul %int %323 %325
+%327 = OpIEqual %bool %int_1 %326
+OpBranch %316
+%316 = OpLabel
+%328 = OpPhi %bool %false %289 %327 %315
+OpStore %ok %328
+%329 = OpLoad %bool %ok
+OpSelectionMerge %331 None
+OpBranchConditional %329 %330 %331
+%330 = OpLabel
+%332 = OpLoad %bool %b
 OpSelectionMerge %334 None
 OpBranchConditional %332 %333 %334
 %333 = OpLabel
-%335 = OpLoad %v3bool %b3
+%335 = OpLoad %v2bool %b2
 %336 = OpCompositeExtract %bool %335 0
 OpBranch %334
 %334 = OpLabel
-%337 = OpPhi %bool %false %329 %336 %333
+%337 = OpPhi %bool %false %330 %336 %333
 OpSelectionMerge %339 None
 OpBranchConditional %337 %338 %339
 %338 = OpLabel
-%340 = OpLoad %v4bool %b4
+%340 = OpLoad %v3bool %b3
 %341 = OpCompositeExtract %bool %340 0
 OpBranch %339
 %339 = OpLabel
 %342 = OpPhi %bool %false %334 %341 %338
-OpBranch %326
-%326 = OpLabel
-%343 = OpPhi %bool %false %311 %342 %339
-OpStore %ok %343
-%344 = OpLoad %bool %ok
-OpSelectionMerge %348 None
-OpBranchConditional %344 %346 %347
-%346 = OpLabel
-%349 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%350 = OpLoad %v4float %349
-OpStore %345 %350
-OpBranch %348
-%347 = OpLabel
-%351 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%352 = OpLoad %v4float %351
-OpStore %345 %352
-OpBranch %348
-%348 = OpLabel
-%353 = OpLoad %v4float %345
-OpReturnValue %353
+OpSelectionMerge %344 None
+OpBranchConditional %342 %343 %344
+%343 = OpLabel
+%345 = OpLoad %v4bool %b4
+%346 = OpCompositeExtract %bool %345 0
+OpBranch %344
+%344 = OpLabel
+%347 = OpPhi %bool %false %339 %346 %343
+OpBranch %331
+%331 = OpLabel
+%348 = OpPhi %bool %false %316 %347 %344
+OpStore %ok %348
+%349 = OpLoad %bool %ok
+OpSelectionMerge %353 None
+OpBranchConditional %349 %351 %352
+%351 = OpLabel
+%354 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%355 = OpLoad %v4float %354
+OpStore %350 %355
+OpBranch %353
+%352 = OpLabel
+%356 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%357 = OpLoad %v4float %356
+OpStore %350 %357
+OpBranch %353
+%353 = OpLabel
+%358 = OpLoad %v4float %350
+OpReturnValue %358
 OpFunctionEnd
diff --git a/tests/sksl/shared/OutParams.glsl b/tests/sksl/shared/OutParams.glsl
index d090846..2c637dd 100644
--- a/tests/sksl/shared/OutParams.glsl
+++ b/tests/sksl/shared/OutParams.glsl
@@ -4,100 +4,136 @@
 uniform vec4 colorRed;
 uniform vec4 colorWhite;
 vec4 main() {
+    vec4 result;
     float h;
     h = colorWhite.x;
+    false;
 
     vec2 h2;
     h2 = vec2(colorWhite.y);
+    false;
 
     vec3 h3;
     h3 = vec3(colorWhite.z);
+    false;
 
     vec4 h4;
     h4 = vec4(colorWhite.w);
+    false;
 
     h3.y = colorWhite.x;
+    false;
 
     h3.xz = vec2(colorWhite.y);
+    false;
 
     h4.zwxy = vec4(colorWhite.w);
+    false;
 
     mat2 h2x2;
     h2x2 = mat2(colorWhite.x);
+    false;
 
     mat3 h3x3;
     h3x3 = mat3(colorWhite.y);
+    false;
 
     mat4 h4x4;
     h4x4 = mat4(colorWhite.z);
+    false;
 
     h3x3[1] = vec3(colorWhite.z);
+    false;
 
     h4x4[3].w = colorWhite.x;
+    false;
 
     h2x2[0].x = colorWhite.x;
+    false;
 
     int i;
     i = int(colorWhite.x);
+    false;
 
     ivec2 i2;
     i2 = ivec2(int(colorWhite.y));
+    false;
 
     ivec3 i3;
     i3 = ivec3(int(colorWhite.z));
+    false;
 
     ivec4 i4;
     i4 = ivec4(int(colorWhite.w));
+    false;
 
     i4.xyz = ivec3(int(colorWhite.z));
+    false;
 
     i2.y = int(colorWhite.x);
+    false;
 
     float f;
     f = colorWhite.x;
+    false;
 
     vec2 f2;
     f2 = vec2(colorWhite.y);
+    false;
 
     vec3 f3;
     f3 = vec3(colorWhite.z);
+    false;
 
     vec4 f4;
     f4 = vec4(colorWhite.w);
+    false;
 
     f3.xy = vec2(colorWhite.y);
+    false;
 
     f2.x = colorWhite.x;
+    false;
 
     mat2 f2x2;
     f2x2 = mat2(colorWhite.x);
+    false;
 
     mat3 f3x3;
     f3x3 = mat3(colorWhite.y);
+    false;
 
     mat4 f4x4;
     f4x4 = mat4(colorWhite.z);
+    false;
 
     f2x2[0].x = colorWhite.x;
+    false;
 
     bool b;
     b = bool(colorWhite.x);
+    false;
 
     bvec2 b2;
     b2 = bvec2(bool(colorWhite.y));
+    false;
 
     bvec3 b3;
     b3 = bvec3(bool(colorWhite.z));
+    false;
 
     bvec4 b4;
     b4 = bvec4(bool(colorWhite.w));
+    false;
 
     b4.xw = bvec2(bool(colorWhite.y));
+    false;
 
     b3.z = bool(colorWhite.x);
+    false;
 
     bool ok = true;
-    ok = 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x;
+    ok = ok && 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x;
     ok = ok && 1.0 == (((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x;
     ok = ok && 1 == ((i * i2.x) * i3.x) * i4.x;
     ok = ok && (((b && b2.x) && b3.x) && b4.x);
diff --git a/tests/sksl/shared/OutParams.metal b/tests/sksl/shared/OutParams.metal
index c4b6366..7dc2f75 100644
--- a/tests/sksl/shared/OutParams.metal
+++ b/tests/sksl/shared/OutParams.metal
@@ -17,100 +17,136 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float4 result;
     float h;
     h = _uniforms.colorWhite.x;
+    false;
 
     float2 h2;
     h2 = float2(_uniforms.colorWhite.y);
+    false;
 
     float3 h3;
     h3 = float3(_uniforms.colorWhite.z);
+    false;
 
     float4 h4;
     h4 = float4(_uniforms.colorWhite.w);
+    false;
 
     h3.y = _uniforms.colorWhite.x;
+    false;
 
     h3.xz = float2(_uniforms.colorWhite.y);
+    false;
 
     h4.zwxy = float4(_uniforms.colorWhite.w);
+    false;
 
     float2x2 h2x2;
     h2x2 = float2x2(_uniforms.colorWhite.x);
+    false;
 
     float3x3 h3x3;
     h3x3 = float3x3(_uniforms.colorWhite.y);
+    false;
 
     float4x4 h4x4;
     h4x4 = float4x4(_uniforms.colorWhite.z);
+    false;
 
     h3x3[1] = float3(_uniforms.colorWhite.z);
+    false;
 
     h4x4[3].w = _uniforms.colorWhite.x;
+    false;
 
     h2x2[0].x = _uniforms.colorWhite.x;
+    false;
 
     int i;
     i = int(_uniforms.colorWhite.x);
+    false;
 
     int2 i2;
     i2 = int2(int(_uniforms.colorWhite.y));
+    false;
 
     int3 i3;
     i3 = int3(int(_uniforms.colorWhite.z));
+    false;
 
     int4 i4;
     i4 = int4(int(_uniforms.colorWhite.w));
+    false;
 
     i4.xyz = int3(int(_uniforms.colorWhite.z));
+    false;
 
     i2.y = int(_uniforms.colorWhite.x);
+    false;
 
     float f;
     f = _uniforms.colorWhite.x;
+    false;
 
     float2 f2;
     f2 = float2(_uniforms.colorWhite.y);
+    false;
 
     float3 f3;
     f3 = float3(_uniforms.colorWhite.z);
+    false;
 
     float4 f4;
     f4 = float4(_uniforms.colorWhite.w);
+    false;
 
     f3.xy = float2(_uniforms.colorWhite.y);
+    false;
 
     f2.x = _uniforms.colorWhite.x;
+    false;
 
     float2x2 f2x2;
     f2x2 = float2x2(_uniforms.colorWhite.x);
+    false;
 
     float3x3 f3x3;
     f3x3 = float3x3(_uniforms.colorWhite.y);
+    false;
 
     float4x4 f4x4;
     f4x4 = float4x4(_uniforms.colorWhite.z);
+    false;
 
     f2x2[0].x = _uniforms.colorWhite.x;
+    false;
 
     bool b;
     b = bool(_uniforms.colorWhite.x);
+    false;
 
     bool2 b2;
     b2 = bool2(bool(_uniforms.colorWhite.y));
+    false;
 
     bool3 b3;
     b3 = bool3(bool(_uniforms.colorWhite.z));
+    false;
 
     bool4 b4;
     b4 = bool4(bool(_uniforms.colorWhite.w));
+    false;
 
     b4.xw = bool2(bool(_uniforms.colorWhite.y));
+    false;
 
     b3.z = bool(_uniforms.colorWhite.x);
+    false;
 
     bool ok = true;
-    ok = 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x;
+    ok = ok && 1.0 == (((((h * h2.x) * h3.x) * h4.x) * h2x2[0].x) * h3x3[0].x) * h4x4[0].x;
     ok = ok && 1.0 == (((((f * f2.x) * f3.x) * f4.x) * f2x2[0].x) * f3x3[0].x) * f4x4[0].x;
     ok = ok && 1 == ((i * i2.x) * i3.x) * i4.x;
     ok = ok && (((b && b2.x) && b3.x) && b4.x);
diff --git a/tests/sksl/shared/ResizeMatrix.asm.frag b/tests/sksl/shared/ResizeMatrix.asm.frag
index debf2c8..e36925e 100644
--- a/tests/sksl/shared/ResizeMatrix.asm.frag
+++ b/tests/sksl/shared/ResizeMatrix.asm.frag
@@ -11,6 +11,12 @@
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
 OpName %result "result"
+OpName %a "a"
+OpName %b "b"
+OpName %c "c"
+OpName %d "d"
+OpName %e "e"
+OpName %f "f"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -67,129 +73,129 @@
 %main = OpFunction %v4float None %18
 %19 = OpLabel
 %result = OpVariable %_ptr_Function_float Function
-%24 = OpVariable %_ptr_Function_mat2v2float Function
-%48 = OpVariable %_ptr_Function_mat2v2float Function
-%65 = OpVariable %_ptr_Function_mat3v3float Function
-%85 = OpVariable %_ptr_Function_mat3v3float Function
-%100 = OpVariable %_ptr_Function_mat4v4float Function
-%125 = OpVariable %_ptr_Function_mat2v2float Function
+%a = OpVariable %_ptr_Function_mat2v2float Function
+%b = OpVariable %_ptr_Function_mat2v2float Function
+%c = OpVariable %_ptr_Function_mat3v3float Function
+%d = OpVariable %_ptr_Function_mat3v3float Function
+%e = OpVariable %_ptr_Function_mat4v4float Function
+%f = OpVariable %_ptr_Function_mat2v2float Function
 %150 = OpVariable %_ptr_Function_v4float Function
 OpStore %result %float_0
-%23 = OpLoad %float %result
-%31 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
-%32 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
-%33 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
-%29 = OpCompositeConstruct %mat3v3float %31 %32 %33
-%36 = OpCompositeExtract %v3float %29 0
-%37 = OpVectorShuffle %v2float %36 %36 0 1
-%38 = OpCompositeExtract %v3float %29 1
-%39 = OpVectorShuffle %v2float %38 %38 0 1
-%35 = OpCompositeConstruct %mat2v2float %37 %39
-OpStore %24 %35
-%42 = OpAccessChain %_ptr_Function_v2float %24 %int_0
+%30 = OpCompositeConstruct %v3float %float_1 %float_0 %float_0
+%31 = OpCompositeConstruct %v3float %float_0 %float_1 %float_0
+%32 = OpCompositeConstruct %v3float %float_0 %float_0 %float_1
+%28 = OpCompositeConstruct %mat3v3float %30 %31 %32
+%35 = OpCompositeExtract %v3float %28 0
+%36 = OpVectorShuffle %v2float %35 %35 0 1
+%37 = OpCompositeExtract %v3float %28 1
+%38 = OpVectorShuffle %v2float %37 %37 0 1
+%34 = OpCompositeConstruct %mat2v2float %36 %38
+OpStore %a %34
+%39 = OpLoad %float %result
+%42 = OpAccessChain %_ptr_Function_v2float %a %int_0
 %44 = OpLoad %v2float %42
 %45 = OpCompositeExtract %float %44 0
-%46 = OpFAdd %float %23 %45
+%46 = OpFAdd %float %39 %45
 OpStore %result %46
-%47 = OpLoad %float %result
-%50 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
-%51 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
-%52 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
-%53 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
-%49 = OpCompositeConstruct %mat4v4float %50 %51 %52 %53
-%56 = OpCompositeExtract %v4float %49 0
-%57 = OpVectorShuffle %v2float %56 %56 0 1
-%58 = OpCompositeExtract %v4float %49 1
-%59 = OpVectorShuffle %v2float %58 %58 0 1
-%55 = OpCompositeConstruct %mat2v2float %57 %59
-OpStore %48 %55
-%60 = OpAccessChain %_ptr_Function_v2float %48 %int_0
+%49 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
+%50 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
+%51 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
+%52 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
+%48 = OpCompositeConstruct %mat4v4float %49 %50 %51 %52
+%55 = OpCompositeExtract %v4float %48 0
+%56 = OpVectorShuffle %v2float %55 %55 0 1
+%57 = OpCompositeExtract %v4float %48 1
+%58 = OpVectorShuffle %v2float %57 %57 0 1
+%54 = OpCompositeConstruct %mat2v2float %56 %58
+OpStore %b %54
+%59 = OpLoad %float %result
+%60 = OpAccessChain %_ptr_Function_v2float %b %int_0
 %61 = OpLoad %v2float %60
 %62 = OpCompositeExtract %float %61 0
-%63 = OpFAdd %float %47 %62
+%63 = OpFAdd %float %59 %62
 OpStore %result %63
-%64 = OpLoad %float %result
-%68 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
-%69 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
-%70 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
-%71 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
-%67 = OpCompositeConstruct %mat4v4float %68 %69 %70 %71
-%73 = OpCompositeExtract %v4float %67 0
-%74 = OpVectorShuffle %v3float %73 %73 0 1 2
-%75 = OpCompositeExtract %v4float %67 1
-%76 = OpVectorShuffle %v3float %75 %75 0 1 2
-%77 = OpCompositeExtract %v4float %67 2
-%78 = OpVectorShuffle %v3float %77 %77 0 1 2
-%72 = OpCompositeConstruct %mat3v3float %74 %76 %78
-OpStore %65 %72
-%79 = OpAccessChain %_ptr_Function_v3float %65 %int_0
+%67 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
+%68 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
+%69 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
+%70 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
+%66 = OpCompositeConstruct %mat4v4float %67 %68 %69 %70
+%72 = OpCompositeExtract %v4float %66 0
+%73 = OpVectorShuffle %v3float %72 %72 0 1 2
+%74 = OpCompositeExtract %v4float %66 1
+%75 = OpVectorShuffle %v3float %74 %74 0 1 2
+%76 = OpCompositeExtract %v4float %66 2
+%77 = OpVectorShuffle %v3float %76 %76 0 1 2
+%71 = OpCompositeConstruct %mat3v3float %73 %75 %77
+OpStore %c %71
+%78 = OpLoad %float %result
+%79 = OpAccessChain %_ptr_Function_v3float %c %int_0
 %81 = OpLoad %v3float %79
 %82 = OpCompositeExtract %float %81 0
-%83 = OpFAdd %float %64 %82
+%83 = OpFAdd %float %78 %82
 OpStore %result %83
-%84 = OpLoad %float %result
-%87 = OpCompositeConstruct %v2float %float_1 %float_0
-%88 = OpCompositeConstruct %v2float %float_0 %float_1
-%86 = OpCompositeConstruct %mat2v2float %87 %88
-%90 = OpCompositeExtract %v2float %86 0
-%91 = OpCompositeConstruct %v3float %90 %float_0
-%92 = OpCompositeExtract %v2float %86 1
-%93 = OpCompositeConstruct %v3float %92 %float_0
-%94 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%89 = OpCompositeConstruct %mat3v3float %91 %93 %94
-OpStore %85 %89
-%95 = OpAccessChain %_ptr_Function_v3float %85 %int_0
+%86 = OpCompositeConstruct %v2float %float_1 %float_0
+%87 = OpCompositeConstruct %v2float %float_0 %float_1
+%85 = OpCompositeConstruct %mat2v2float %86 %87
+%89 = OpCompositeExtract %v2float %85 0
+%90 = OpCompositeConstruct %v3float %89 %float_0
+%91 = OpCompositeExtract %v2float %85 1
+%92 = OpCompositeConstruct %v3float %91 %float_0
+%93 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%88 = OpCompositeConstruct %mat3v3float %90 %92 %93
+OpStore %d %88
+%94 = OpLoad %float %result
+%95 = OpAccessChain %_ptr_Function_v3float %d %int_0
 %96 = OpLoad %v3float %95
 %97 = OpCompositeExtract %float %96 0
-%98 = OpFAdd %float %84 %97
+%98 = OpFAdd %float %94 %97
 OpStore %result %98
-%99 = OpLoad %float %result
-%103 = OpCompositeConstruct %v2float %float_1 %float_0
-%104 = OpCompositeConstruct %v2float %float_0 %float_1
-%102 = OpCompositeConstruct %mat2v2float %103 %104
-%106 = OpCompositeExtract %v2float %102 0
-%107 = OpCompositeConstruct %v3float %106 %float_0
-%108 = OpCompositeExtract %v2float %102 1
-%109 = OpCompositeConstruct %v3float %108 %float_0
-%110 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
-%105 = OpCompositeConstruct %mat3v3float %107 %109 %110
-%112 = OpCompositeExtract %v3float %105 0
-%113 = OpCompositeConstruct %v4float %112 %float_0
-%114 = OpCompositeExtract %v3float %105 1
-%115 = OpCompositeConstruct %v4float %114 %float_0
-%116 = OpCompositeExtract %v3float %105 2
-%117 = OpCompositeConstruct %v4float %116 %float_0
-%118 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_0
-%111 = OpCompositeConstruct %mat4v4float %113 %115 %117 %118
-OpStore %100 %111
-%119 = OpAccessChain %_ptr_Function_v4float %100 %int_0
+%102 = OpCompositeConstruct %v2float %float_1 %float_0
+%103 = OpCompositeConstruct %v2float %float_0 %float_1
+%101 = OpCompositeConstruct %mat2v2float %102 %103
+%105 = OpCompositeExtract %v2float %101 0
+%106 = OpCompositeConstruct %v3float %105 %float_0
+%107 = OpCompositeExtract %v2float %101 1
+%108 = OpCompositeConstruct %v3float %107 %float_0
+%109 = OpCompositeConstruct %v3float %float_0 %float_0 %float_0
+%104 = OpCompositeConstruct %mat3v3float %106 %108 %109
+%111 = OpCompositeExtract %v3float %104 0
+%112 = OpCompositeConstruct %v4float %111 %float_0
+%113 = OpCompositeExtract %v3float %104 1
+%114 = OpCompositeConstruct %v4float %113 %float_0
+%115 = OpCompositeExtract %v3float %104 2
+%116 = OpCompositeConstruct %v4float %115 %float_0
+%117 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_0
+%110 = OpCompositeConstruct %mat4v4float %112 %114 %116 %117
+OpStore %e %110
+%118 = OpLoad %float %result
+%119 = OpAccessChain %_ptr_Function_v4float %e %int_0
 %121 = OpLoad %v4float %119
 %122 = OpCompositeExtract %float %121 0
-%123 = OpFAdd %float %99 %122
+%123 = OpFAdd %float %118 %122
 OpStore %result %123
-%124 = OpLoad %float %result
-%127 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
-%128 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
-%129 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
-%130 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
-%126 = OpCompositeConstruct %mat4v4float %127 %128 %129 %130
-%132 = OpCompositeExtract %v4float %126 0
-%133 = OpVectorShuffle %v3float %132 %132 0 1 2
-%134 = OpCompositeExtract %v4float %126 1
-%135 = OpVectorShuffle %v3float %134 %134 0 1 2
-%136 = OpCompositeExtract %v4float %126 2
-%137 = OpVectorShuffle %v3float %136 %136 0 1 2
-%131 = OpCompositeConstruct %mat3v3float %133 %135 %137
-%139 = OpCompositeExtract %v3float %131 0
-%140 = OpVectorShuffle %v2float %139 %139 0 1
-%141 = OpCompositeExtract %v3float %131 1
-%142 = OpVectorShuffle %v2float %141 %141 0 1
-%138 = OpCompositeConstruct %mat2v2float %140 %142
-OpStore %125 %138
-%143 = OpAccessChain %_ptr_Function_v2float %125 %int_0
+%126 = OpCompositeConstruct %v4float %float_1 %float_0 %float_0 %float_0
+%127 = OpCompositeConstruct %v4float %float_0 %float_1 %float_0 %float_0
+%128 = OpCompositeConstruct %v4float %float_0 %float_0 %float_1 %float_0
+%129 = OpCompositeConstruct %v4float %float_0 %float_0 %float_0 %float_1
+%125 = OpCompositeConstruct %mat4v4float %126 %127 %128 %129
+%131 = OpCompositeExtract %v4float %125 0
+%132 = OpVectorShuffle %v3float %131 %131 0 1 2
+%133 = OpCompositeExtract %v4float %125 1
+%134 = OpVectorShuffle %v3float %133 %133 0 1 2
+%135 = OpCompositeExtract %v4float %125 2
+%136 = OpVectorShuffle %v3float %135 %135 0 1 2
+%130 = OpCompositeConstruct %mat3v3float %132 %134 %136
+%138 = OpCompositeExtract %v3float %130 0
+%139 = OpVectorShuffle %v2float %138 %138 0 1
+%140 = OpCompositeExtract %v3float %130 1
+%141 = OpVectorShuffle %v2float %140 %140 0 1
+%137 = OpCompositeConstruct %mat2v2float %139 %141
+OpStore %f %137
+%142 = OpLoad %float %result
+%143 = OpAccessChain %_ptr_Function_v2float %f %int_0
 %144 = OpLoad %v2float %143
 %145 = OpCompositeExtract %float %144 0
-%146 = OpFAdd %float %124 %145
+%146 = OpFAdd %float %142 %145
 OpStore %result %146
 %147 = OpLoad %float %result
 %149 = OpFOrdEqual %bool %147 %float_6
diff --git a/tests/sksl/shared/ResizeMatrix.glsl b/tests/sksl/shared/ResizeMatrix.glsl
index de9eaa4..741b52a 100644
--- a/tests/sksl/shared/ResizeMatrix.glsl
+++ b/tests/sksl/shared/ResizeMatrix.glsl
@@ -4,11 +4,17 @@
 uniform vec4 colorRed;
 vec4 main() {
     float result = 0.0;
-    result += mat2(mat3(1.0))[0].x;
-    result += mat2(mat4(1.0))[0].x;
-    result += mat3(mat4(1.0))[0].x;
-    result += mat3(mat2(1.0))[0].x;
-    result += mat4(mat3(mat2(1.0)))[0].x;
-    result += mat2(mat3(mat4(1.0)))[0].x;
+    mat2 a = mat2(mat3(1.0));
+    result += a[0].x;
+    mat2 b = mat2(mat4(1.0));
+    result += b[0].x;
+    mat3 c = mat3(mat4(1.0));
+    result += c[0].x;
+    mat3 d = mat3(mat2(1.0));
+    result += d[0].x;
+    mat4 e = mat4(mat3(mat2(1.0)));
+    result += e[0].x;
+    mat2 f = mat2(mat3(mat4(1.0)));
+    result += f[0].x;
     return result == 6.0 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/ResizeMatrix.metal b/tests/sksl/shared/ResizeMatrix.metal
index aa0deb3..40b3ecd 100644
--- a/tests/sksl/shared/ResizeMatrix.metal
+++ b/tests/sksl/shared/ResizeMatrix.metal
@@ -31,12 +31,18 @@
     Outputs _out;
     (void)_out;
     float result = 0.0;
-    result += float2x2_from_float3x3(float3x3(1.0))[0].x;
-    result += float2x2_from_float4x4(float4x4(1.0))[0].x;
-    result += float3x3_from_float4x4(float4x4(1.0))[0].x;
-    result += float3x3_from_float2x2(float2x2(1.0))[0].x;
-    result += float4x4_from_float3x3(float3x3_from_float2x2(float2x2(1.0)))[0].x;
-    result += float2x2_from_float3x3(float3x3_from_float4x4(float4x4(1.0)))[0].x;
+    float2x2 a = float2x2_from_float3x3(float3x3(1.0));
+    result += a[0].x;
+    float2x2 b = float2x2_from_float4x4(float4x4(1.0));
+    result += b[0].x;
+    float3x3 c = float3x3_from_float4x4(float4x4(1.0));
+    result += c[0].x;
+    float3x3 d = float3x3_from_float2x2(float2x2(1.0));
+    result += d[0].x;
+    float4x4 e = float4x4_from_float3x3(float3x3_from_float2x2(float2x2(1.0)));
+    result += e[0].x;
+    float2x2 f = float2x2_from_float3x3(float3x3_from_float4x4(float4x4(1.0)));
+    result += f[0].x;
     _out.sk_FragColor = result == 6.0 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.glsl b/tests/sksl/shared/ResizeMatrixNonsquare.glsl
index 22c491c..361a746 100644
--- a/tests/sksl/shared/ResizeMatrixNonsquare.glsl
+++ b/tests/sksl/shared/ResizeMatrixNonsquare.glsl
@@ -4,11 +4,17 @@
 uniform vec4 colorRed;
 vec4 main() {
     float result = 0.0;
-    result += mat3(mat2x3(1.0))[0].x;
-    result += mat3(mat3x2(1.0))[0].x;
-    result += mat4(mat4x3(mat4x2(1.0)))[0].x;
-    result += mat4(mat3x4(mat2x4(1.0)))[0].x;
-    result += mat2x4(mat4x2(1.0))[0].x;
-    result += mat4x2(mat2x4(1.0))[0].x;
+    mat3 g = mat3(mat2x3(1.0));
+    result += g[0].x;
+    mat3 h = mat3(mat3x2(1.0));
+    result += h[0].x;
+    mat4 i = mat4(mat4x3(mat4x2(1.0)));
+    result += i[0].x;
+    mat4 j = mat4(mat3x4(mat2x4(1.0)));
+    result += j[0].x;
+    mat2x4 k = mat2x4(mat4x2(1.0));
+    result += k[0].x;
+    mat4x2 l = mat4x2(mat2x4(1.0));
+    result += l[0].x;
     return result == 6.0 ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/ResizeMatrixNonsquare.metal b/tests/sksl/shared/ResizeMatrixNonsquare.metal
index 7f9326c..565bb17 100644
--- a/tests/sksl/shared/ResizeMatrixNonsquare.metal
+++ b/tests/sksl/shared/ResizeMatrixNonsquare.metal
@@ -40,12 +40,18 @@
     Outputs _out;
     (void)_out;
     float result = 0.0;
-    result += float3x3_from_float2x3(float2x3(1.0))[0].x;
-    result += float3x3_from_float3x2(float3x2(1.0))[0].x;
-    result += float4x4_from_float4x3(float4x3_from_float4x2(float4x2(1.0)))[0].x;
-    result += float4x4_from_float3x4(float3x4_from_float2x4(float2x4(1.0)))[0].x;
-    result += float2x4_from_float4x2(float4x2(1.0))[0].x;
-    result += float4x2_from_float2x4(float2x4(1.0))[0].x;
+    float3x3 g = float3x3_from_float2x3(float2x3(1.0));
+    result += g[0].x;
+    float3x3 h = float3x3_from_float3x2(float3x2(1.0));
+    result += h[0].x;
+    float4x4 i = float4x4_from_float4x3(float4x3_from_float4x2(float4x2(1.0)));
+    result += i[0].x;
+    float4x4 j = float4x4_from_float3x4(float3x4_from_float2x4(float2x4(1.0)));
+    result += j[0].x;
+    float2x4 k = float2x4_from_float4x2(float4x2(1.0));
+    result += k[0].x;
+    float4x2 l = float4x2_from_float2x4(float2x4(1.0));
+    result += l[0].x;
     _out.sk_FragColor = result == 6.0 ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
index d1c9048..e33772a 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.asm.frag
@@ -10,6 +10,7 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpMemberName %_UniformBuffer 2 "unknownInput"
 OpName %_entrypoint "_entrypoint"
+OpName %return_on_both_sides "return_on_both_sides"
 OpName %for_inside_body "for_inside_body"
 OpName %x "x"
 OpName %after_for_body "after_for_body"
@@ -18,7 +19,6 @@
 OpName %x_1 "x"
 OpName %if_else_chain "if_else_chain"
 OpName %main "main"
-OpName %_0_return_on_both_sides "_0_return_on_both_sides"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -31,18 +31,17 @@
 OpMemberDecorate %_UniformBuffer 2 Offset 32
 OpMemberDecorate %_UniformBuffer 2 RelaxedPrecision
 OpDecorate %_UniformBuffer Block
-OpDecorate %14 Binding 0
-OpDecorate %14 DescriptorSet 0
-OpDecorate %63 RelaxedPrecision
-OpDecorate %73 RelaxedPrecision
-OpDecorate %79 RelaxedPrecision
+OpDecorate %15 Binding 0
+OpDecorate %15 DescriptorSet 0
+OpDecorate %29 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %81 RelaxedPrecision
 OpDecorate %87 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
-OpDecorate %105 RelaxedPrecision
-OpDecorate %110 RelaxedPrecision
-OpDecorate %134 RelaxedPrecision
-OpDecorate %136 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %102 RelaxedPrecision
 OpDecorate %137 RelaxedPrecision
+OpDecorate %139 RelaxedPrecision
+OpDecorate %140 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -52,211 +51,217 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %_UniformBuffer = OpTypeStruct %v4float %v4float %float
 %_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
-%14 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
+%15 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
 %void = OpTypeVoid
-%19 = OpTypeFunction %void
-%22 = OpTypeFunction %bool
+%20 = OpTypeFunction %void
+%23 = OpTypeFunction %bool
+%_ptr_Uniform_float = OpTypePointer Uniform %float
 %int = OpTypeInt 32 1
+%int_2 = OpConstant %int 2
+%float_1 = OpConstant %float 1
+%true = OpConstantTrue %bool
 %_ptr_Function_int = OpTypePointer Function %int
 %int_0 = OpConstant %int 0
 %int_10 = OpConstant %int 10
-%true = OpConstantTrue %bool
 %int_1 = OpConstant %int 1
-%_ptr_Uniform_float = OpTypePointer Uniform %float
-%int_2 = OpConstant %int 2
-%float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
 %false = OpConstantFalse %bool
 %float_3 = OpConstant %float 3
 %float_4 = OpConstant %float 4
-%100 = OpTypeFunction %v4float
-%_ptr_Function_bool = OpTypePointer Function %bool
+%108 = OpTypeFunction %v4float
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
-%_entrypoint = OpFunction %void None %19
-%20 = OpLabel
-%21 = OpFunctionCall %v4float %main
-OpStore %sk_FragColor %21
+%_entrypoint = OpFunction %void None %20
+%21 = OpLabel
+%22 = OpFunctionCall %v4float %main
+OpStore %sk_FragColor %22
 OpReturn
 OpFunctionEnd
-%for_inside_body = OpFunction %bool None %22
-%23 = OpLabel
-%x = OpVariable %_ptr_Function_int Function
-OpStore %x %int_0
-OpBranch %28
-%28 = OpLabel
-OpLoopMerge %32 %31 None
-OpBranch %29
-%29 = OpLabel
-%33 = OpLoad %int %x
-%35 = OpSLessThanEqual %bool %33 %int_10
-OpBranchConditional %35 %30 %32
-%30 = OpLabel
-OpReturnValue %true
-%31 = OpLabel
-%38 = OpLoad %int %x
-%39 = OpIAdd %int %38 %int_1
-OpStore %x %39
-OpBranch %28
+%return_on_both_sides = OpFunction %bool None %23
+%24 = OpLabel
+%25 = OpAccessChain %_ptr_Uniform_float %15 %int_2
+%29 = OpLoad %float %25
+%31 = OpFOrdEqual %bool %29 %float_1
+OpSelectionMerge %34 None
+OpBranchConditional %31 %32 %33
 %32 = OpLabel
+OpReturnValue %true
+%33 = OpLabel
+OpReturnValue %true
+%34 = OpLabel
 OpUnreachable
 OpFunctionEnd
-%after_for_body = OpFunction %bool None %22
+%for_inside_body = OpFunction %bool None %23
+%36 = OpLabel
+%x = OpVariable %_ptr_Function_int Function
+OpStore %x %int_0
+OpBranch %40
 %40 = OpLabel
+OpLoopMerge %44 %43 None
+OpBranch %41
+%41 = OpLabel
+%45 = OpLoad %int %x
+%47 = OpSLessThanEqual %bool %45 %int_10
+OpBranchConditional %47 %42 %44
+%42 = OpLabel
+OpReturnValue %true
+%43 = OpLabel
+%49 = OpLoad %int %x
+%50 = OpIAdd %int %49 %int_1
+OpStore %x %50
+OpBranch %40
+%44 = OpLabel
+OpUnreachable
+OpFunctionEnd
+%after_for_body = OpFunction %bool None %23
+%51 = OpLabel
 %x_0 = OpVariable %_ptr_Function_int Function
 OpStore %x_0 %int_0
-OpBranch %42
-%42 = OpLabel
-OpLoopMerge %46 %45 None
-OpBranch %43
-%43 = OpLabel
-%47 = OpLoad %int %x_0
-%48 = OpSLessThanEqual %bool %47 %int_10
-OpBranchConditional %48 %44 %46
-%44 = OpLabel
-OpBranch %45
-%45 = OpLabel
-%49 = OpLoad %int %x_0
-%50 = OpIAdd %int %49 %int_1
-OpStore %x_0 %50
-OpBranch %42
-%46 = OpLabel
-OpReturnValue %true
-OpFunctionEnd
-%for_with_double_sided_conditional_return = OpFunction %bool None %22
-%51 = OpLabel
-%x_1 = OpVariable %_ptr_Function_int Function
-OpStore %x_1 %int_0
 OpBranch %53
 %53 = OpLabel
 OpLoopMerge %57 %56 None
 OpBranch %54
 %54 = OpLabel
-%58 = OpLoad %int %x_1
+%58 = OpLoad %int %x_0
 %59 = OpSLessThanEqual %bool %58 %int_10
 OpBranchConditional %59 %55 %57
 %55 = OpLabel
-%60 = OpAccessChain %_ptr_Uniform_float %14 %int_2
-%63 = OpLoad %float %60
-%65 = OpFOrdEqual %bool %63 %float_1
-OpSelectionMerge %68 None
-OpBranchConditional %65 %66 %67
-%66 = OpLabel
-OpReturnValue %true
-%67 = OpLabel
-OpReturnValue %true
-%68 = OpLabel
 OpBranch %56
 %56 = OpLabel
-%69 = OpLoad %int %x_1
-%70 = OpIAdd %int %69 %int_1
-OpStore %x_1 %70
+%60 = OpLoad %int %x_0
+%61 = OpIAdd %int %60 %int_1
+OpStore %x_0 %61
 OpBranch %53
 %57 = OpLabel
-OpUnreachable
+OpReturnValue %true
 OpFunctionEnd
-%if_else_chain = OpFunction %bool None %22
-%71 = OpLabel
-%72 = OpAccessChain %_ptr_Uniform_float %14 %int_2
-%73 = OpLoad %float %72
-%74 = OpFOrdEqual %bool %73 %float_1
-OpSelectionMerge %77 None
-OpBranchConditional %74 %75 %76
+%for_with_double_sided_conditional_return = OpFunction %bool None %23
+%62 = OpLabel
+%x_1 = OpVariable %_ptr_Function_int Function
+OpStore %x_1 %int_0
+OpBranch %64
+%64 = OpLabel
+OpLoopMerge %68 %67 None
+OpBranch %65
+%65 = OpLabel
+%69 = OpLoad %int %x_1
+%70 = OpSLessThanEqual %bool %69 %int_10
+OpBranchConditional %70 %66 %68
+%66 = OpLabel
+%71 = OpAccessChain %_ptr_Uniform_float %15 %int_2
+%72 = OpLoad %float %71
+%73 = OpFOrdEqual %bool %72 %float_1
+OpSelectionMerge %76 None
+OpBranchConditional %73 %74 %75
+%74 = OpLabel
+OpReturnValue %true
 %75 = OpLabel
 OpReturnValue %true
 %76 = OpLabel
-%78 = OpAccessChain %_ptr_Uniform_float %14 %int_2
-%79 = OpLoad %float %78
-%81 = OpFOrdEqual %bool %79 %float_2
-OpSelectionMerge %84 None
-OpBranchConditional %81 %82 %83
-%82 = OpLabel
-OpReturnValue %false
+OpBranch %67
+%67 = OpLabel
+%77 = OpLoad %int %x_1
+%78 = OpIAdd %int %77 %int_1
+OpStore %x_1 %78
+OpBranch %64
+%68 = OpLabel
+OpUnreachable
+OpFunctionEnd
+%if_else_chain = OpFunction %bool None %23
+%79 = OpLabel
+%80 = OpAccessChain %_ptr_Uniform_float %15 %int_2
+%81 = OpLoad %float %80
+%82 = OpFOrdEqual %bool %81 %float_1
+OpSelectionMerge %85 None
+OpBranchConditional %82 %83 %84
 %83 = OpLabel
-%86 = OpAccessChain %_ptr_Uniform_float %14 %int_2
+OpReturnValue %true
+%84 = OpLabel
+%86 = OpAccessChain %_ptr_Uniform_float %15 %int_2
 %87 = OpLoad %float %86
-%89 = OpFOrdEqual %bool %87 %float_3
+%89 = OpFOrdEqual %bool %87 %float_2
 OpSelectionMerge %92 None
 OpBranchConditional %89 %90 %91
 %90 = OpLabel
-OpReturnValue %true
-%91 = OpLabel
-%93 = OpAccessChain %_ptr_Uniform_float %14 %int_2
-%94 = OpLoad %float %93
-%96 = OpFOrdEqual %bool %94 %float_4
-OpSelectionMerge %99 None
-OpBranchConditional %96 %97 %98
-%97 = OpLabel
 OpReturnValue %false
+%91 = OpLabel
+%94 = OpAccessChain %_ptr_Uniform_float %15 %int_2
+%95 = OpLoad %float %94
+%97 = OpFOrdEqual %bool %95 %float_3
+OpSelectionMerge %100 None
+OpBranchConditional %97 %98 %99
 %98 = OpLabel
 OpReturnValue %true
 %99 = OpLabel
+%101 = OpAccessChain %_ptr_Uniform_float %15 %int_2
+%102 = OpLoad %float %101
+%104 = OpFOrdEqual %bool %102 %float_4
+OpSelectionMerge %107 None
+OpBranchConditional %104 %105 %106
+%105 = OpLabel
+OpReturnValue %false
+%106 = OpLabel
+OpReturnValue %true
+%107 = OpLabel
+OpBranch %100
+%100 = OpLabel
 OpBranch %92
 %92 = OpLabel
-OpBranch %84
-%84 = OpLabel
-OpBranch %77
-%77 = OpLabel
+OpBranch %85
+%85 = OpLabel
 OpUnreachable
 OpFunctionEnd
-%main = OpFunction %v4float None %100
-%101 = OpLabel
-%_0_return_on_both_sides = OpVariable %_ptr_Function_bool Function
-%127 = OpVariable %_ptr_Function_v4float Function
-%104 = OpAccessChain %_ptr_Uniform_float %14 %int_2
-%105 = OpLoad %float %104
-%106 = OpFOrdEqual %bool %105 %float_1
-OpSelectionMerge %109 None
-OpBranchConditional %106 %107 %108
-%107 = OpLabel
-OpStore %_0_return_on_both_sides %true
-OpBranch %109
-%108 = OpLabel
-OpStore %_0_return_on_both_sides %true
-OpBranch %109
+%main = OpFunction %v4float None %108
 %109 = OpLabel
-%110 = OpLoad %bool %_0_return_on_both_sides
-OpSelectionMerge %112 None
-OpBranchConditional %110 %111 %112
+%130 = OpVariable %_ptr_Function_v4float Function
+OpSelectionMerge %111 None
+OpBranchConditional %true %110 %111
+%110 = OpLabel
+%112 = OpFunctionCall %bool %return_on_both_sides
+OpBranch %111
 %111 = OpLabel
-%113 = OpFunctionCall %bool %for_inside_body
-OpBranch %112
-%112 = OpLabel
-%114 = OpPhi %bool %false %109 %113 %111
-OpSelectionMerge %116 None
-OpBranchConditional %114 %115 %116
+%113 = OpPhi %bool %false %109 %112 %110
+OpSelectionMerge %115 None
+OpBranchConditional %113 %114 %115
+%114 = OpLabel
+%116 = OpFunctionCall %bool %for_inside_body
+OpBranch %115
 %115 = OpLabel
-%117 = OpFunctionCall %bool %after_for_body
-OpBranch %116
-%116 = OpLabel
-%118 = OpPhi %bool %false %112 %117 %115
-OpSelectionMerge %120 None
-OpBranchConditional %118 %119 %120
+%117 = OpPhi %bool %false %111 %116 %114
+OpSelectionMerge %119 None
+OpBranchConditional %117 %118 %119
+%118 = OpLabel
+%120 = OpFunctionCall %bool %after_for_body
+OpBranch %119
 %119 = OpLabel
-%121 = OpFunctionCall %bool %for_with_double_sided_conditional_return
-OpBranch %120
-%120 = OpLabel
-%122 = OpPhi %bool %false %116 %121 %119
-OpSelectionMerge %124 None
-OpBranchConditional %122 %123 %124
+%121 = OpPhi %bool %false %115 %120 %118
+OpSelectionMerge %123 None
+OpBranchConditional %121 %122 %123
+%122 = OpLabel
+%124 = OpFunctionCall %bool %for_with_double_sided_conditional_return
+OpBranch %123
 %123 = OpLabel
-%125 = OpFunctionCall %bool %if_else_chain
-OpBranch %124
-%124 = OpLabel
-%126 = OpPhi %bool %false %120 %125 %123
-OpSelectionMerge %131 None
-OpBranchConditional %126 %129 %130
-%129 = OpLabel
-%132 = OpAccessChain %_ptr_Uniform_v4float %14 %int_0
-%134 = OpLoad %v4float %132
-OpStore %127 %134
-OpBranch %131
-%130 = OpLabel
-%135 = OpAccessChain %_ptr_Uniform_v4float %14 %int_1
-%136 = OpLoad %v4float %135
-OpStore %127 %136
-OpBranch %131
-%131 = OpLabel
-%137 = OpLoad %v4float %127
-OpReturnValue %137
+%125 = OpPhi %bool %false %119 %124 %122
+OpSelectionMerge %127 None
+OpBranchConditional %125 %126 %127
+%126 = OpLabel
+%128 = OpFunctionCall %bool %if_else_chain
+OpBranch %127
+%127 = OpLabel
+%129 = OpPhi %bool %false %123 %128 %126
+OpSelectionMerge %134 None
+OpBranchConditional %129 %132 %133
+%132 = OpLabel
+%135 = OpAccessChain %_ptr_Uniform_v4float %15 %int_0
+%137 = OpLoad %v4float %135
+OpStore %130 %137
+OpBranch %134
+%133 = OpLabel
+%138 = OpAccessChain %_ptr_Uniform_v4float %15 %int_1
+%139 = OpLoad %v4float %138
+OpStore %130 %139
+OpBranch %134
+%134 = OpLabel
+%140 = OpLoad %v4float %130
+OpReturnValue %140
 OpFunctionEnd
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.glsl b/tests/sksl/shared/ReturnsValueOnEveryPathES2.glsl
index 4c631f6..dc7d64e 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.glsl
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.glsl
@@ -3,6 +3,9 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 uniform float unknownInput;
+bool return_on_both_sides() {
+    if (unknownInput == 1.0) return true; else return true;
+}
 bool for_inside_body() {
     for (int x = 0;x <= 10; ++x) {
         return true;
@@ -10,6 +13,8 @@
 }
 bool after_for_body() {
     for (int x = 0;x <= 10; ++x) {
+        true;
+
     }
     return true;
 }
@@ -22,9 +27,6 @@
     if (unknownInput == 1.0) return true; else if (unknownInput == 2.0) return false; else if (unknownInput == 3.0) return true; else if (unknownInput == 4.0) return false; else return true;
 }
 vec4 main() {
-    bool _0_return_on_both_sides;
-    if (unknownInput == 1.0) _0_return_on_both_sides = true; else _0_return_on_both_sides = true;
-    return (((_0_return_on_both_sides && for_inside_body()) && after_for_body()) && for_with_double_sided_conditional_return()) && if_else_chain() ? colorGreen : colorRed;
-
+    return ((((true && return_on_both_sides()) && for_inside_body()) && after_for_body()) && for_with_double_sided_conditional_return()) && if_else_chain() ? colorGreen : colorRed;
 
 }
diff --git a/tests/sksl/shared/ReturnsValueOnEveryPathES2.metal b/tests/sksl/shared/ReturnsValueOnEveryPathES2.metal
index a03f265..4e3f281 100644
--- a/tests/sksl/shared/ReturnsValueOnEveryPathES2.metal
+++ b/tests/sksl/shared/ReturnsValueOnEveryPathES2.metal
@@ -14,6 +14,9 @@
 
 
 
+bool return_on_both_sides(Uniforms _uniforms) {
+    if (_uniforms.unknownInput == 1.0) return true; else return true;
+}
 bool for_inside_body() {
     for (int x = 0;x <= 10; ++x) {
         return true;
@@ -21,6 +24,8 @@
 }
 bool after_for_body() {
     for (int x = 0;x <= 10; ++x) {
+        true;
+
     }
     return true;
 }
@@ -35,10 +40,7 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    bool _0_return_on_both_sides;
-    if (_uniforms.unknownInput == 1.0) _0_return_on_both_sides = true; else _0_return_on_both_sides = true;
-    _out.sk_FragColor = (((_0_return_on_both_sides && for_inside_body()) && after_for_body()) && for_with_double_sided_conditional_return(_uniforms)) && if_else_chain(_uniforms) ? _uniforms.colorGreen : _uniforms.colorRed;
+    _out.sk_FragColor = ((((true && return_on_both_sides(_uniforms)) && for_inside_body()) && after_for_body()) && for_with_double_sided_conditional_return(_uniforms)) && if_else_chain(_uniforms) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 
-
 }
diff --git a/tests/sksl/shared/SampleLocations.asm.vert b/tests/sksl/shared/SampleLocations.asm.vert
index bf46340..a031534 100644
--- a/tests/sksl/shared/SampleLocations.asm.vert
+++ b/tests/sksl/shared/SampleLocations.asm.vert
@@ -55,7 +55,6 @@
 %int_0 = OpConstant %int 0
 %int_2 = OpConstant %int 2
 %bool = OpTypeBool
-%float_n0_03125 = OpConstant %float -0.03125
 %float_16 = OpConstant %float 16
 %_ptr_Function_v2float = OpTypePointer Function %v2float
 %int_n1 = OpConstant %int -1
@@ -72,13 +71,14 @@
 %itop = OpVariable %_ptr_Function_int Function
 %ibot = OpVariable %_ptr_Function_int Function
 %outset = OpVariable %_ptr_Function_float Function
+%69 = OpVariable %_ptr_Function_float Function
 %l = OpVariable %_ptr_Function_float Function
 %r = OpVariable %_ptr_Function_float Function
 %t = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_float Function
 %vertexpos = OpVariable %_ptr_Function_v2float Function
-%103 = OpVariable %_ptr_Function_float Function
-%117 = OpVariable %_ptr_Function_float Function
+%109 = OpVariable %_ptr_Function_float Function
+%123 = OpVariable %_ptr_Function_float Function
 %20 = OpLoad %int %sk_InstanceID
 %22 = OpSMod %int %20 %int_200
 OpStore %x %22
@@ -117,92 +117,104 @@
 %64 = OpIAdd %int %62 %63
 %66 = OpSMod %int %64 %int_2
 %67 = OpIEqual %bool %int_0 %66
-%69 = OpSelect %float %67 %float_n0_03125 %float_0_03125
-OpStore %outset %69
-%72 = OpLoad %int %ileft
-%73 = OpConvertSToF %float %72
-%75 = OpFDiv %float %73 %float_16
-%76 = OpLoad %float %outset
-%77 = OpFSub %float %75 %76
-OpStore %l %77
-%79 = OpLoad %int %iright
-%80 = OpConvertSToF %float %79
-%81 = OpFDiv %float %80 %float_16
+OpSelectionMerge %72 None
+OpBranchConditional %67 %70 %71
+%70 = OpLabel
+%74 = OpLoad %float %outset
+%73 = OpFNegate %float %74
+OpStore %69 %73
+OpBranch %72
+%71 = OpLabel
+%75 = OpLoad %float %outset
+OpStore %69 %75
+OpBranch %72
+%72 = OpLabel
+%76 = OpLoad %float %69
+OpStore %outset %76
+%78 = OpLoad %int %ileft
+%79 = OpConvertSToF %float %78
+%81 = OpFDiv %float %79 %float_16
 %82 = OpLoad %float %outset
-%83 = OpFAdd %float %81 %82
-OpStore %r %83
-%85 = OpLoad %int %itop
+%83 = OpFSub %float %81 %82
+OpStore %l %83
+%85 = OpLoad %int %iright
 %86 = OpConvertSToF %float %85
 %87 = OpFDiv %float %86 %float_16
 %88 = OpLoad %float %outset
-%89 = OpFSub %float %87 %88
-OpStore %t %89
-%91 = OpLoad %int %ibot
+%89 = OpFAdd %float %87 %88
+OpStore %r %89
+%91 = OpLoad %int %itop
 %92 = OpConvertSToF %float %91
 %93 = OpFDiv %float %92 %float_16
 %94 = OpLoad %float %outset
-%95 = OpFAdd %float %93 %94
-OpStore %b %95
-%98 = OpLoad %int %x
-%99 = OpConvertSToF %float %98
-%100 = OpLoad %int %sk_VertexID
-%101 = OpSMod %int %100 %int_2
-%102 = OpIEqual %bool %int_0 %101
-OpSelectionMerge %106 None
-OpBranchConditional %102 %104 %105
-%104 = OpLabel
-%107 = OpLoad %float %l
-OpStore %103 %107
-OpBranch %106
-%105 = OpLabel
-%108 = OpLoad %float %r
-OpStore %103 %108
-OpBranch %106
-%106 = OpLabel
-%109 = OpLoad %float %103
-%110 = OpFAdd %float %99 %109
-%111 = OpAccessChain %_ptr_Function_float %vertexpos %int_0
-OpStore %111 %110
-%112 = OpLoad %int %y
-%113 = OpConvertSToF %float %112
-%114 = OpLoad %int %sk_VertexID
-%115 = OpSDiv %int %114 %int_2
-%116 = OpIEqual %bool %int_0 %115
-OpSelectionMerge %120 None
-OpBranchConditional %116 %118 %119
-%118 = OpLabel
-%121 = OpLoad %float %t
-OpStore %117 %121
-OpBranch %120
-%119 = OpLabel
-%122 = OpLoad %float %b
-OpStore %117 %122
-OpBranch %120
-%120 = OpLabel
-%123 = OpLoad %float %117
-%124 = OpFAdd %float %113 %123
-%125 = OpAccessChain %_ptr_Function_float %vertexpos %int_1
-OpStore %125 %124
-%126 = OpLoad %int %sk_VertexID
-%127 = OpSMod %int %126 %int_2
-%128 = OpIEqual %bool %int_0 %127
-%129 = OpSelect %int %128 %int_n1 %int_1
-%131 = OpConvertSToF %float %129
-%132 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0
-OpStore %132 %131
-%134 = OpLoad %int %sk_VertexID
-%135 = OpSDiv %int %134 %int_2
-%136 = OpIEqual %bool %int_0 %135
-%137 = OpSelect %int %136 %int_n1 %int_1
-%138 = OpConvertSToF %float %137
-%139 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1
-OpStore %139 %138
-%140 = OpLoad %v2float %vertexpos
-%141 = OpCompositeExtract %float %140 0
-%142 = OpLoad %v2float %vertexpos
-%143 = OpCompositeExtract %float %142 1
-%146 = OpCompositeConstruct %v4float %141 %143 %float_0 %float_1
-%147 = OpAccessChain %_ptr_Output_v4float %3 %int_0
-OpStore %147 %146
+%95 = OpFSub %float %93 %94
+OpStore %t %95
+%97 = OpLoad %int %ibot
+%98 = OpConvertSToF %float %97
+%99 = OpFDiv %float %98 %float_16
+%100 = OpLoad %float %outset
+%101 = OpFAdd %float %99 %100
+OpStore %b %101
+%104 = OpLoad %int %x
+%105 = OpConvertSToF %float %104
+%106 = OpLoad %int %sk_VertexID
+%107 = OpSMod %int %106 %int_2
+%108 = OpIEqual %bool %int_0 %107
+OpSelectionMerge %112 None
+OpBranchConditional %108 %110 %111
+%110 = OpLabel
+%113 = OpLoad %float %l
+OpStore %109 %113
+OpBranch %112
+%111 = OpLabel
+%114 = OpLoad %float %r
+OpStore %109 %114
+OpBranch %112
+%112 = OpLabel
+%115 = OpLoad %float %109
+%116 = OpFAdd %float %105 %115
+%117 = OpAccessChain %_ptr_Function_float %vertexpos %int_0
+OpStore %117 %116
+%118 = OpLoad %int %y
+%119 = OpConvertSToF %float %118
+%120 = OpLoad %int %sk_VertexID
+%121 = OpSDiv %int %120 %int_2
+%122 = OpIEqual %bool %int_0 %121
+OpSelectionMerge %126 None
+OpBranchConditional %122 %124 %125
+%124 = OpLabel
+%127 = OpLoad %float %t
+OpStore %123 %127
+OpBranch %126
+%125 = OpLabel
+%128 = OpLoad %float %b
+OpStore %123 %128
+OpBranch %126
+%126 = OpLabel
+%129 = OpLoad %float %123
+%130 = OpFAdd %float %119 %129
+%131 = OpAccessChain %_ptr_Function_float %vertexpos %int_1
+OpStore %131 %130
+%132 = OpLoad %int %sk_VertexID
+%133 = OpSMod %int %132 %int_2
+%134 = OpIEqual %bool %int_0 %133
+%135 = OpSelect %int %134 %int_n1 %int_1
+%137 = OpConvertSToF %float %135
+%138 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_0
+OpStore %138 %137
+%140 = OpLoad %int %sk_VertexID
+%141 = OpSDiv %int %140 %int_2
+%142 = OpIEqual %bool %int_0 %141
+%143 = OpSelect %int %142 %int_n1 %int_1
+%144 = OpConvertSToF %float %143
+%145 = OpAccessChain %_ptr_Output_float %vcoord_Stage0 %int_1
+OpStore %145 %144
+%146 = OpLoad %v2float %vertexpos
+%147 = OpCompositeExtract %float %146 0
+%148 = OpLoad %v2float %vertexpos
+%149 = OpCompositeExtract %float %148 1
+%152 = OpCompositeConstruct %v4float %147 %149 %float_0 %float_1
+%153 = OpAccessChain %_ptr_Output_v4float %3 %int_0
+OpStore %153 %152
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/SampleLocations.glsl b/tests/sksl/shared/SampleLocations.glsl
index 25be3a4..b1f1699 100644
--- a/tests/sksl/shared/SampleLocations.glsl
+++ b/tests/sksl/shared/SampleLocations.glsl
@@ -8,7 +8,7 @@
     int itop = (gl_InstanceID * 313) % 17;
     int ibot = (itop + 1) + (gl_InstanceID * 1901) % (17 - itop);
     float outset = 0.03125;
-    outset = 0 == (x + y) % 2 ? -0.03125 : 0.03125;
+    outset = 0 == (x + y) % 2 ? -outset : outset;
     float l = float(ileft) / 16.0 - outset;
     float r = float(iright) / 16.0 + outset;
     float t = float(itop) / 16.0 - outset;
diff --git a/tests/sksl/shared/SampleLocations.metal b/tests/sksl/shared/SampleLocations.metal
index dd3afc3..085e2eb 100644
--- a/tests/sksl/shared/SampleLocations.metal
+++ b/tests/sksl/shared/SampleLocations.metal
@@ -19,7 +19,7 @@
     int itop = (sk_InstanceID * 313) % 17;
     int ibot = (itop + 1) + (sk_InstanceID * 1901) % (17 - itop);
     float outset = 0.03125;
-    outset = 0 == (x + y) % 2 ? -0.03125 : 0.03125;
+    outset = 0 == (x + y) % 2 ? -outset : outset;
     float l = float(ileft) / 16.0 - outset;
     float r = float(iright) / 16.0 + outset;
     float t = float(itop) / 16.0 - outset;
diff --git a/tests/sksl/shared/ScopedSymbol.asm.frag b/tests/sksl/shared/ScopedSymbol.asm.frag
index b4a67d5..e8718c5 100644
--- a/tests/sksl/shared/ScopedSymbol.asm.frag
+++ b/tests/sksl/shared/ScopedSymbol.asm.frag
@@ -5,6 +5,7 @@
 OpExecutionMode %main OriginUpperLeft
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 %bool = OpTypeBool
@@ -12,7 +13,10 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %7 = OpTypeFunction %void
+%int = OpTypeInt 32 1
+%_ptr_Function_int = OpTypePointer Function %int
 %main = OpFunction %void None %7
 %8 = OpLabel
+%x = OpVariable %_ptr_Function_int Function
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/ScopedSymbol.glsl b/tests/sksl/shared/ScopedSymbol.glsl
index 2933520..cd55abe 100644
--- a/tests/sksl/shared/ScopedSymbol.glsl
+++ b/tests/sksl/shared/ScopedSymbol.glsl
@@ -1,3 +1,4 @@
 
 void main() {
+    int x;
 }
diff --git a/tests/sksl/shared/ScopedSymbol.metal b/tests/sksl/shared/ScopedSymbol.metal
index 2402b80..fa417c5 100644
--- a/tests/sksl/shared/ScopedSymbol.metal
+++ b/tests/sksl/shared/ScopedSymbol.metal
@@ -9,5 +9,6 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    int x;
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithBreak.asm.frag
index 89d4085..1a5f457 100644
--- a/tests/sksl/shared/StaticSwitchWithBreak.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithBreak.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,15 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpStore %x %float_0
+%16 = OpLoad %float %x
+%17 = OpCompositeConstruct %v4float %16 %16 %16 %16
+OpStore %sk_FragColor %17
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithBreak.glsl b/tests/sksl/shared/StaticSwitchWithBreak.glsl
index 604f63c..556d5b8 100644
--- a/tests/sksl/shared/StaticSwitchWithBreak.glsl
+++ b/tests/sksl/shared/StaticSwitchWithBreak.glsl
@@ -1,5 +1,9 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor = vec4(0.0);
+    float x = 0.0;
+    {
+        x = 0.0;
+    }
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/StaticSwitchWithBreak.metal b/tests/sksl/shared/StaticSwitchWithBreak.metal
index 2e1f57e..d5d54b4 100644
--- a/tests/sksl/shared/StaticSwitchWithBreak.metal
+++ b/tests/sksl/shared/StaticSwitchWithBreak.metal
@@ -9,6 +9,10 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(0.0);
+    float x = 0.0;
+    {
+        x = 0.0;
+    }
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag
index 89d4085..1a5f457 100644
--- a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,15 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpStore %x %float_0
+%16 = OpLoad %float %x
+%17 = OpCompositeConstruct %v4float %16 %16 %16 %16
+OpStore %sk_FragColor %17
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.glsl b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.glsl
index 9e5739f..f14db13 100644
--- a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.glsl
+++ b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.glsl
@@ -1,9 +1,11 @@
 
 out vec4 sk_FragColor;
 void main() {
+    float x = 0.0;
     {
         {
-            sk_FragColor = vec4(0.0);
+            x = 0.0;
+            sk_FragColor = vec4(x);
         }
     }
 }
diff --git a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.metal b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.metal
index d9d7bd5..50de662 100644
--- a/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.metal
+++ b/tests/sksl/shared/StaticSwitchWithBreakInsideBlock.metal
@@ -9,9 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float x = 0.0;
     {
         {
-            _out.sk_FragColor = float4(0.0);
+            x = 0.0;
+            _out.sk_FragColor = float4(x);
         }
     }
     return _out;
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
index 19c5fe7..ccdfcd3 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.asm.frag
@@ -34,20 +34,21 @@
 OpSwitch %int_0 %18 0 %19 1 %20
 %19 = OpLabel
 OpStore %x %float_0
-%21 = OpExtInst %float %1 Sqrt %float_1
-%23 = OpFOrdLessThan %bool %float_0 %21
-OpSelectionMerge %25 None
-OpBranchConditional %23 %24 %25
-%24 = OpLabel
-OpBranch %18
+%21 = OpLoad %float %x
+%22 = OpExtInst %float %1 Sqrt %float_1
+%24 = OpFOrdLessThan %bool %21 %22
+OpSelectionMerge %26 None
+OpBranchConditional %24 %25 %26
 %25 = OpLabel
+OpBranch %18
+%26 = OpLabel
 OpBranch %20
 %20 = OpLabel
 OpStore %x %float_1
 OpBranch %18
 %18 = OpLabel
-%26 = OpLoad %float %x
-%27 = OpCompositeConstruct %v4float %26 %26 %26 %26
-OpStore %sk_FragColor %27
+%27 = OpLoad %float %x
+%28 = OpCompositeConstruct %v4float %27 %27 %27 %27
+OpStore %sk_FragColor %28
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl b/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
index 3bb6041..4fb783b 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.glsl
@@ -5,7 +5,7 @@
     switch (0) {
         case 0:
             x = 0.0;
-            if (0.0 < sqrt(1.0)) break;
+            if (x < sqrt(1.0)) break;
         case 1:
             x = 1.0;
     }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal b/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
index 49bde33..79cd08b 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreak.metal
@@ -13,7 +13,7 @@
     switch (0) {
         case 0:
             x = 0.0;
-            if (0.0 < sqrt(1.0)) break;
+            if (x < sqrt(1.0)) break;
         case 1:
             x = 1.0;
     }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
index 5f95f47..7266afb 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,27 +21,34 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+%float_0 = OpConstant %float 0
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
-%float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
-%24 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpSelectionMerge %15 None
-OpSwitch %int_0 %15 0 %16 1 %17
-%16 = OpLabel
-%19 = OpExtInst %float %1 Sqrt %float_1
-%21 = OpFOrdLessThan %bool %float_0 %19
-OpSelectionMerge %23 None
-OpBranchConditional %21 %22 %23
-%22 = OpLabel
-OpStore %sk_FragColor %24
-OpBranch %15
-%23 = OpLabel
-OpBranch %17
-%17 = OpLabel
-OpBranch %15
-%15 = OpLabel
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpSelectionMerge %18 None
+OpSwitch %int_0 %18 0 %19 1 %20
+%19 = OpLabel
+OpStore %x %float_0
+%21 = OpLoad %float %x
+%22 = OpExtInst %float %1 Sqrt %float_1
+%24 = OpFOrdLessThan %bool %21 %22
+OpSelectionMerge %26 None
+OpBranchConditional %24 %25 %26
+%25 = OpLabel
+%27 = OpLoad %float %x
+%28 = OpCompositeConstruct %v4float %27 %27 %27 %27
+OpStore %sk_FragColor %28
+OpBranch %18
+%26 = OpLabel
+OpBranch %20
+%20 = OpLabel
+OpStore %x %float_1
+OpBranch %18
+%18 = OpLabel
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
index 5fad5c3..2a7a3ad 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.glsl
@@ -1,14 +1,15 @@
 
 out vec4 sk_FragColor;
 void main() {
+    float x = 0.0;
     switch (0) {
         case 0:
-            ;
-            if (0.0 < sqrt(1.0)) {
-                sk_FragColor = vec4(0.0);
+            x = 0.0;
+            if (x < sqrt(1.0)) {
+                sk_FragColor = vec4(x);
                 break;
             }
         case 1:
-            ;
+            x = 1.0;
     }
 }
diff --git a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
index 0c95293..204be79 100644
--- a/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
+++ b/tests/sksl/shared/StaticSwitchWithConditionalBreakInsideBlock.metal
@@ -9,15 +9,16 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float x = 0.0;
     switch (0) {
         case 0:
-            ;
-            if (0.0 < sqrt(1.0)) {
-                _out.sk_FragColor = float4(0.0);
+            x = 0.0;
+            if (x < sqrt(1.0)) {
+                _out.sk_FragColor = float4(x);
                 break;
             }
         case 1:
-            ;
+            x = 1.0;
     }
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag b/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag
index dd44a22..4ccde7d 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughA.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,17 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+%float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
-%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpStore %x %float_0
+OpStore %x %float_1
+%17 = OpLoad %float %x
+%18 = OpCompositeConstruct %v4float %17 %17 %17 %17
+OpStore %sk_FragColor %18
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughA.glsl b/tests/sksl/shared/StaticSwitchWithFallthroughA.glsl
index 61ae418..235ba25 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughA.glsl
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughA.glsl
@@ -1,5 +1,10 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor = vec4(1.0);
+    float x = 0.0;
+    {
+        x = 0.0;
+        x = 1.0;
+    }
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughA.metal b/tests/sksl/shared/StaticSwitchWithFallthroughA.metal
index ddfae7a..0f4eb7f 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughA.metal
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughA.metal
@@ -9,6 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(1.0);
+    float x = 0.0;
+    {
+        x = 0.0;
+        x = 1.0;
+    }
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag b/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag
index dd44a22..dc12b2a 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughB.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,16 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
+%float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
-%14 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpStore %x %float_1
+%17 = OpLoad %float %x
+%18 = OpCompositeConstruct %v4float %17 %17 %17 %17
+OpStore %sk_FragColor %18
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughB.glsl b/tests/sksl/shared/StaticSwitchWithFallthroughB.glsl
index 61ae418..cb320ef 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughB.glsl
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughB.glsl
@@ -1,5 +1,9 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor = vec4(1.0);
+    float x = 0.0;
+    {
+        x = 1.0;
+    }
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/StaticSwitchWithFallthroughB.metal b/tests/sksl/shared/StaticSwitchWithFallthroughB.metal
index ddfae7a..52c3aba 100644
--- a/tests/sksl/shared/StaticSwitchWithFallthroughB.metal
+++ b/tests/sksl/shared/StaticSwitchWithFallthroughB.metal
@@ -9,6 +9,10 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(1.0);
+    float x = 0.0;
+    {
+        x = 1.0;
+    }
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag
index 89d4085..4ced82f 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,33 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%float_1 = OpConstant %float 1
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpSelectionMerge %18 None
+OpSwitch %int_0 %18 0 %19 1 %20
+%19 = OpLabel
+OpStore %x %float_0
+%21 = OpLoad %float %x
+%23 = OpFOrdLessThan %bool %21 %float_1
+OpSelectionMerge %25 None
+OpBranchConditional %23 %24 %25
+%24 = OpLabel
+OpBranch %18
+%25 = OpLabel
+OpBranch %20
+%20 = OpLabel
+OpStore %x %float_1
+OpBranch %18
+%18 = OpLabel
+%26 = OpLoad %float %x
+%27 = OpCompositeConstruct %v4float %26 %26 %26 %26
+OpStore %sk_FragColor %27
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.glsl b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.glsl
index 604f63c..74475f1 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.glsl
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.glsl
@@ -1,5 +1,13 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor = vec4(0.0);
+    float x = 0.0;
+    switch (0) {
+        case 0:
+            x = 0.0;
+            if (x < 1.0) break;
+        case 1:
+            x = 1.0;
+    }
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.metal b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.metal
index 2e1f57e..865aa52 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.metal
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreak.metal
@@ -9,6 +9,14 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(0.0);
+    float x = 0.0;
+    switch (0) {
+        case 0:
+            x = 0.0;
+            if (x < 1.0) break;
+        case 1:
+            x = 1.0;
+    }
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag
index 89d4085..9293601 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,10 +21,33 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
-%14 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
+%int = OpTypeInt 32 1
+%int_0 = OpConstant %int 0
+%float_1 = OpConstant %float 1
 %main = OpFunction %void None %11
 %12 = OpLabel
-OpStore %sk_FragColor %14
+%x = OpVariable %_ptr_Function_float Function
+OpStore %x %float_0
+OpSelectionMerge %18 None
+OpSwitch %int_0 %18 0 %19 1 %20
+%19 = OpLabel
+OpStore %x %float_0
+%21 = OpLoad %float %x
+%23 = OpFOrdLessThan %bool %21 %float_1
+OpSelectionMerge %25 None
+OpBranchConditional %23 %24 %25
+%24 = OpLabel
+%26 = OpLoad %float %x
+%27 = OpCompositeConstruct %v4float %26 %26 %26 %26
+OpStore %sk_FragColor %27
+OpBranch %18
+%25 = OpLabel
+OpBranch %20
+%20 = OpLabel
+OpStore %x %float_1
+OpBranch %18
+%18 = OpLabel
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.glsl b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.glsl
index 9e5739f..25a8636 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.glsl
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.glsl
@@ -1,9 +1,15 @@
 
 out vec4 sk_FragColor;
 void main() {
-    {
-        {
-            sk_FragColor = vec4(0.0);
-        }
+    float x = 0.0;
+    switch (0) {
+        case 0:
+            x = 0.0;
+            if (x < 1.0) {
+                sk_FragColor = vec4(x);
+                break;
+            }
+        case 1:
+            x = 1.0;
     }
 }
diff --git a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.metal b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.metal
index d9d7bd5..a763f16 100644
--- a/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.metal
+++ b/tests/sksl/shared/StaticSwitchWithStaticConditionalBreakInsideBlock.metal
@@ -9,10 +9,16 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    {
-        {
-            _out.sk_FragColor = float4(0.0);
-        }
+    float x = 0.0;
+    switch (0) {
+        case 0:
+            x = 0.0;
+            if (x < 1.0) {
+                _out.sk_FragColor = float4(x);
+                break;
+            }
+        case 1:
+            x = 1.0;
     }
     return _out;
 }
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.asm.frag b/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
index 0a3cbbf..9120d9b 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
+++ b/tests/sksl/shared/SwitchContainingDeadCode.asm.frag
@@ -6,6 +6,7 @@
 OpName %sk_FragColor "sk_FragColor"
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %main "main"
+OpName %x "x"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -20,22 +21,30 @@
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
 %void = OpTypeVoid
 %11 = OpTypeFunction %void
+%_ptr_Function_float = OpTypePointer Function %float
 %float_2 = OpConstant %float 2
 %int = OpTypeInt 32 1
-%21 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
 %main = OpFunction %void None %11
 %12 = OpLabel
-%13 = OpExtInst %float %1 Sqrt %float_2
-%15 = OpConvertFToS %int %13
-OpSelectionMerge %17 None
-OpSwitch %15 %20 0 %18 1 %19
-%18 = OpLabel
+%x = OpVariable %_ptr_Function_float Function
+%15 = OpExtInst %float %1 Sqrt %float_2
+%17 = OpConvertFToS %int %15
+OpSelectionMerge %19 None
+OpSwitch %17 %22 0 %20 1 %21
+%20 = OpLabel
+OpStore %x %float_0
+OpBranch %21
+%21 = OpLabel
+OpStore %x %float_1
+OpBranch %22
+%22 = OpLabel
+OpStore %x %float_2
 OpBranch %19
 %19 = OpLabel
-OpBranch %20
-%20 = OpLabel
-OpBranch %17
-%17 = OpLabel
-OpStore %sk_FragColor %21
+%25 = OpLoad %float %x
+%26 = OpCompositeConstruct %v4float %25 %25 %25 %25
+OpStore %sk_FragColor %26
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.glsl b/tests/sksl/shared/SwitchContainingDeadCode.glsl
index 0d81a79..af43810 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.glsl
+++ b/tests/sksl/shared/SwitchContainingDeadCode.glsl
@@ -1,13 +1,14 @@
 
 out vec4 sk_FragColor;
 void main() {
+    float x;
     switch (int(sqrt(2.0))) {
         case 0:
-            ;
+            x = 0.0;
         case 1:
-            ;
+            x = 1.0;
         default:
-            ;
+            x = 2.0;
     }
-    sk_FragColor = vec4(2.0);
+    sk_FragColor = vec4(x);
 }
diff --git a/tests/sksl/shared/SwitchContainingDeadCode.metal b/tests/sksl/shared/SwitchContainingDeadCode.metal
index c9efdf1..61b6d59 100644
--- a/tests/sksl/shared/SwitchContainingDeadCode.metal
+++ b/tests/sksl/shared/SwitchContainingDeadCode.metal
@@ -9,14 +9,15 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float x;
     switch (int(sqrt(2.0))) {
         case 0:
-            ;
+            x = 0.0;
         case 1:
-            ;
+            x = 1.0;
         default:
-            ;
+            x = 2.0;
     }
-    _out.sk_FragColor = float4(2.0);
+    _out.sk_FragColor = float4(x);
     return _out;
 }
diff --git a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
index 5b1648e..e396324 100644
--- a/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
+++ b/tests/sksl/shared/SwizzleByConstantIndex.asm.frag
@@ -17,11 +17,21 @@
 OpName %_3_z "_3_z"
 OpName %_4_w "_4_w"
 OpName %a "a"
-OpName %_5_x "_5_x"
-OpName %_6_y "_6_y"
-OpName %_7_z "_7_z"
-OpName %_8_w "_8_w"
+OpName %_5_ZERO "_5_ZERO"
+OpName %_6_ONE "_6_ONE"
+OpName %_7_TWO "_7_TWO"
+OpName %_8_THREE "_8_THREE"
+OpName %_9_x "_9_x"
+OpName %_10_y "_10_y"
+OpName %_11_z "_11_z"
+OpName %_12_w "_12_w"
 OpName %b "b"
+OpName %_13_v "_13_v"
+OpName %_14_x "_14_x"
+OpName %_15_y "_15_y"
+OpName %_16_z "_16_z"
+OpName %_17_w "_17_w"
+OpName %c "c"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -45,19 +55,28 @@
 OpDecorate %42 RelaxedPrecision
 OpDecorate %43 RelaxedPrecision
 OpDecorate %44 RelaxedPrecision
-OpDecorate %48 RelaxedPrecision
-OpDecorate %52 RelaxedPrecision
 OpDecorate %56 RelaxedPrecision
 OpDecorate %60 RelaxedPrecision
-OpDecorate %63 RelaxedPrecision
 OpDecorate %64 RelaxedPrecision
-OpDecorate %65 RelaxedPrecision
-OpDecorate %66 RelaxedPrecision
-OpDecorate %69 RelaxedPrecision
-OpDecorate %80 RelaxedPrecision
-OpDecorate %90 RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %94 RelaxedPrecision
+OpDecorate %68 RelaxedPrecision
+OpDecorate %71 RelaxedPrecision
+OpDecorate %72 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
+OpDecorate %74 RelaxedPrecision
+OpDecorate %83 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
+OpDecorate %89 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %95 RelaxedPrecision
+OpDecorate %96 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
+OpDecorate %98 RelaxedPrecision
+OpDecorate %101 RelaxedPrecision
+OpDecorate %111 RelaxedPrecision
+OpDecorate %117 RelaxedPrecision
+OpDecorate %126 RelaxedPrecision
+OpDecorate %128 RelaxedPrecision
+OpDecorate %129 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -76,15 +95,21 @@
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %_ptr_Function_float = OpTypePointer Function %float
-%false = OpConstantFalse %bool
-%float_n1_25 = OpConstant %float -1.25
-%float_0 = OpConstant %float 0
-%float_0_75 = OpConstant %float 0.75
-%float_2_25 = OpConstant %float 2.25
-%74 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25
-%v4bool = OpTypeVector %bool 4
+%_ptr_Function_int = OpTypePointer Function %int
 %int_1 = OpConstant %int 1
 %int_2 = OpConstant %int 2
+%int_3 = OpConstant %int 3
+%float_0 = OpConstant %float 0
+%float_1 = OpConstant %float 1
+%float_2 = OpConstant %float 2
+%float_3 = OpConstant %float 3
+%81 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+%false = OpConstantFalse %bool
+%float_n1_25 = OpConstant %float -1.25
+%float_0_75 = OpConstant %float 0.75
+%float_2_25 = OpConstant %float 2.25
+%105 = OpConstantComposite %v4float %float_n1_25 %float_0 %float_0_75 %float_2_25
+%v4bool = OpTypeVector %bool 4
 %_entrypoint = OpFunction %void None %15
 %16 = OpLabel
 %17 = OpFunctionCall %v4float %main
@@ -99,12 +124,22 @@
 %_3_z = OpVariable %_ptr_Function_float Function
 %_4_w = OpVariable %_ptr_Function_float Function
 %a = OpVariable %_ptr_Function_v4float Function
-%_5_x = OpVariable %_ptr_Function_float Function
-%_6_y = OpVariable %_ptr_Function_float Function
-%_7_z = OpVariable %_ptr_Function_float Function
-%_8_w = OpVariable %_ptr_Function_float Function
+%_5_ZERO = OpVariable %_ptr_Function_int Function
+%_6_ONE = OpVariable %_ptr_Function_int Function
+%_7_TWO = OpVariable %_ptr_Function_int Function
+%_8_THREE = OpVariable %_ptr_Function_int Function
+%_9_x = OpVariable %_ptr_Function_float Function
+%_10_y = OpVariable %_ptr_Function_float Function
+%_11_z = OpVariable %_ptr_Function_float Function
+%_12_w = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_v4float Function
-%84 = OpVariable %_ptr_Function_v4float Function
+%_13_v = OpVariable %_ptr_Function_v4float Function
+%_14_x = OpVariable %_ptr_Function_float Function
+%_15_y = OpVariable %_ptr_Function_float Function
+%_16_z = OpVariable %_ptr_Function_float Function
+%_17_w = OpVariable %_ptr_Function_float Function
+%c = OpVariable %_ptr_Function_v4float Function
+%121 = OpVariable %_ptr_Function_v4float Function
 %22 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %26 = OpLoad %v4float %22
 OpStore %_0_v %26
@@ -126,53 +161,85 @@
 %44 = OpLoad %float %_4_w
 %45 = OpCompositeConstruct %v4float %41 %42 %43 %44
 OpStore %a %45
-%47 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%48 = OpLoad %v4float %47
-%49 = OpCompositeExtract %float %48 0
-OpStore %_5_x %49
-%51 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%52 = OpLoad %v4float %51
-%53 = OpCompositeExtract %float %52 1
-OpStore %_6_y %53
+OpStore %_5_ZERO %int_0
+OpStore %_6_ONE %int_1
+OpStore %_7_TWO %int_2
+OpStore %_8_THREE %int_3
 %55 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %56 = OpLoad %v4float %55
-%57 = OpCompositeExtract %float %56 2
-OpStore %_7_z %57
+%57 = OpCompositeExtract %float %56 0
+OpStore %_9_x %57
 %59 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
 %60 = OpLoad %v4float %59
-%61 = OpCompositeExtract %float %60 3
-OpStore %_8_w %61
-%63 = OpLoad %float %_5_x
-%64 = OpLoad %float %_6_y
-%65 = OpLoad %float %_7_z
-%66 = OpLoad %float %_8_w
-%67 = OpCompositeConstruct %v4float %63 %64 %65 %66
-OpStore %b %67
-%69 = OpLoad %v4float %a
-%75 = OpFOrdEqual %v4bool %69 %74
-%77 = OpAll %bool %75
-OpSelectionMerge %79 None
-OpBranchConditional %77 %78 %79
-%78 = OpLabel
-%80 = OpLoad %v4float %b
-%81 = OpFOrdEqual %v4bool %80 %74
-%82 = OpAll %bool %81
-OpBranch %79
-%79 = OpLabel
-%83 = OpPhi %bool %false %19 %82 %78
-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
+%61 = OpCompositeExtract %float %60 1
+OpStore %_10_y %61
+%63 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%64 = OpLoad %v4float %63
+%65 = OpCompositeExtract %float %64 2
+OpStore %_11_z %65
+%67 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%68 = OpLoad %v4float %67
+%69 = OpCompositeExtract %float %68 3
+OpStore %_12_w %69
+%71 = OpLoad %float %_9_x
+%72 = OpLoad %float %_10_y
+%73 = OpLoad %float %_11_z
+%74 = OpLoad %float %_12_w
+%75 = OpCompositeConstruct %v4float %71 %72 %73 %74
+OpStore %b %75
+OpStore %_13_v %81
+%83 = OpLoad %v4float %_13_v
+%84 = OpCompositeExtract %float %83 0
+OpStore %_14_x %84
+%86 = OpLoad %v4float %_13_v
+%87 = OpCompositeExtract %float %86 1
+OpStore %_15_y %87
+%89 = OpLoad %v4float %_13_v
+%90 = OpCompositeExtract %float %89 2
+OpStore %_16_z %90
+%92 = OpLoad %v4float %_13_v
+%93 = OpCompositeExtract %float %92 3
+OpStore %_17_w %93
+%95 = OpLoad %float %_14_x
+%96 = OpLoad %float %_15_y
+%97 = OpLoad %float %_16_z
+%98 = OpLoad %float %_17_w
+%99 = OpCompositeConstruct %v4float %95 %96 %97 %98
+OpStore %c %99
+%101 = OpLoad %v4float %a
+%106 = OpFOrdEqual %v4bool %101 %105
+%108 = OpAll %bool %106
+OpSelectionMerge %110 None
+OpBranchConditional %108 %109 %110
+%109 = OpLabel
+%111 = OpLoad %v4float %b
+%112 = OpFOrdEqual %v4bool %111 %105
+%113 = OpAll %bool %112
+OpBranch %110
+%110 = OpLabel
+%114 = OpPhi %bool %false %19 %113 %109
+OpSelectionMerge %116 None
+OpBranchConditional %114 %115 %116
+%115 = OpLabel
+%117 = OpLoad %v4float %c
+%118 = OpFOrdEqual %v4bool %117 %81
+%119 = OpAll %bool %118
+OpBranch %116
+%116 = OpLabel
+%120 = OpPhi %bool %false %110 %119 %115
+OpSelectionMerge %124 None
+OpBranchConditional %120 %122 %123
+%122 = OpLabel
+%125 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%126 = OpLoad %v4float %125
+OpStore %121 %126
+OpBranch %124
+%123 = OpLabel
+%127 = OpAccessChain %_ptr_Uniform_v4float %10 %int_2
+%128 = OpLoad %v4float %127
+OpStore %121 %128
+OpBranch %124
+%124 = OpLabel
+%129 = OpLoad %v4float %121
+OpReturnValue %129
 OpFunctionEnd
diff --git a/tests/sksl/shared/SwizzleByConstantIndex.glsl b/tests/sksl/shared/SwizzleByConstantIndex.glsl
index aa374e8..ed557db 100644
--- a/tests/sksl/shared/SwizzleByConstantIndex.glsl
+++ b/tests/sksl/shared/SwizzleByConstantIndex.glsl
@@ -11,11 +11,23 @@
     float _4_w = _0_v.w;
     vec4 a = vec4(_1_x, _2_y, _3_z, _4_w);
 
-    float _5_x = testInputs.x;
-    float _6_y = testInputs.y;
-    float _7_z = testInputs.z;
-    float _8_w = testInputs.w;
-    vec4 b = vec4(_5_x, _6_y, _7_z, _8_w);
+    const int _5_ZERO = 0;
+    const int _6_ONE = 1;
+    const int _7_TWO = 2;
+    const int _8_THREE = 3;
 
-    return a == vec4(-1.25, 0.0, 0.75, 2.25) && b == vec4(-1.25, 0.0, 0.75, 2.25) ? colorGreen : colorRed;
+    float _9_x = testInputs.x;
+    float _10_y = testInputs.y;
+    float _11_z = testInputs.z;
+    float _12_w = testInputs.w;
+    vec4 b = vec4(_9_x, _10_y, _11_z, _12_w);
+
+    vec4 _13_v = vec4(0.0, 1.0, 2.0, 3.0);
+    float _14_x = _13_v.x;
+    float _15_y = _13_v.y;
+    float _16_z = _13_v.z;
+    float _17_w = _13_v.w;
+    vec4 c = vec4(_14_x, _15_y, _16_z, _17_w);
+
+    return (a == vec4(-1.25, 0.0, 0.75, 2.25) && b == vec4(-1.25, 0.0, 0.75, 2.25)) && c == vec4(0.0, 1.0, 2.0, 3.0) ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/SwizzleByConstantIndex.metal b/tests/sksl/shared/SwizzleByConstantIndex.metal
index 28a22f4..0c5aa5f 100644
--- a/tests/sksl/shared/SwizzleByConstantIndex.metal
+++ b/tests/sksl/shared/SwizzleByConstantIndex.metal
@@ -24,12 +24,24 @@
     float _4_w = _0_v.w;
     float4 a = float4(_1_x, _2_y, _3_z, _4_w);
 
-    float _5_x = _uniforms.testInputs.x;
-    float _6_y = _uniforms.testInputs.y;
-    float _7_z = _uniforms.testInputs.z;
-    float _8_w = _uniforms.testInputs.w;
-    float4 b = float4(_5_x, _6_y, _7_z, _8_w);
+    const int _5_ZERO = 0;
+    const int _6_ONE = 1;
+    const int _7_TWO = 2;
+    const int _8_THREE = 3;
 
-    _out.sk_FragColor = all(a == float4(-1.25, 0.0, 0.75, 2.25)) && all(b == float4(-1.25, 0.0, 0.75, 2.25)) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float _9_x = _uniforms.testInputs.x;
+    float _10_y = _uniforms.testInputs.y;
+    float _11_z = _uniforms.testInputs.z;
+    float _12_w = _uniforms.testInputs.w;
+    float4 b = float4(_9_x, _10_y, _11_z, _12_w);
+
+    float4 _13_v = float4(0.0, 1.0, 2.0, 3.0);
+    float _14_x = _13_v.x;
+    float _15_y = _13_v.y;
+    float _16_z = _13_v.z;
+    float _17_w = _13_v.w;
+    float4 c = float4(_14_x, _15_y, _16_z, _17_w);
+
+    _out.sk_FragColor = (all(a == float4(-1.25, 0.0, 0.75, 2.25)) && all(b == float4(-1.25, 0.0, 0.75, 2.25))) && all(c == float4(0.0, 1.0, 2.0, 3.0)) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag
index 61d2e7b..34241ae 100644
--- a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag
+++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.asm.frag
@@ -7,11 +7,15 @@
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %r "r"
+OpName %g "g"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
+OpDecorate %22 RelaxedPrecision
+OpDecorate %23 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -22,9 +26,9 @@
 %void = OpTypeVoid
 %12 = OpTypeFunction %void
 %15 = OpTypeFunction %v4float
+%_ptr_Function_float = OpTypePointer Function %float
 %float_0 = OpConstant %float 0
 %float_1 = OpConstant %float 1
-%19 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
 %_entrypoint = OpFunction %void None %12
 %13 = OpLabel
 %14 = OpFunctionCall %v4float %main
@@ -33,5 +37,12 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %15
 %16 = OpLabel
-OpReturnValue %19
+%r = OpVariable %_ptr_Function_float Function
+%g = OpVariable %_ptr_Function_float Function
+OpStore %r %float_0
+OpStore %g %float_1
+%22 = OpLoad %float %r
+%23 = OpLoad %float %g
+%24 = OpCompositeConstruct %v4float %22 %23 %float_0 %float_1
+OpReturnValue %24
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.glsl b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.glsl
index e26d14f..9c8bfa1 100644
--- a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.glsl
+++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.glsl
@@ -1,5 +1,10 @@
 
 out vec4 sk_FragColor;
 vec4 main() {
-    return vec4(0.0, 1.0, 0.0, 1.0);
+    float r;
+    float g;
+
+    r = 0.0;
+    g = 1.0;
+    return vec4(r, g, 0.0, 1.0);
 }
diff --git a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.metal b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.metal
index 7254bd8..59c70ca 100644
--- a/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.metal
+++ b/tests/sksl/shared/TernaryAsLValueEntirelyFoldable.metal
@@ -9,6 +9,11 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    _out.sk_FragColor = float4(0.0, 1.0, 0.0, 1.0);
+    float r;
+    float g;
+
+    r = 0.0;
+    g = 1.0;
+    _out.sk_FragColor = float4(r, g, 0.0, 1.0);
     return _out;
 }
diff --git a/tests/sksl/shared/TernaryExpression.asm.frag b/tests/sksl/shared/TernaryExpression.asm.frag
index de31405..03a0354 100644
--- a/tests/sksl/shared/TernaryExpression.asm.frag
+++ b/tests/sksl/shared/TernaryExpression.asm.frag
@@ -10,6 +10,8 @@
 OpMemberName %_UniformBuffer 1 "colorRed"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %TRUE "TRUE"
+OpName %FALSE "FALSE"
 OpName %ok "ok"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
@@ -23,13 +25,14 @@
 OpDecorate %_UniformBuffer Block
 OpDecorate %10 Binding 0
 OpDecorate %10 DescriptorSet 0
-OpDecorate %27 RelaxedPrecision
+OpDecorate %26 RelaxedPrecision
 OpDecorate %33 RelaxedPrecision
-OpDecorate %37 RelaxedPrecision
-OpDecorate %42 RelaxedPrecision
-OpDecorate %49 RelaxedPrecision
-OpDecorate %52 RelaxedPrecision
-OpDecorate %53 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
+OpDecorate %43 RelaxedPrecision
+OpDecorate %48 RelaxedPrecision
+OpDecorate %55 RelaxedPrecision
+OpDecorate %58 RelaxedPrecision
+OpDecorate %59 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -45,11 +48,11 @@
 %18 = OpTypeFunction %v4float
 %_ptr_Function_bool = OpTypePointer Function %bool
 %true = OpConstantTrue %bool
+%false = OpConstantFalse %bool
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int = OpTypeInt 32 1
 %int_0 = OpConstant %int 0
 %float_1 = OpConstant %float 1
-%false = OpConstantFalse %bool
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %int_1 = OpConstant %int 1
 %_entrypoint = OpFunction %void None %15
@@ -60,42 +63,53 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %18
 %19 = OpLabel
+%TRUE = OpVariable %_ptr_Function_bool Function
+%FALSE = OpVariable %_ptr_Function_bool Function
 %ok = OpVariable %_ptr_Function_bool Function
-%43 = OpVariable %_ptr_Function_v4float Function
+%49 = OpVariable %_ptr_Function_v4float Function
+OpStore %TRUE %true
+OpStore %FALSE %false
 OpStore %ok %true
-%23 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%27 = OpLoad %v4float %23
-%28 = OpCompositeExtract %float %27 1
-%30 = OpFOrdEqual %bool %28 %float_1
-%31 = OpSelect %bool %30 %true %false
-OpStore %ok %31
-%33 = OpLoad %bool %ok
-OpSelectionMerge %35 None
-OpBranchConditional %33 %34 %35
-%34 = OpLabel
-%36 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%37 = OpLoad %v4float %36
-%38 = OpCompositeExtract %float %37 0
-%39 = OpFOrdEqual %bool %38 %float_1
-%40 = OpSelect %bool %39 %false %true
-OpBranch %35
-%35 = OpLabel
-%41 = OpPhi %bool %false %19 %40 %34
-OpStore %ok %41
-%42 = OpLoad %bool %ok
-OpSelectionMerge %47 None
-OpBranchConditional %42 %45 %46
-%45 = OpLabel
-%48 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
-%49 = OpLoad %v4float %48
-OpStore %43 %49
-OpBranch %47
-%46 = OpLabel
-%50 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
-%52 = OpLoad %v4float %50
-OpStore %43 %52
-OpBranch %47
-%47 = OpLabel
-%53 = OpLoad %v4float %43
-OpReturnValue %53
+%26 = OpLoad %bool %ok
+OpSelectionMerge %28 None
+OpBranchConditional %26 %27 %28
+%27 = OpLabel
+%29 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%33 = OpLoad %v4float %29
+%34 = OpCompositeExtract %float %33 1
+%36 = OpFOrdEqual %bool %34 %float_1
+%37 = OpSelect %bool %36 %true %false
+OpBranch %28
+%28 = OpLabel
+%38 = OpPhi %bool %false %19 %37 %27
+OpStore %ok %38
+%39 = OpLoad %bool %ok
+OpSelectionMerge %41 None
+OpBranchConditional %39 %40 %41
+%40 = OpLabel
+%42 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%43 = OpLoad %v4float %42
+%44 = OpCompositeExtract %float %43 0
+%45 = OpFOrdEqual %bool %44 %float_1
+%46 = OpSelect %bool %45 %false %true
+OpBranch %41
+%41 = OpLabel
+%47 = OpPhi %bool %false %28 %46 %40
+OpStore %ok %47
+%48 = OpLoad %bool %ok
+OpSelectionMerge %53 None
+OpBranchConditional %48 %51 %52
+%51 = OpLabel
+%54 = OpAccessChain %_ptr_Uniform_v4float %10 %int_0
+%55 = OpLoad %v4float %54
+OpStore %49 %55
+OpBranch %53
+%52 = OpLabel
+%56 = OpAccessChain %_ptr_Uniform_v4float %10 %int_1
+%58 = OpLoad %v4float %56
+OpStore %49 %58
+OpBranch %53
+%53 = OpLabel
+%59 = OpLoad %v4float %49
+OpReturnValue %59
 OpFunctionEnd
diff --git a/tests/sksl/shared/TernaryExpression.glsl b/tests/sksl/shared/TernaryExpression.glsl
index 5e62804..f3c6800 100644
--- a/tests/sksl/shared/TernaryExpression.glsl
+++ b/tests/sksl/shared/TernaryExpression.glsl
@@ -3,8 +3,10 @@
 uniform vec4 colorGreen;
 uniform vec4 colorRed;
 vec4 main() {
+    const bool TRUE = true;
+    const bool FALSE = false;
     bool ok = true;
-    ok = colorGreen.y == 1.0 ? true : false;
+    ok = ok && (colorGreen.y == 1.0 ? true : false);
     ok = ok && (colorGreen.x == 1.0 ? false : true);
     return ok ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/TernaryExpression.metal b/tests/sksl/shared/TernaryExpression.metal
index 73e2ec7..443a527 100644
--- a/tests/sksl/shared/TernaryExpression.metal
+++ b/tests/sksl/shared/TernaryExpression.metal
@@ -15,8 +15,10 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    const bool TRUE = true;
+    const bool FALSE = false;
     bool ok = true;
-    ok = _uniforms.colorGreen.y == 1.0 ? true : false;
+    ok = ok && (_uniforms.colorGreen.y == 1.0 ? true : false);
     ok = ok && (_uniforms.colorGreen.x == 1.0 ? false : true);
     _out.sk_FragColor = ok ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
diff --git a/tests/sksl/shared/UnusedVariables.asm.frag b/tests/sksl/shared/UnusedVariables.asm.frag
index ccfba75..8f67a99 100644
--- a/tests/sksl/shared/UnusedVariables.asm.frag
+++ b/tests/sksl/shared/UnusedVariables.asm.frag
@@ -7,8 +7,11 @@
 OpName %sk_Clockwise "sk_Clockwise"
 OpName %_entrypoint "_entrypoint"
 OpName %main "main"
+OpName %a "a"
 OpName %b "b"
+OpName %c "c"
 OpName %d "d"
+OpName %e "e"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -25,9 +28,9 @@
 %12 = OpTypeFunction %void
 %15 = OpTypeFunction %v4float
 %_ptr_Function_float = OpTypePointer Function %float
+%float_1 = OpConstant %float 1
 %float_2 = OpConstant %float 2
 %float_3 = OpConstant %float 3
-%float_1 = OpConstant %float 1
 %float_0 = OpConstant %float 0
 %float_5 = OpConstant %float 5
 %float_4 = OpConstant %float 4
@@ -39,28 +42,36 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %15
 %16 = OpLabel
+%a = OpVariable %_ptr_Function_float Function
 %b = OpVariable %_ptr_Function_float Function
+%c = OpVariable %_ptr_Function_float Function
 %d = OpVariable %_ptr_Function_float Function
+%e = OpVariable %_ptr_Function_float Function
+OpStore %a %float_1
 OpStore %b %float_2
-OpStore %d %float_3
-%22 = OpLoad %float %b
-%24 = OpFAdd %float %22 %float_1
-OpStore %b %24
-%25 = OpLoad %float %d
-%26 = OpFAdd %float %25 %float_1
-OpStore %d %26
-%27 = OpLoad %float %b
-%28 = OpFOrdEqual %bool %27 %float_2
-%29 = OpSelect %float %28 %float_1 %float_0
-%31 = OpLoad %float %b
-%32 = OpFOrdEqual %bool %31 %float_3
-%33 = OpSelect %float %32 %float_1 %float_0
-%34 = OpLoad %float %d
-%36 = OpFOrdEqual %bool %34 %float_5
-%37 = OpSelect %float %36 %float_1 %float_0
-%38 = OpLoad %float %d
-%40 = OpFOrdEqual %bool %38 %float_4
-%41 = OpSelect %float %40 %float_1 %float_0
-%42 = OpCompositeConstruct %v4float %29 %33 %37 %41
-OpReturnValue %42
+OpStore %c %float_3
+%25 = OpLoad %float %c
+OpStore %d %25
+%27 = OpLoad %float %d
+OpStore %e %27
+%28 = OpLoad %float %b
+%29 = OpFAdd %float %28 %float_1
+OpStore %b %29
+%30 = OpLoad %float %d
+%31 = OpFAdd %float %30 %float_1
+OpStore %d %31
+%32 = OpLoad %float %b
+%33 = OpFOrdEqual %bool %32 %float_2
+%34 = OpSelect %float %33 %float_1 %float_0
+%36 = OpLoad %float %b
+%37 = OpFOrdEqual %bool %36 %float_3
+%38 = OpSelect %float %37 %float_1 %float_0
+%39 = OpLoad %float %d
+%41 = OpFOrdEqual %bool %39 %float_5
+%42 = OpSelect %float %41 %float_1 %float_0
+%43 = OpLoad %float %d
+%45 = OpFOrdEqual %bool %43 %float_4
+%46 = OpSelect %float %45 %float_1 %float_0
+%47 = OpCompositeConstruct %v4float %34 %38 %42 %46
+OpReturnValue %47
 OpFunctionEnd
diff --git a/tests/sksl/shared/UnusedVariables.glsl b/tests/sksl/shared/UnusedVariables.glsl
index d97e262..eedd13d 100644
--- a/tests/sksl/shared/UnusedVariables.glsl
+++ b/tests/sksl/shared/UnusedVariables.glsl
@@ -1,9 +1,12 @@
 
 out vec4 sk_FragColor;
 vec4 main() {
+    float a = 1.0;
     float b = 2.0;
+    float c = 3.0;
 
-    float d = 3.0;
+    float d = c;
+    float e = d;
     b++;
     d++;
     return vec4(float(b == 2.0), float(b == 3.0), float(d == 5.0), float(d == 4.0));
diff --git a/tests/sksl/shared/UnusedVariables.metal b/tests/sksl/shared/UnusedVariables.metal
index 9892c73..fb9adea 100644
--- a/tests/sksl/shared/UnusedVariables.metal
+++ b/tests/sksl/shared/UnusedVariables.metal
@@ -9,9 +9,12 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
+    float a = 1.0;
     float b = 2.0;
+    float c = 3.0;
 
-    float d = 3.0;
+    float d = c;
+    float e = d;
     b++;
     d++;
     _out.sk_FragColor = float4(float(b == 2.0), float(b == 3.0), float(d == 5.0), float(d == 4.0));
diff --git a/tests/sksl/shared/VectorConstructors.asm.frag b/tests/sksl/shared/VectorConstructors.asm.frag
index 715d035..0709dea 100644
--- a/tests/sksl/shared/VectorConstructors.asm.frag
+++ b/tests/sksl/shared/VectorConstructors.asm.frag
@@ -11,7 +11,23 @@
 OpName %_entrypoint "_entrypoint"
 OpName %check "check"
 OpName %main "main"
+OpName %v1 "v1"
+OpName %v2 "v2"
+OpName %v3 "v3"
+OpName %v4 "v4"
+OpName %v5 "v5"
+OpName %v6 "v6"
+OpName %v7 "v7"
+OpName %v8 "v8"
 OpName %v9 "v9"
+OpName %v10 "v10"
+OpName %v11 "v11"
+OpName %v12 "v12"
+OpName %v13 "v13"
+OpName %v14 "v14"
+OpName %v15 "v15"
+OpName %v16 "v16"
+OpName %v17 "v17"
 OpDecorate %sk_FragColor RelaxedPrecision
 OpDecorate %sk_FragColor Location 0
 OpDecorate %sk_FragColor Index 0
@@ -44,9 +60,13 @@
 OpDecorate %106 RelaxedPrecision
 OpDecorate %107 RelaxedPrecision
 OpDecorate %110 RelaxedPrecision
-OpDecorate %196 RelaxedPrecision
-OpDecorate %198 RelaxedPrecision
-OpDecorate %199 RelaxedPrecision
+OpDecorate %213 RelaxedPrecision
+OpDecorate %221 RelaxedPrecision
+OpDecorate %223 RelaxedPrecision
+OpDecorate %225 RelaxedPrecision
+OpDecorate %235 RelaxedPrecision
+OpDecorate %237 RelaxedPrecision
+OpDecorate %238 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -78,26 +98,25 @@
 %float_0 = OpConstant %float 0
 %float_17 = OpConstant %float 17
 %113 = OpTypeFunction %v4float
+%116 = OpConstantComposite %v2float %float_1 %float_1
 %float_2 = OpConstant %float 2
+%119 = OpConstantComposite %v2float %float_1 %float_2
+%122 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%int_1 = OpConstant %int 1
+%125 = OpConstantComposite %v2int %int_1 %int_1
+%int_2 = OpConstant %int 2
+%134 = OpConstantComposite %v2int %int_1 %int_2
 %int_3 = OpConstant %int 3
 %int_4 = OpConstant %int 4
-%120 = OpConstantComposite %v2int %int_3 %int_4
-%129 = OpConstantComposite %v2float %float_1 %float_1
-%131 = OpConstantComposite %v2float %float_1 %float_2
-%134 = OpConstantComposite %v3float %float_1 %float_1 %float_1
-%int_1 = OpConstant %int 1
-%137 = OpConstantComposite %v2int %int_1 %int_1
-%int_2 = OpConstant %int 2
-%146 = OpConstantComposite %v2int %int_1 %int_2
-%161 = OpConstantComposite %v2int %int_3 %int_1
+%154 = OpConstantComposite %v2int %int_3 %int_4
 %true = OpConstantTrue %bool
 %false = OpConstantFalse %bool
-%165 = OpConstantComposite %v4bool %true %false %true %false
-%167 = OpConstantComposite %v2float %float_1 %float_0
-%169 = OpConstantComposite %v2float %float_0 %float_0
-%171 = OpConstantComposite %v2bool %false %false
-%178 = OpConstantComposite %v2bool %true %true
-%186 = OpConstantComposite %v3bool %true %true %true
+%171 = OpConstantComposite %v4bool %true %false %true %false
+%173 = OpConstantComposite %v2float %float_1 %float_0
+%175 = OpConstantComposite %v2float %float_0 %float_0
+%177 = OpConstantComposite %v2bool %false %false
+%184 = OpConstantComposite %v2bool %true %true
+%192 = OpConstantComposite %v3bool %true %true %true
 %_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
 %int_0 = OpConstant %int 0
 %_entrypoint = OpFunction %void None %16
@@ -187,92 +206,148 @@
 OpFunctionEnd
 %main = OpFunction %v4float None %113
 %114 = OpLabel
+%v1 = OpVariable %_ptr_Function_v2float Function
+%v2 = OpVariable %_ptr_Function_v2float Function
+%v3 = OpVariable %_ptr_Function_v2float Function
+%v4 = OpVariable %_ptr_Function_v3float Function
+%v5 = OpVariable %_ptr_Function_v2int Function
+%v6 = OpVariable %_ptr_Function_v2int Function
+%v7 = OpVariable %_ptr_Function_v2float Function
+%v8 = OpVariable %_ptr_Function_v2float Function
 %v9 = OpVariable %_ptr_Function_v4float Function
-%130 = OpVariable %_ptr_Function_v2float Function
-%132 = OpVariable %_ptr_Function_v2float Function
-%133 = OpVariable %_ptr_Function_v2float Function
-%135 = OpVariable %_ptr_Function_v3float Function
-%138 = OpVariable %_ptr_Function_v2int Function
-%144 = OpVariable %_ptr_Function_v2int Function
-%152 = OpVariable %_ptr_Function_v2float Function
-%158 = OpVariable %_ptr_Function_v2float Function
-%160 = OpVariable %_ptr_Function_v4float Function
-%162 = OpVariable %_ptr_Function_v2int Function
-%166 = OpVariable %_ptr_Function_v4bool Function
-%168 = OpVariable %_ptr_Function_v2float Function
-%170 = OpVariable %_ptr_Function_v2float Function
-%177 = OpVariable %_ptr_Function_v2float Function
-%179 = OpVariable %_ptr_Function_v2bool Function
-%185 = OpVariable %_ptr_Function_v2bool Function
-%187 = OpVariable %_ptr_Function_v3bool Function
-%189 = OpVariable %_ptr_Function_v4float Function
-%116 = OpExtInst %float %1 Sqrt %float_2
-%121 = OpCompositeExtract %int %120 0
-%122 = OpConvertSToF %float %121
-%123 = OpCompositeExtract %int %120 1
-%124 = OpConvertSToF %float %123
-%125 = OpCompositeConstruct %v2float %122 %124
-%126 = OpCompositeExtract %float %125 0
-%127 = OpCompositeExtract %float %125 1
-%128 = OpCompositeConstruct %v4float %float_1 %116 %126 %127
-OpStore %v9 %128
-OpStore %130 %129
-OpStore %132 %131
-OpStore %133 %129
-OpStore %135 %134
-OpStore %138 %137
-%139 = OpCompositeExtract %float %131 0
-%140 = OpConvertFToS %int %139
-%141 = OpCompositeExtract %float %131 1
-%142 = OpConvertFToS %int %141
-%143 = OpCompositeConstruct %v2int %140 %142
-OpStore %144 %143
-%147 = OpCompositeExtract %int %146 0
-%148 = OpConvertSToF %float %147
-%149 = OpCompositeExtract %int %146 1
+%v10 = OpVariable %_ptr_Function_v2int Function
+%v11 = OpVariable %_ptr_Function_v4bool Function
+%v12 = OpVariable %_ptr_Function_v2float Function
+%v13 = OpVariable %_ptr_Function_v2float Function
+%v14 = OpVariable %_ptr_Function_v2float Function
+%v15 = OpVariable %_ptr_Function_v2bool Function
+%v16 = OpVariable %_ptr_Function_v2bool Function
+%v17 = OpVariable %_ptr_Function_v3bool Function
+%194 = OpVariable %_ptr_Function_v2float Function
+%196 = OpVariable %_ptr_Function_v2float Function
+%198 = OpVariable %_ptr_Function_v2float Function
+%200 = OpVariable %_ptr_Function_v3float Function
+%202 = OpVariable %_ptr_Function_v2int Function
+%204 = OpVariable %_ptr_Function_v2int Function
+%206 = OpVariable %_ptr_Function_v2float Function
+%208 = OpVariable %_ptr_Function_v2float Function
+%210 = OpVariable %_ptr_Function_v4float Function
+%212 = OpVariable %_ptr_Function_v2int Function
+%214 = OpVariable %_ptr_Function_v4bool Function
+%216 = OpVariable %_ptr_Function_v2float Function
+%218 = OpVariable %_ptr_Function_v2float Function
+%220 = OpVariable %_ptr_Function_v2float Function
+%222 = OpVariable %_ptr_Function_v2bool Function
+%224 = OpVariable %_ptr_Function_v2bool Function
+%226 = OpVariable %_ptr_Function_v3bool Function
+%228 = OpVariable %_ptr_Function_v4float Function
+OpStore %v1 %116
+OpStore %v2 %119
+OpStore %v3 %116
+OpStore %v4 %122
+OpStore %v5 %125
+%127 = OpCompositeExtract %float %119 0
+%128 = OpConvertFToS %int %127
+%129 = OpCompositeExtract %float %119 1
+%130 = OpConvertFToS %int %129
+%131 = OpCompositeConstruct %v2int %128 %130
+OpStore %v6 %131
+%135 = OpCompositeExtract %int %134 0
+%136 = OpConvertSToF %float %135
+%137 = OpCompositeExtract %int %134 1
+%138 = OpConvertSToF %float %137
+%139 = OpCompositeConstruct %v2float %136 %138
+OpStore %v7 %139
+%141 = OpLoad %v2int %v5
+%142 = OpCompositeExtract %int %141 0
+%143 = OpConvertSToF %float %142
+%144 = OpCompositeExtract %int %141 1
+%145 = OpConvertSToF %float %144
+%146 = OpCompositeConstruct %v2float %143 %145
+OpStore %v8 %146
+%148 = OpLoad %v2int %v6
+%149 = OpCompositeExtract %int %148 0
 %150 = OpConvertSToF %float %149
-%151 = OpCompositeConstruct %v2float %148 %150
-OpStore %152 %151
-%153 = OpCompositeExtract %int %137 0
-%154 = OpConvertSToF %float %153
-%155 = OpCompositeExtract %int %137 1
+%151 = OpExtInst %float %1 Sqrt %float_2
+%155 = OpCompositeExtract %int %154 0
 %156 = OpConvertSToF %float %155
-%157 = OpCompositeConstruct %v2float %154 %156
-OpStore %158 %157
-%159 = OpLoad %v4float %v9
-OpStore %160 %159
-OpStore %162 %161
-OpStore %166 %165
-OpStore %168 %167
-OpStore %170 %169
-%172 = OpCompositeExtract %bool %171 0
-%173 = OpSelect %float %172 %float_1 %float_0
-%174 = OpCompositeExtract %bool %171 1
-%175 = OpSelect %float %174 %float_1 %float_0
-%176 = OpCompositeConstruct %v2float %173 %175
-OpStore %177 %176
-OpStore %179 %178
-%180 = OpCompositeExtract %float %129 0
-%181 = OpFUnordNotEqual %bool %180 %float_0
-%182 = OpCompositeExtract %float %129 1
-%183 = OpFUnordNotEqual %bool %182 %float_0
-%184 = OpCompositeConstruct %v2bool %181 %183
-OpStore %185 %184
-OpStore %187 %186
-%188 = OpFunctionCall %bool %check %130 %132 %133 %135 %138 %144 %152 %158 %160 %162 %166 %168 %170 %177 %179 %185 %187
-OpSelectionMerge %192 None
-OpBranchConditional %188 %190 %191
-%190 = OpLabel
-%193 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
-%196 = OpLoad %v4float %193
-OpStore %189 %196
-OpBranch %192
-%191 = OpLabel
-%197 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
-%198 = OpLoad %v4float %197
-OpStore %189 %198
-OpBranch %192
-%192 = OpLabel
-%199 = OpLoad %v4float %189
-OpReturnValue %199
+%157 = OpCompositeExtract %int %154 1
+%158 = OpConvertSToF %float %157
+%159 = OpCompositeConstruct %v2float %156 %158
+%160 = OpCompositeExtract %float %159 0
+%161 = OpCompositeExtract %float %159 1
+%162 = OpCompositeConstruct %v4float %150 %151 %160 %161
+OpStore %v9 %162
+%164 = OpLoad %v2float %v1
+%165 = OpCompositeExtract %float %164 0
+%166 = OpConvertFToS %int %165
+%167 = OpCompositeConstruct %v2int %int_3 %166
+OpStore %v10 %167
+OpStore %v11 %171
+OpStore %v12 %173
+OpStore %v13 %175
+%178 = OpCompositeExtract %bool %177 0
+%179 = OpSelect %float %178 %float_1 %float_0
+%180 = OpCompositeExtract %bool %177 1
+%181 = OpSelect %float %180 %float_1 %float_0
+%182 = OpCompositeConstruct %v2float %179 %181
+OpStore %v14 %182
+OpStore %v15 %184
+%186 = OpCompositeExtract %float %116 0
+%187 = OpFUnordNotEqual %bool %186 %float_0
+%188 = OpCompositeExtract %float %116 1
+%189 = OpFUnordNotEqual %bool %188 %float_0
+%190 = OpCompositeConstruct %v2bool %187 %189
+OpStore %v16 %190
+OpStore %v17 %192
+%193 = OpLoad %v2float %v1
+OpStore %194 %193
+%195 = OpLoad %v2float %v2
+OpStore %196 %195
+%197 = OpLoad %v2float %v3
+OpStore %198 %197
+%199 = OpLoad %v3float %v4
+OpStore %200 %199
+%201 = OpLoad %v2int %v5
+OpStore %202 %201
+%203 = OpLoad %v2int %v6
+OpStore %204 %203
+%205 = OpLoad %v2float %v7
+OpStore %206 %205
+%207 = OpLoad %v2float %v8
+OpStore %208 %207
+%209 = OpLoad %v4float %v9
+OpStore %210 %209
+%211 = OpLoad %v2int %v10
+OpStore %212 %211
+%213 = OpLoad %v4bool %v11
+OpStore %214 %213
+%215 = OpLoad %v2float %v12
+OpStore %216 %215
+%217 = OpLoad %v2float %v13
+OpStore %218 %217
+%219 = OpLoad %v2float %v14
+OpStore %220 %219
+%221 = OpLoad %v2bool %v15
+OpStore %222 %221
+%223 = OpLoad %v2bool %v16
+OpStore %224 %223
+%225 = OpLoad %v3bool %v17
+OpStore %226 %225
+%227 = OpFunctionCall %bool %check %194 %196 %198 %200 %202 %204 %206 %208 %210 %212 %214 %216 %218 %220 %222 %224 %226
+OpSelectionMerge %231 None
+OpBranchConditional %227 %229 %230
+%229 = OpLabel
+%232 = OpAccessChain %_ptr_Uniform_v4float %11 %int_0
+%235 = OpLoad %v4float %232
+OpStore %228 %235
+OpBranch %231
+%230 = OpLabel
+%236 = OpAccessChain %_ptr_Uniform_v4float %11 %int_1
+%237 = OpLoad %v4float %236
+OpStore %228 %237
+OpBranch %231
+%231 = OpLabel
+%238 = OpLoad %v4float %228
+OpReturnValue %238
 OpFunctionEnd
diff --git a/tests/sksl/shared/VectorConstructors.glsl b/tests/sksl/shared/VectorConstructors.glsl
index 22b0c58..ac0af64 100644
--- a/tests/sksl/shared/VectorConstructors.glsl
+++ b/tests/sksl/shared/VectorConstructors.glsl
@@ -6,6 +6,22 @@
     return (((((((((((((((v1.x + v2.x) + v3.x) + v4.x) + float(v5.x)) + float(v6.x)) + v7.x) + v8.x) + v9.x) + float(v10.x)) + float(v11.x)) + v12.x) + v13.x) + v14.x) + float(v15.x)) + float(v16.x)) + float(v17.x) == 17.0;
 }
 vec4 main() {
-    vec4 v9 = vec4(1.0, sqrt(2.0), vec2(ivec2(3, 4)));
-    return check(vec2(1.0), vec2(1.0, 2.0), vec2(1.0), vec3(vec2(1.0), 1.0), ivec2(1), ivec2(vec2(1.0, 2.0)), vec2(ivec2(1, 2)), vec2(ivec2(1)), v9, ivec2(3, 1), bvec4(true, false, true, false), vec2(1.0, 0.0), vec2(0.0), vec2(bvec2(false)), bvec2(true), bvec2(vec2(1.0)), bvec3(true, bvec2(ivec2(77)))) ? colorGreen : colorRed;
+    vec2 v1 = vec2(1.0);
+    vec2 v2 = vec2(1.0, 2.0);
+    vec2 v3 = vec2(1.0);
+    vec3 v4 = vec3(vec2(1.0), 1.0);
+    ivec2 v5 = ivec2(1);
+    ivec2 v6 = ivec2(vec2(1.0, 2.0));
+    vec2 v7 = vec2(ivec2(1, 2));
+    vec2 v8 = vec2(v5);
+    vec4 v9 = vec4(float(v6.x), sqrt(2.0), vec2(ivec2(3, 4)));
+    ivec2 v10 = ivec2(3, int(v1.x));
+    bvec4 v11 = bvec4(true, false, true, false);
+    vec2 v12 = vec2(1.0, 0.0);
+    vec2 v13 = vec2(0.0);
+    vec2 v14 = vec2(bvec2(false));
+    bvec2 v15 = bvec2(true);
+    bvec2 v16 = bvec2(vec2(1.0));
+    bvec3 v17 = bvec3(true, bvec2(ivec2(77)));
+    return check(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) ? colorGreen : colorRed;
 }
diff --git a/tests/sksl/shared/VectorConstructors.metal b/tests/sksl/shared/VectorConstructors.metal
index 7dee1b9..946cbfb 100644
--- a/tests/sksl/shared/VectorConstructors.metal
+++ b/tests/sksl/shared/VectorConstructors.metal
@@ -18,7 +18,23 @@
 fragment Outputs fragmentMain(Inputs _in [[stage_in]], constant Uniforms& _uniforms [[buffer(0)]], bool _frontFacing [[front_facing]], float4 _fragCoord [[position]]) {
     Outputs _out;
     (void)_out;
-    float4 v9 = float4(1.0, sqrt(2.0), float2(int2(3, 4)));
-    _out.sk_FragColor = check(float2(1.0), float2(1.0, 2.0), float2(1.0), float3(float2(1.0), 1.0), int2(1), int2(float2(1.0, 2.0)), float2(int2(1, 2)), float2(int2(1)), v9, int2(3, 1), bool4(true, false, true, false), float2(1.0, 0.0), float2(0.0), float2(bool2(false)), bool2(true), bool2(float2(1.0)), bool3(true, bool2(int2(77)))) ? _uniforms.colorGreen : _uniforms.colorRed;
+    float2 v1 = float2(1.0);
+    float2 v2 = float2(1.0, 2.0);
+    float2 v3 = float2(1.0);
+    float3 v4 = float3(float2(1.0), 1.0);
+    int2 v5 = int2(1);
+    int2 v6 = int2(float2(1.0, 2.0));
+    float2 v7 = float2(int2(1, 2));
+    float2 v8 = float2(v5);
+    float4 v9 = float4(float(v6.x), sqrt(2.0), float2(int2(3, 4)));
+    int2 v10 = int2(3, int(v1.x));
+    bool4 v11 = bool4(true, false, true, false);
+    float2 v12 = float2(1.0, 0.0);
+    float2 v13 = float2(0.0);
+    float2 v14 = float2(bool2(false));
+    bool2 v15 = bool2(true);
+    bool2 v16 = bool2(float2(1.0));
+    bool3 v17 = bool3(true, bool2(int2(77)));
+    _out.sk_FragColor = check(v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) ? _uniforms.colorGreen : _uniforms.colorRed;
     return _out;
 }
diff --git a/tests/sksl/workarounds/FractNegative.glsl b/tests/sksl/workarounds/FractNegative.glsl
index abfba97..bdc6ff3 100644
--- a/tests/sksl/workarounds/FractNegative.glsl
+++ b/tests/sksl/workarounds/FractNegative.glsl
@@ -1,5 +1,6 @@
 #version 400
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor.x = (0.5 - sign(-42.0) * (0.5 - fract(abs(-42.0))));
+    float x = -42.0;
+    sk_FragColor.x = (0.5 - sign(x) * (0.5 - fract(abs(x))));
 }
diff --git a/tests/sksl/workarounds/FractNegativeStandaloneSettings.glsl b/tests/sksl/workarounds/FractNegativeStandaloneSettings.glsl
index a6c398a..8eef9df 100644
--- a/tests/sksl/workarounds/FractNegativeStandaloneSettings.glsl
+++ b/tests/sksl/workarounds/FractNegativeStandaloneSettings.glsl
@@ -1,5 +1,6 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor.x = fract(-42.0);
+    float x = -42.0;
+    sk_FragColor.x = fract(x);
 }
diff --git a/tests/sksl/workarounds/MinAndAbsTogether.glsl b/tests/sksl/workarounds/MinAndAbsTogether.glsl
index 93f57bf..226d103 100644
--- a/tests/sksl/workarounds/MinAndAbsTogether.glsl
+++ b/tests/sksl/workarounds/MinAndAbsTogether.glsl
@@ -3,5 +3,6 @@
 void main() {
     float minAbsHackVar0;
     float minAbsHackVar1;
-    sk_FragColor.x = ((minAbsHackVar0 = abs(-5.0)) < (minAbsHackVar1 = 6.0) ? minAbsHackVar0 : minAbsHackVar1);
+    float x = -5.0;
+    sk_FragColor.x = ((minAbsHackVar0 = abs(x)) < (minAbsHackVar1 = 6.0) ? minAbsHackVar0 : minAbsHackVar1);
 }
diff --git a/tests/sksl/workarounds/MinAndAbsTogetherStandaloneSettings.glsl b/tests/sksl/workarounds/MinAndAbsTogetherStandaloneSettings.glsl
index 1e4a939..5b87ddb 100644
--- a/tests/sksl/workarounds/MinAndAbsTogetherStandaloneSettings.glsl
+++ b/tests/sksl/workarounds/MinAndAbsTogetherStandaloneSettings.glsl
@@ -1,5 +1,6 @@
 
 out vec4 sk_FragColor;
 void main() {
-    sk_FragColor.x = min(abs(-5.0), 6.0);
+    float x = -5.0;
+    sk_FragColor.x = min(abs(x), 6.0);
 }