Factor out SPIR-V typecasting helper functions.

The test diffs look scary, but the only actual change is a minor
renumbering of IDs. The actual logic is the same.

Change-Id: I5ecc26c8581a4c01834932ff0291deba7d9e4618
Bug: skia:11171
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353622
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.cpp b/src/sksl/SkSLSPIRVCodeGenerator.cpp
index fc2c759..20f2c43 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.cpp
+++ b/src/sksl/SkSLSPIRVCodeGenerator.cpp
@@ -1193,83 +1193,111 @@
 }
 
 SpvId SPIRVCodeGenerator::writeFloatConstructor(const Constructor& c, OutputStream& out) {
-    const Type& constructorType = c.type();
     SkASSERT(c.arguments().size() == 1);
-    const Type& argType = c.arguments()[0]->type();
-    SkASSERT(constructorType.isFloat());
-    SkASSERT(argType.isNumber() || argType.isBoolean());
+    SkASSERT(c.type().isFloat());
+    const Expression& ctorExpr = *c.arguments()[0];
+    SpvId expressionId = this->writeExpression(ctorExpr, out);
+    return this->castScalarToFloat(expressionId, ctorExpr.type(), c.type(), out);
+}
+
+SpvId SPIRVCodeGenerator::castScalarToFloat(SpvId inputId, const Type& inputType,
+                                            const Type& outputType, OutputStream& out) {
+    // Casting a float to float is a no-op.
+    if (inputType.isFloat()) {
+        return inputId;
+    }
+
+    // Given the input type, generate the appropriate instruction to cast to float.
     SpvId result = this->nextId();
-    SpvId parameter = this->writeExpression(*c.arguments()[0], out);
-    if (argType.isBoolean()) {
+    if (inputType.isBoolean()) {
         // Use OpSelect to convert the boolean argument to a literal 1.0 or 0.0.
         FloatLiteral one(fContext, /*offset=*/-1, /*value=*/1);
         SpvId        oneID = this->writeFloatLiteral(one);
         FloatLiteral zero(fContext, /*offset=*/-1, /*value=*/0);
         SpvId        zeroID = this->writeFloatLiteral(zero);
-        this->writeInstruction(SpvOpSelect, this->getType(constructorType), result, parameter,
-                               oneID, zeroID, out);
-    } else if (argType.isSigned()) {
-        this->writeInstruction(SpvOpConvertSToF, this->getType(constructorType), result, parameter,
-                               out);
+        this->writeInstruction(SpvOpSelect, this->getType(outputType), result,
+                               inputId, oneID, zeroID, out);
+    } else if (inputType.isSigned()) {
+        this->writeInstruction(SpvOpConvertSToF, this->getType(outputType), result, inputId, out);
+    } else if (inputType.isUnsigned()) {
+        this->writeInstruction(SpvOpConvertUToF, this->getType(outputType), result, inputId, out);
     } else {
-        SkASSERT(argType.isUnsigned());
-        this->writeInstruction(SpvOpConvertUToF, this->getType(constructorType), result, parameter,
-                               out);
+        SkDEBUGFAILF("unsupported type for float typecast: %s", inputType.description().c_str());
+        return (SpvId)-1;
     }
     return result;
 }
 
 SpvId SPIRVCodeGenerator::writeIntConstructor(const Constructor& c, OutputStream& out) {
-    const Type& constructorType = c.type();
     SkASSERT(c.arguments().size() == 1);
-    const Type& argType = c.arguments()[0]->type();
-    SkASSERT(constructorType.isSigned());
-    SkASSERT(argType.isNumber() || argType.isBoolean());
+    SkASSERT(c.type().isSigned());
+    const Expression& ctorExpr = *c.arguments()[0];
+    SpvId expressionId = this->writeExpression(ctorExpr, out);
+    return this->castScalarToSignedInt(expressionId, ctorExpr.type(), c.type(), out);
+}
+
+SpvId SPIRVCodeGenerator::castScalarToSignedInt(SpvId inputId, const Type& inputType,
+                                                const Type& outputType, OutputStream& out) {
+    // Casting a signed int to signed int is a no-op.
+    if (inputType.isSigned()) {
+        return inputId;
+    }
+
+    // Given the input type, generate the appropriate instruction to cast to signed int.
     SpvId result = this->nextId();
-    SpvId parameter = this->writeExpression(*c.arguments()[0], out);
-    if (argType.isBoolean()) {
+    if (inputType.isBoolean()) {
         // Use OpSelect to convert the boolean argument to a literal 1 or 0.
         IntLiteral one(/*offset=*/-1, /*value=*/1, fContext.fTypes.fInt.get());
         SpvId      oneID = this->writeIntLiteral(one);
         IntLiteral zero(/*offset=*/-1, /*value=*/0, fContext.fTypes.fInt.get());
         SpvId      zeroID = this->writeIntLiteral(zero);
-        this->writeInstruction(SpvOpSelect, this->getType(constructorType), result, parameter,
-                               oneID, zeroID, out);
-    } else if (argType.isFloat()) {
-        this->writeInstruction(SpvOpConvertFToS, this->getType(constructorType), result, parameter,
-                               out);
-    }
-    else {
-        SkASSERT(argType.isUnsigned());
-        this->writeInstruction(SpvOpBitcast, this->getType(constructorType), result, parameter,
-                               out);
+        this->writeInstruction(SpvOpSelect, this->getType(outputType), result,
+                               inputId, oneID, zeroID, out);
+    } else if (inputType.isFloat()) {
+        this->writeInstruction(SpvOpConvertFToS, this->getType(outputType), result, inputId, out);
+    } else if (inputType.isUnsigned()) {
+        this->writeInstruction(SpvOpBitcast, this->getType(outputType), result, inputId, out);
+    } else {
+        SkDEBUGFAILF("unsupported type for signed int typecast: %s",
+                     inputType.description().c_str());
+        return (SpvId)-1;
     }
     return result;
 }
 
 SpvId SPIRVCodeGenerator::writeUIntConstructor(const Constructor& c, OutputStream& out) {
-    const Type& constructorType = c.type();
     SkASSERT(c.arguments().size() == 1);
-    const Type& argType = c.arguments()[0]->type();
-    SkASSERT(constructorType.isUnsigned());
-    SkASSERT(argType.isNumber() || argType.isBoolean());
+    SkASSERT(c.type().isUnsigned());
+    const Expression& ctorExpr = *c.arguments()[0];
+    SpvId expressionId = this->writeExpression(ctorExpr, out);
+    return this->castScalarToUnsignedInt(expressionId, ctorExpr.type(), c.type(), out);
+}
+
+SpvId SPIRVCodeGenerator::castScalarToUnsignedInt(SpvId inputId, const Type& inputType,
+                                                  const Type& outputType, OutputStream& out) {
+    // Casting an unsigned int to unsigned int is a no-op.
+    if (inputType.isUnsigned()) {
+        return inputId;
+    }
+
+    // Given the input type, generate the appropriate instruction to cast to signed int.
     SpvId result = this->nextId();
-    SpvId parameter = this->writeExpression(*c.arguments()[0], out);
-    if (argType.isBoolean()) {
+    if (inputType.isBoolean()) {
         // Use OpSelect to convert the boolean argument to a literal 1u or 0u.
         IntLiteral one(/*offset=*/-1, /*value=*/1, fContext.fTypes.fUInt.get());
         SpvId      oneID = this->writeIntLiteral(one);
         IntLiteral zero(/*offset=*/-1, /*value=*/0, fContext.fTypes.fUInt.get());
         SpvId      zeroID = this->writeIntLiteral(zero);
-        this->writeInstruction(SpvOpSelect, this->getType(constructorType), result, parameter,
-                               oneID, zeroID, out);
-    } else if (argType.isFloat()) {
-        this->writeInstruction(SpvOpConvertFToU, this->getType(constructorType), result, parameter,
-                               out);
+        this->writeInstruction(SpvOpSelect, this->getType(outputType), result,
+                               inputId, oneID, zeroID, out);
+    } else if (inputType.isFloat()) {
+        this->writeInstruction(SpvOpConvertFToU, this->getType(outputType), result, inputId, out);
+    } else if (inputType.isSigned()) {
+        this->writeInstruction(SpvOpBitcast, this->getType(outputType), result, inputId, out);
     } else {
-        SkASSERT(argType.isSigned());
-        this->writeInstruction(SpvOpBitcast, this->getType(constructorType), result, parameter,
-                               out);
+        SkDEBUGFAILF("unsupported type for unsigned int typecast: %s",
+                     inputType.description().c_str());
+        return (SpvId)-1;
     }
     return result;
 }
diff --git a/src/sksl/SkSLSPIRVCodeGenerator.h b/src/sksl/SkSLSPIRVCodeGenerator.h
index e7cac71..e1d23bb 100644
--- a/src/sksl/SkSLSPIRVCodeGenerator.h
+++ b/src/sksl/SkSLSPIRVCodeGenerator.h
@@ -227,10 +227,19 @@
 
     SpvId writeFloatConstructor(const Constructor& c, OutputStream& out);
 
+    SpvId castScalarToFloat(SpvId inputId, const Type& inputType, const Type& outputType,
+                            OutputStream& out);
+
     SpvId writeIntConstructor(const Constructor& c, OutputStream& out);
 
+    SpvId castScalarToSignedInt(SpvId inputId, const Type& inputType, const Type& outputType,
+                                OutputStream& out);
+
     SpvId writeUIntConstructor(const Constructor& c, OutputStream& out);
 
+    SpvId castScalarToUnsignedInt(SpvId inputId, const Type& inputType, const Type& outputType,
+                                  OutputStream& out);
+
     /**
      * Writes a matrix with the diagonal entries all equal to the provided expression, and all other
      * entries equal to zero.
diff --git a/tests/sksl/intrinsics/golden/All.asm.frag b/tests/sksl/intrinsics/golden/All.asm.frag
index 1b307cf..c16d789 100644
--- a/tests/sksl/intrinsics/golden/All.asm.frag
+++ b/tests/sksl/intrinsics/golden/All.asm.frag
@@ -13,7 +13,7 @@
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,11 +32,11 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4bool %a
-%17 = OpAll %bool %18
-%19 = OpSelect %int %17 %int_1 %int_0
-%16 = OpConvertSToF %float %19
+%17 = OpLoad %v4bool %a
+%16 = OpAll %bool %17
+%18 = OpSelect %int %16 %int_1 %int_0
+%22 = OpConvertSToF %float %18
 %23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %23 %16
+OpStore %23 %22
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/Any.asm.frag b/tests/sksl/intrinsics/golden/Any.asm.frag
index 978badc..5c895c1 100644
--- a/tests/sksl/intrinsics/golden/Any.asm.frag
+++ b/tests/sksl/intrinsics/golden/Any.asm.frag
@@ -13,7 +13,7 @@
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,11 +32,11 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4bool %a
-%17 = OpAny %bool %18
-%19 = OpSelect %int %17 %int_1 %int_0
-%16 = OpConvertSToF %float %19
+%17 = OpLoad %v4bool %a
+%16 = OpAny %bool %17
+%18 = OpSelect %int %16 %int_1 %int_0
+%22 = OpConvertSToF %float %18
 %23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %23 %16
+OpStore %23 %22
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/BitCount.asm.frag b/tests/sksl/intrinsics/golden/BitCount.asm.frag
index ba9fa64..54e1d61 100644
--- a/tests/sksl/intrinsics/golden/BitCount.asm.frag
+++ b/tests/sksl/intrinsics/golden/BitCount.asm.frag
@@ -33,15 +33,15 @@
 %int_1 = OpConstant %int 1
 %main = OpFunction %void None %17
 %18 = OpLabel
-%21 = OpLoad %int %a
-%20 = OpBitCount %int %21
-%19 = OpConvertSToF %float %20
+%20 = OpLoad %int %a
+%19 = OpBitCount %int %20
+%21 = OpConvertSToF %float %19
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %uint %b
-%26 = OpBitCount %int %27
-%25 = OpConvertSToF %float %26
+OpStore %22 %21
+%26 = OpLoad %uint %b
+%25 = OpBitCount %int %26
+%27 = OpConvertSToF %float %25
 %28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %25
+OpStore %28 %27
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/Equal.asm.frag b/tests/sksl/intrinsics/golden/Equal.asm.frag
index 95c7d5d..d188b1f 100644
--- a/tests/sksl/intrinsics/golden/Equal.asm.frag
+++ b/tests/sksl/intrinsics/golden/Equal.asm.frag
@@ -15,8 +15,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,13 +36,13 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4float %a
-%19 = OpLoad %v4float %b
-%17 = OpFOrdEqual %v4bool %18 %19
-%21 = OpCompositeExtract %bool %17 0
-%22 = OpSelect %int %21 %int_1 %int_0
-%16 = OpConvertSToF %float %22
+%17 = OpLoad %v4float %a
+%18 = OpLoad %v4float %b
+%16 = OpFOrdEqual %v4bool %17 %18
+%20 = OpCompositeExtract %bool %16 0
+%21 = OpSelect %int %20 %int_1 %int_0
+%25 = OpConvertSToF %float %21
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %16
+OpStore %26 %25
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/FindLSB.asm.frag b/tests/sksl/intrinsics/golden/FindLSB.asm.frag
index 3cc2e29..be9ccfe 100644
--- a/tests/sksl/intrinsics/golden/FindLSB.asm.frag
+++ b/tests/sksl/intrinsics/golden/FindLSB.asm.frag
@@ -33,15 +33,15 @@
 %int_1 = OpConstant %int 1
 %main = OpFunction %void None %17
 %18 = OpLabel
-%21 = OpLoad %int %a
-%20 = OpExtInst %int %1 FindILsb %21
-%19 = OpConvertSToF %float %20
+%20 = OpLoad %int %a
+%19 = OpExtInst %int %1 FindILsb %20
+%21 = OpConvertSToF %float %19
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %uint %b
-%26 = OpExtInst %int %1 FindILsb %27
-%25 = OpConvertSToF %float %26
+OpStore %22 %21
+%26 = OpLoad %uint %b
+%25 = OpExtInst %int %1 FindILsb %26
+%27 = OpConvertSToF %float %25
 %28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %25
+OpStore %28 %27
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/FindMSB.asm.frag b/tests/sksl/intrinsics/golden/FindMSB.asm.frag
index 5e2b5dd..03fa929 100644
--- a/tests/sksl/intrinsics/golden/FindMSB.asm.frag
+++ b/tests/sksl/intrinsics/golden/FindMSB.asm.frag
@@ -33,15 +33,15 @@
 %int_1 = OpConstant %int 1
 %main = OpFunction %void None %17
 %18 = OpLabel
-%21 = OpLoad %int %a
-%20 = OpExtInst %int %1 FindSMsb %21
-%19 = OpConvertSToF %float %20
+%20 = OpLoad %int %a
+%19 = OpExtInst %int %1 FindSMsb %20
+%21 = OpConvertSToF %float %19
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %19
-%27 = OpLoad %uint %b
-%26 = OpExtInst %int %1 FindUMsb %27
-%25 = OpConvertSToF %float %26
+OpStore %22 %21
+%26 = OpLoad %uint %b
+%25 = OpExtInst %int %1 FindUMsb %26
+%27 = OpConvertSToF %float %25
 %28 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %28 %25
+OpStore %28 %27
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/FloatBitsToInt.asm.frag b/tests/sksl/intrinsics/golden/FloatBitsToInt.asm.frag
index f9382b0..65fc773 100644
--- a/tests/sksl/intrinsics/golden/FloatBitsToInt.asm.frag
+++ b/tests/sksl/intrinsics/golden/FloatBitsToInt.asm.frag
@@ -28,10 +28,10 @@
 %int_0 = OpConstant %int 0
 %main = OpFunction %void None %13
 %14 = OpLabel
-%17 = OpLoad %float %a
-%16 = OpBitcast %int %17
-%15 = OpConvertSToF %float %16
+%16 = OpLoad %float %a
+%15 = OpBitcast %int %16
+%18 = OpConvertSToF %float %15
 %19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %15
+OpStore %19 %18
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/FloatBitsToUint.asm.frag b/tests/sksl/intrinsics/golden/FloatBitsToUint.asm.frag
index 6da6bdc..8e0bbe9 100644
--- a/tests/sksl/intrinsics/golden/FloatBitsToUint.asm.frag
+++ b/tests/sksl/intrinsics/golden/FloatBitsToUint.asm.frag
@@ -29,10 +29,10 @@
 %int_0 = OpConstant %int 0
 %main = OpFunction %void None %13
 %14 = OpLabel
-%17 = OpLoad %float %a
-%16 = OpBitcast %uint %17
-%15 = OpConvertUToF %float %16
+%16 = OpLoad %float %a
+%15 = OpBitcast %uint %16
+%18 = OpConvertUToF %float %15
 %19 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %19 %15
+OpStore %19 %18
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/GreaterThan.asm.frag b/tests/sksl/intrinsics/golden/GreaterThan.asm.frag
index a4567f0..2d65eae 100644
--- a/tests/sksl/intrinsics/golden/GreaterThan.asm.frag
+++ b/tests/sksl/intrinsics/golden/GreaterThan.asm.frag
@@ -15,8 +15,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,13 +36,13 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4float %a
-%19 = OpLoad %v4float %b
-%17 = OpFOrdGreaterThan %v4bool %18 %19
-%21 = OpCompositeExtract %bool %17 0
-%22 = OpSelect %int %21 %int_1 %int_0
-%16 = OpConvertSToF %float %22
+%17 = OpLoad %v4float %a
+%18 = OpLoad %v4float %b
+%16 = OpFOrdGreaterThan %v4bool %17 %18
+%20 = OpCompositeExtract %bool %16 0
+%21 = OpSelect %int %20 %int_1 %int_0
+%25 = OpConvertSToF %float %21
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %16
+OpStore %26 %25
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/GreaterThanEqual.asm.frag b/tests/sksl/intrinsics/golden/GreaterThanEqual.asm.frag
index 6e381cf..2768ecb 100644
--- a/tests/sksl/intrinsics/golden/GreaterThanEqual.asm.frag
+++ b/tests/sksl/intrinsics/golden/GreaterThanEqual.asm.frag
@@ -15,8 +15,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,13 +36,13 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4float %a
-%19 = OpLoad %v4float %b
-%17 = OpFOrdGreaterThanEqual %v4bool %18 %19
-%21 = OpCompositeExtract %bool %17 0
-%22 = OpSelect %int %21 %int_1 %int_0
-%16 = OpConvertSToF %float %22
+%17 = OpLoad %v4float %a
+%18 = OpLoad %v4float %b
+%16 = OpFOrdGreaterThanEqual %v4bool %17 %18
+%20 = OpCompositeExtract %bool %16 0
+%21 = OpSelect %int %20 %int_1 %int_0
+%25 = OpConvertSToF %float %21
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %16
+OpStore %26 %25
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/IsInf.asm.frag b/tests/sksl/intrinsics/golden/IsInf.asm.frag
index e87fa42..7101c31 100644
--- a/tests/sksl/intrinsics/golden/IsInf.asm.frag
+++ b/tests/sksl/intrinsics/golden/IsInf.asm.frag
@@ -13,7 +13,7 @@
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
+OpDecorate %16 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -31,11 +31,11 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %13
 %14 = OpLabel
-%17 = OpLoad %float %a
-%16 = OpIsInf %bool %17
-%18 = OpSelect %int %16 %int_1 %int_0
-%15 = OpConvertSToF %float %18
+%16 = OpLoad %float %a
+%15 = OpIsInf %bool %16
+%17 = OpSelect %int %15 %int_1 %int_0
+%21 = OpConvertSToF %float %17
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %15
+OpStore %22 %21
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/IsNan.asm.frag b/tests/sksl/intrinsics/golden/IsNan.asm.frag
index d6f0815..c53d4a2 100644
--- a/tests/sksl/intrinsics/golden/IsNan.asm.frag
+++ b/tests/sksl/intrinsics/golden/IsNan.asm.frag
@@ -13,7 +13,7 @@
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
-OpDecorate %17 RelaxedPrecision
+OpDecorate %16 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -31,11 +31,11 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %13
 %14 = OpLabel
-%17 = OpLoad %float %a
-%16 = OpIsNan %bool %17
-%18 = OpSelect %int %16 %int_1 %int_0
-%15 = OpConvertSToF %float %18
+%16 = OpLoad %float %a
+%15 = OpIsNan %bool %16
+%17 = OpSelect %int %15 %int_1 %int_0
+%21 = OpConvertSToF %float %17
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %15
+OpStore %22 %21
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/LessThan.asm.frag b/tests/sksl/intrinsics/golden/LessThan.asm.frag
index 46ee3ec..5456390 100644
--- a/tests/sksl/intrinsics/golden/LessThan.asm.frag
+++ b/tests/sksl/intrinsics/golden/LessThan.asm.frag
@@ -19,8 +19,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
 OpDecorate %28 RelaxedPrecision
-OpDecorate %29 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -52,29 +52,29 @@
 %int_2 = OpConstant %int 2
 %main = OpFunction %void None %24
 %25 = OpLabel
-%28 = OpLoad %v4float %a
-%29 = OpLoad %v4float %b
-%27 = OpFOrdLessThan %v4bool %28 %29
-%31 = OpCompositeExtract %bool %27 0
-%32 = OpSelect %int %31 %int_1 %int_0
-%26 = OpConvertSToF %float %32
+%27 = OpLoad %v4float %a
+%28 = OpLoad %v4float %b
+%26 = OpFOrdLessThan %v4bool %27 %28
+%30 = OpCompositeExtract %bool %26 0
+%31 = OpSelect %int %30 %int_1 %int_0
+%34 = OpConvertSToF %float %31
 %35 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %35 %26
-%39 = OpLoad %v2uint %c
-%40 = OpLoad %v2uint %d
-%38 = OpULessThan %v2bool %39 %40
-%42 = OpCompositeExtract %bool %38 1
-%43 = OpSelect %int %42 %int_1 %int_0
-%37 = OpConvertSToF %float %43
+OpStore %35 %34
+%38 = OpLoad %v2uint %c
+%39 = OpLoad %v2uint %d
+%37 = OpULessThan %v2bool %38 %39
+%41 = OpCompositeExtract %bool %37 1
+%42 = OpSelect %int %41 %int_1 %int_0
+%43 = OpConvertSToF %float %42
 %44 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %44 %37
-%47 = OpLoad %v3int %e
-%48 = OpLoad %v3int %f
-%46 = OpSLessThan %v3bool %47 %48
-%50 = OpCompositeExtract %bool %46 2
-%51 = OpSelect %int %50 %int_1 %int_0
-%45 = OpConvertSToF %float %51
+OpStore %44 %43
+%46 = OpLoad %v3int %e
+%47 = OpLoad %v3int %f
+%45 = OpSLessThan %v3bool %46 %47
+%49 = OpCompositeExtract %bool %45 2
+%50 = OpSelect %int %49 %int_1 %int_0
+%51 = OpConvertSToF %float %50
 %52 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2
-OpStore %52 %45
+OpStore %52 %51
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/LessThanEqual.asm.frag b/tests/sksl/intrinsics/golden/LessThanEqual.asm.frag
index 63042b5..c234229 100644
--- a/tests/sksl/intrinsics/golden/LessThanEqual.asm.frag
+++ b/tests/sksl/intrinsics/golden/LessThanEqual.asm.frag
@@ -15,8 +15,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,13 +36,13 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4float %a
-%19 = OpLoad %v4float %b
-%17 = OpFOrdLessThanEqual %v4bool %18 %19
-%21 = OpCompositeExtract %bool %17 0
-%22 = OpSelect %int %21 %int_1 %int_0
-%16 = OpConvertSToF %float %22
+%17 = OpLoad %v4float %a
+%18 = OpLoad %v4float %b
+%16 = OpFOrdLessThanEqual %v4bool %17 %18
+%20 = OpCompositeExtract %bool %16 0
+%21 = OpSelect %int %20 %int_1 %int_0
+%25 = OpConvertSToF %float %21
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %16
+OpStore %26 %25
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/Not.asm.frag b/tests/sksl/intrinsics/golden/Not.asm.frag
index 2b56cc2..de55c2d 100644
--- a/tests/sksl/intrinsics/golden/Not.asm.frag
+++ b/tests/sksl/intrinsics/golden/Not.asm.frag
@@ -13,7 +13,7 @@
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
-OpDecorate %18 RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -32,12 +32,12 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4bool %a
-%17 = OpLogicalNot %v4bool %18
-%19 = OpCompositeExtract %bool %17 0
-%20 = OpSelect %int %19 %int_1 %int_0
-%16 = OpConvertSToF %float %20
+%17 = OpLoad %v4bool %a
+%16 = OpLogicalNot %v4bool %17
+%18 = OpCompositeExtract %bool %16 0
+%19 = OpSelect %int %18 %int_1 %int_0
+%23 = OpConvertSToF %float %19
 %24 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %24 %16
+OpStore %24 %23
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/NotEqual.asm.frag b/tests/sksl/intrinsics/golden/NotEqual.asm.frag
index 88a6030..657df61 100644
--- a/tests/sksl/intrinsics/golden/NotEqual.asm.frag
+++ b/tests/sksl/intrinsics/golden/NotEqual.asm.frag
@@ -15,8 +15,8 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
+OpDecorate %17 RelaxedPrecision
 OpDecorate %18 RelaxedPrecision
-OpDecorate %19 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -36,13 +36,13 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %main = OpFunction %void None %14
 %15 = OpLabel
-%18 = OpLoad %v4float %a
-%19 = OpLoad %v4float %b
-%17 = OpFOrdNotEqual %v4bool %18 %19
-%21 = OpCompositeExtract %bool %17 0
-%22 = OpSelect %int %21 %int_1 %int_0
-%16 = OpConvertSToF %float %22
+%17 = OpLoad %v4float %a
+%18 = OpLoad %v4float %b
+%16 = OpFOrdNotEqual %v4bool %17 %18
+%20 = OpCompositeExtract %bool %16 0
+%21 = OpSelect %int %20 %int_1 %int_0
+%25 = OpConvertSToF %float %21
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %16
+OpStore %26 %25
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/intrinsics/golden/Pack.asm.frag b/tests/sksl/intrinsics/golden/Pack.asm.frag
index d9cafcd..cab559c 100644
--- a/tests/sksl/intrinsics/golden/Pack.asm.frag
+++ b/tests/sksl/intrinsics/golden/Pack.asm.frag
@@ -15,11 +15,11 @@
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
 OpDecorate %a RelaxedPrecision
 OpDecorate %b RelaxedPrecision
-OpDecorate %20 RelaxedPrecision
-OpDecorate %28 RelaxedPrecision
-OpDecorate %32 RelaxedPrecision
-OpDecorate %36 RelaxedPrecision
-OpDecorate %40 RelaxedPrecision
+OpDecorate %19 RelaxedPrecision
+OpDecorate %27 RelaxedPrecision
+OpDecorate %31 RelaxedPrecision
+OpDecorate %35 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -40,30 +40,30 @@
 %int_0 = OpConstant %int 0
 %main = OpFunction %void None %16
 %17 = OpLabel
-%20 = OpLoad %v2float %a
-%19 = OpExtInst %uint %1 PackHalf2x16 %20
-%18 = OpConvertUToF %float %19
+%19 = OpLoad %v2float %a
+%18 = OpExtInst %uint %1 PackHalf2x16 %19
+%21 = OpConvertUToF %float %18
 %22 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %22 %18
-%28 = OpLoad %v2float %a
-%27 = OpExtInst %uint %1 PackUnorm2x16 %28
-%26 = OpConvertUToF %float %27
+OpStore %22 %21
+%27 = OpLoad %v2float %a
+%26 = OpExtInst %uint %1 PackUnorm2x16 %27
+%28 = OpConvertUToF %float %26
 %29 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %29 %26
-%32 = OpLoad %v2float %a
-%31 = OpExtInst %uint %1 PackSnorm2x16 %32
-%30 = OpConvertUToF %float %31
+OpStore %29 %28
+%31 = OpLoad %v2float %a
+%30 = OpExtInst %uint %1 PackSnorm2x16 %31
+%32 = OpConvertUToF %float %30
 %33 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %33 %30
-%36 = OpLoad %v4float %b
-%35 = OpExtInst %uint %1 PackUnorm4x8 %36
-%34 = OpConvertUToF %float %35
+OpStore %33 %32
+%35 = OpLoad %v4float %b
+%34 = OpExtInst %uint %1 PackUnorm4x8 %35
+%36 = OpConvertUToF %float %34
 %37 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %37 %34
-%40 = OpLoad %v4float %b
-%39 = OpExtInst %uint %1 PackSnorm4x8 %40
-%38 = OpConvertUToF %float %39
+OpStore %37 %36
+%39 = OpLoad %v4float %b
+%38 = OpExtInst %uint %1 PackSnorm4x8 %39
+%40 = OpConvertUToF %float %38
 %41 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %41 %38
+OpStore %41 %40
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/Assignment.asm.frag b/tests/sksl/shared/golden/Assignment.asm.frag
index f63fe93..d1aa8b2 100644
--- a/tests/sksl/shared/golden/Assignment.asm.frag
+++ b/tests/sksl/shared/golden/Assignment.asm.frag
@@ -179,10 +179,10 @@
 OpStore %sk_FragColor %113
 %114 = OpLoad %v4float %x
 OpStore %sk_FragColor %114
-%116 = OpAccessChain %_ptr_Function_int %ai %int_0
-%117 = OpLoad %int %116
-%115 = OpConvertSToF %float %117
-%118 = OpCompositeConstruct %v4float %115 %115 %115 %115
+%115 = OpAccessChain %_ptr_Function_int %ai %int_0
+%116 = OpLoad %int %115
+%117 = OpConvertSToF %float %116
+%118 = OpCompositeConstruct %v4float %117 %117 %117 %117
 OpStore %sk_FragColor %118
 %119 = OpAccessChain %_ptr_Function_v4int %ai4 %int_0
 %120 = OpLoad %v4int %119
diff --git a/tests/sksl/shared/golden/Clockwise.asm.frag b/tests/sksl/shared/golden/Clockwise.asm.frag
index 1750480..431275a 100644
--- a/tests/sksl/shared/golden/Clockwise.asm.frag
+++ b/tests/sksl/shared/golden/Clockwise.asm.frag
@@ -11,7 +11,7 @@
 OpDecorate %sk_FragColor Index 0
 OpDecorate %sk_Clockwise RelaxedPrecision
 OpDecorate %sk_Clockwise BuiltIn FrontFacing
-OpDecorate %14 RelaxedPrecision
+OpDecorate %13 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -26,11 +26,11 @@
 %int_n1 = OpConstant %int -1
 %main = OpFunction %void None %11
 %12 = OpLabel
-%14 = OpLoad %bool %sk_Clockwise
-%15 = OpLogicalNot %bool %14
-%16 = OpSelect %int %15 %int_1 %int_n1
-%13 = OpConvertSToF %float %16
-%20 = OpCompositeConstruct %v4float %13 %13 %13 %13
+%13 = OpLoad %bool %sk_Clockwise
+%14 = OpLogicalNot %bool %13
+%15 = OpSelect %int %14 %int_1 %int_n1
+%19 = OpConvertSToF %float %15
+%20 = OpCompositeConstruct %v4float %19 %19 %19 %19
 OpStore %sk_FragColor %20
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/Geometry.asm.geom b/tests/sksl/shared/golden/Geometry.asm.geom
index 8655ace..5a9a29a 100644
--- a/tests/sksl/shared/golden/Geometry.asm.geom
+++ b/tests/sksl/shared/golden/Geometry.asm.geom
@@ -39,18 +39,18 @@
 %17 = OpLabel
 %19 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %21 = OpLoad %v4float %19
-%25 = OpLoad %int %sk_InvocationID
-%24 = OpConvertSToF %float %25
-%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %24
+%24 = OpLoad %int %sk_InvocationID
+%25 = OpConvertSToF %float %24
+%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %25
 %27 = OpFAdd %v4float %21 %26
 %28 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %28 %27
 OpEmitVertex
 %31 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %32 = OpLoad %v4float %31
-%35 = OpLoad %int %sk_InvocationID
-%34 = OpConvertSToF %float %35
-%36 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %34
+%34 = OpLoad %int %sk_InvocationID
+%35 = OpConvertSToF %float %34
+%36 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %35
 %37 = OpFAdd %v4float %32 %36
 %38 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %38 %37
diff --git a/tests/sksl/shared/golden/GeometryExtension.asm.geom b/tests/sksl/shared/golden/GeometryExtension.asm.geom
index 592863f..38b5bc5 100644
--- a/tests/sksl/shared/golden/GeometryExtension.asm.geom
+++ b/tests/sksl/shared/golden/GeometryExtension.asm.geom
@@ -38,9 +38,9 @@
 %17 = OpLabel
 %19 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %21 = OpLoad %v4float %19
-%25 = OpLoad %int %sk_InvocationID
-%24 = OpConvertSToF %float %25
-%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %24
+%24 = OpLoad %int %sk_InvocationID
+%25 = OpConvertSToF %float %24
+%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %25
 %27 = OpFAdd %v4float %21 %26
 %28 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %28 %27
diff --git a/tests/sksl/shared/golden/GeometryGSInvocations.asm.geom b/tests/sksl/shared/golden/GeometryGSInvocations.asm.geom
index 592863f..38b5bc5 100644
--- a/tests/sksl/shared/golden/GeometryGSInvocations.asm.geom
+++ b/tests/sksl/shared/golden/GeometryGSInvocations.asm.geom
@@ -38,9 +38,9 @@
 %17 = OpLabel
 %19 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %21 = OpLoad %v4float %19
-%25 = OpLoad %int %sk_InvocationID
-%24 = OpConvertSToF %float %25
-%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %24
+%24 = OpLoad %int %sk_InvocationID
+%25 = OpConvertSToF %float %24
+%26 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %25
 %27 = OpFAdd %v4float %21 %26
 %28 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %28 %27
diff --git a/tests/sksl/shared/golden/GeometryNoGSInvocations.asm.geom b/tests/sksl/shared/golden/GeometryNoGSInvocations.asm.geom
index ed86496..38f8287 100644
--- a/tests/sksl/shared/golden/GeometryNoGSInvocations.asm.geom
+++ b/tests/sksl/shared/golden/GeometryNoGSInvocations.asm.geom
@@ -50,18 +50,18 @@
 %21 = OpLabel
 %28 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %30 = OpLoad %v4float %28
-%34 = OpLoad %int %sk_InvocationID
-%33 = OpConvertSToF %float %34
-%35 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %33
+%33 = OpLoad %int %sk_InvocationID
+%34 = OpConvertSToF %float %33
+%35 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %34
 %36 = OpFAdd %v4float %30 %35
 %37 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %37 %36
 OpEmitVertex
 %40 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %41 = OpLoad %v4float %40
-%44 = OpLoad %int %sk_InvocationID
-%43 = OpConvertSToF %float %44
-%45 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %43
+%43 = OpLoad %int %sk_InvocationID
+%44 = OpConvertSToF %float %43
+%45 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %44
 %46 = OpFAdd %v4float %41 %45
 %47 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %47 %46
diff --git a/tests/sksl/shared/golden/GeometryNoGSInvocationsReorder.asm.geom b/tests/sksl/shared/golden/GeometryNoGSInvocationsReorder.asm.geom
index 4f8f61b..5cec76d 100644
--- a/tests/sksl/shared/golden/GeometryNoGSInvocationsReorder.asm.geom
+++ b/tests/sksl/shared/golden/GeometryNoGSInvocationsReorder.asm.geom
@@ -50,18 +50,18 @@
 %21 = OpLabel
 %28 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %30 = OpLoad %v4float %28
-%34 = OpLoad %int %sk_InvocationID
-%33 = OpConvertSToF %float %34
-%35 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %33
+%33 = OpLoad %int %sk_InvocationID
+%34 = OpConvertSToF %float %33
+%35 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %34
 %36 = OpFAdd %v4float %30 %35
 %37 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %37 %36
 OpEmitVertex
 %40 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %41 = OpLoad %v4float %40
-%44 = OpLoad %int %sk_InvocationID
-%43 = OpConvertSToF %float %44
-%45 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %43
+%43 = OpLoad %int %sk_InvocationID
+%44 = OpConvertSToF %float %43
+%45 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %44
 %46 = OpFAdd %v4float %41 %45
 %47 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %47 %46
diff --git a/tests/sksl/shared/golden/MixedTypeCommaOperator.asm.frag b/tests/sksl/shared/golden/MixedTypeCommaOperator.asm.frag
index de994ee..2b68d94 100644
--- a/tests/sksl/shared/golden/MixedTypeCommaOperator.asm.frag
+++ b/tests/sksl/shared/golden/MixedTypeCommaOperator.asm.frag
@@ -26,29 +26,29 @@
 %_ptr_Output_float = OpTypePointer Output %float
 %int_0 = OpConstant %int 0
 %v2float = OpTypeVector %float 2
-%22 = OpConstantComposite %v2float %float_1 %float_1
+%21 = OpConstantComposite %v2float %float_1 %float_1
 %v3float = OpTypeVector %float 3
-%26 = OpConstantComposite %v3float %float_1 %float_1 %float_1
+%25 = OpConstantComposite %v3float %float_1 %float_1 %float_1
 %int_2 = OpConstant %int 2
 %float_0 = OpConstant %float 0
 %mat2v2float = OpTypeMatrix %v2float 2
 %int_3 = OpConstant %int 3
 %main = OpFunction %void None %11
 %12 = OpLabel
-%13 = OpConvertSToF %float %int_1
+%16 = OpConvertSToF %float %int_1
 %17 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %17 %13
-%20 = OpConvertSToF %float %int_1
+OpStore %17 %16
+%22 = OpConvertSToF %float %int_1
 %23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_1
-OpStore %23 %20
-%24 = OpConvertSToF %float %int_1
+OpStore %23 %22
+%26 = OpConvertSToF %float %int_1
 %27 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_2
-OpStore %27 %24
-%32 = OpCompositeConstruct %v2float %float_1 %float_0
-%33 = OpCompositeConstruct %v2float %float_0 %float_1
-%30 = OpCompositeConstruct %mat2v2float %32 %33
-%29 = OpConvertSToF %float %int_1
+OpStore %27 %26
+%31 = OpCompositeConstruct %v2float %float_1 %float_0
+%32 = OpCompositeConstruct %v2float %float_0 %float_1
+%29 = OpCompositeConstruct %mat2v2float %31 %32
+%34 = OpConvertSToF %float %int_1
 %35 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_3
-OpStore %35 %29
+OpStore %35 %34
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/NormalizationGeo.asm.geom b/tests/sksl/shared/golden/NormalizationGeo.asm.geom
index 66d7540..fc7edfc 100644
--- a/tests/sksl/shared/golden/NormalizationGeo.asm.geom
+++ b/tests/sksl/shared/golden/NormalizationGeo.asm.geom
@@ -50,9 +50,9 @@
 %19 = OpLabel
 %21 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %23 = OpLoad %v4float %21
-%27 = OpLoad %int %sk_InvocationID
-%26 = OpConvertSToF %float %27
-%28 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %26
+%26 = OpLoad %int %sk_InvocationID
+%27 = OpConvertSToF %float %26
+%28 = OpCompositeConstruct %v4float %float_n0_5 %float_0 %float_0 %27
 %29 = OpFAdd %v4float %23 %28
 %30 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %30 %29
@@ -80,9 +80,9 @@
 OpEmitVertex
 %54 = OpAccessChain %_ptr_Input_v4float %8 %int_0 %int_0
 %55 = OpLoad %v4float %54
-%58 = OpLoad %int %sk_InvocationID
-%57 = OpConvertSToF %float %58
-%59 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %57
+%57 = OpLoad %int %sk_InvocationID
+%58 = OpConvertSToF %float %57
+%59 = OpCompositeConstruct %v4float %float_0_5 %float_0 %float_0 %58
 %60 = OpFAdd %v4float %55 %59
 %61 = OpAccessChain %_ptr_Output_v4float %3 %int_0
 OpStore %61 %60
diff --git a/tests/sksl/shared/golden/NumberCasts.asm.frag b/tests/sksl/shared/golden/NumberCasts.asm.frag
index c7c39a0..0c19ad0 100644
--- a/tests/sksl/shared/golden/NumberCasts.asm.frag
+++ b/tests/sksl/shared/golden/NumberCasts.asm.frag
@@ -23,9 +23,9 @@
 OpDecorate %BF RelaxedPrecision
 OpDecorate %BI RelaxedPrecision
 OpDecorate %BB RelaxedPrecision
-OpDecorate %31 RelaxedPrecision
-OpDecorate %37 RelaxedPrecision
-OpDecorate %40 RelaxedPrecision
+OpDecorate %30 RelaxedPrecision
+OpDecorate %36 RelaxedPrecision
+OpDecorate %39 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -66,18 +66,18 @@
 OpStore %IF %int_1
 OpStore %II %int_1
 OpStore %IB %int_1
-%31 = OpLoad %bool %BF
-%30 = OpSelect %float %31 %float_1 %float_0
+%30 = OpLoad %bool %BF
+%31 = OpSelect %float %30 %float_1 %float_0
 %33 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %33 %30
-%37 = OpLoad %bool %BI
-%36 = OpSelect %float %37 %float_1 %float_0
+OpStore %33 %31
+%36 = OpLoad %bool %BI
+%37 = OpSelect %float %36 %float_1 %float_0
 %38 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %38 %36
-%40 = OpLoad %bool %BB
-%39 = OpSelect %float %40 %float_1 %float_0
+OpStore %38 %37
+%39 = OpLoad %bool %BB
+%40 = OpSelect %float %39 %float_1 %float_0
 %41 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %41 %39
+OpStore %41 %40
 %42 = OpLoad %float %FF
 %43 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
 OpStore %43 %42
@@ -87,17 +87,17 @@
 %46 = OpLoad %float %FB
 %47 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
 OpStore %47 %46
-%49 = OpLoad %int %IF
-%48 = OpConvertSToF %float %49
+%48 = OpLoad %int %IF
+%49 = OpConvertSToF %float %48
 %50 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %50 %48
-%52 = OpLoad %int %II
-%51 = OpConvertSToF %float %52
+OpStore %50 %49
+%51 = OpLoad %int %II
+%52 = OpConvertSToF %float %51
 %53 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %53 %51
-%55 = OpLoad %int %IB
-%54 = OpConvertSToF %float %55
+OpStore %53 %52
+%54 = OpLoad %int %IB
+%55 = OpConvertSToF %float %54
 %56 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %56 %54
+OpStore %56 %55
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/NumberConversions.asm.frag b/tests/sksl/shared/golden/NumberConversions.asm.frag
index a2b56a2..890db9d 100644
--- a/tests/sksl/shared/golden/NumberConversions.asm.frag
+++ b/tests/sksl/shared/golden/NumberConversions.asm.frag
@@ -61,57 +61,57 @@
 OpDecorate %36 RelaxedPrecision
 OpDecorate %i2s RelaxedPrecision
 OpDecorate %us2s RelaxedPrecision
-OpDecorate %41 RelaxedPrecision
+OpDecorate %40 RelaxedPrecision
 OpDecorate %ui2s RelaxedPrecision
 OpDecorate %h2s RelaxedPrecision
-OpDecorate %47 RelaxedPrecision
+OpDecorate %46 RelaxedPrecision
 OpDecorate %f2s RelaxedPrecision
 OpDecorate %b2s RelaxedPrecision
-OpDecorate %53 RelaxedPrecision
+OpDecorate %52 RelaxedPrecision
 OpDecorate %57 RelaxedPrecision
-OpDecorate %62 RelaxedPrecision
-OpDecorate %68 RelaxedPrecision
-OpDecorate %74 RelaxedPrecision
+OpDecorate %61 RelaxedPrecision
+OpDecorate %67 RelaxedPrecision
+OpDecorate %73 RelaxedPrecision
 OpDecorate %s2us RelaxedPrecision
-OpDecorate %77 RelaxedPrecision
+OpDecorate %76 RelaxedPrecision
 OpDecorate %i2us RelaxedPrecision
 OpDecorate %us2us RelaxedPrecision
 OpDecorate %82 RelaxedPrecision
 OpDecorate %ui2us RelaxedPrecision
 OpDecorate %h2us RelaxedPrecision
-OpDecorate %87 RelaxedPrecision
+OpDecorate %86 RelaxedPrecision
 OpDecorate %f2us RelaxedPrecision
 OpDecorate %b2us RelaxedPrecision
-OpDecorate %93 RelaxedPrecision
-OpDecorate %98 RelaxedPrecision
+OpDecorate %92 RelaxedPrecision
+OpDecorate %97 RelaxedPrecision
 OpDecorate %103 RelaxedPrecision
-OpDecorate %108 RelaxedPrecision
-OpDecorate %114 RelaxedPrecision
-OpDecorate %117 RelaxedPrecision
-OpDecorate %123 RelaxedPrecision
+OpDecorate %107 RelaxedPrecision
+OpDecorate %113 RelaxedPrecision
+OpDecorate %116 RelaxedPrecision
+OpDecorate %122 RelaxedPrecision
 OpDecorate %128 RelaxedPrecision
-OpDecorate %133 RelaxedPrecision
-OpDecorate %139 RelaxedPrecision
+OpDecorate %132 RelaxedPrecision
+OpDecorate %138 RelaxedPrecision
 OpDecorate %142 RelaxedPrecision
-OpDecorate %144 RelaxedPrecision
+OpDecorate %143 RelaxedPrecision
 OpDecorate %145 RelaxedPrecision
 OpDecorate %148 RelaxedPrecision
 OpDecorate %149 RelaxedPrecision
 OpDecorate %150 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
-OpDecorate %154 RelaxedPrecision
+OpDecorate %153 RelaxedPrecision
 OpDecorate %155 RelaxedPrecision
-OpDecorate %157 RelaxedPrecision
+OpDecorate %156 RelaxedPrecision
 OpDecorate %158 RelaxedPrecision
-OpDecorate %160 RelaxedPrecision
+OpDecorate %159 RelaxedPrecision
 OpDecorate %161 RelaxedPrecision
-OpDecorate %163 RelaxedPrecision
+OpDecorate %162 RelaxedPrecision
 OpDecorate %164 RelaxedPrecision
-OpDecorate %166 RelaxedPrecision
+OpDecorate %165 RelaxedPrecision
 OpDecorate %167 RelaxedPrecision
-OpDecorate %169 RelaxedPrecision
+OpDecorate %168 RelaxedPrecision
 OpDecorate %170 RelaxedPrecision
-OpDecorate %172 RelaxedPrecision
+OpDecorate %171 RelaxedPrecision
 OpDecorate %173 RelaxedPrecision
 OpDecorate %176 RelaxedPrecision
 OpDecorate %179 RelaxedPrecision
@@ -120,19 +120,19 @@
 OpDecorate %188 RelaxedPrecision
 OpDecorate %191 RelaxedPrecision
 OpDecorate %194 RelaxedPrecision
-OpDecorate %196 RelaxedPrecision
+OpDecorate %195 RelaxedPrecision
 OpDecorate %197 RelaxedPrecision
-OpDecorate %199 RelaxedPrecision
+OpDecorate %198 RelaxedPrecision
 OpDecorate %200 RelaxedPrecision
-OpDecorate %202 RelaxedPrecision
+OpDecorate %201 RelaxedPrecision
 OpDecorate %203 RelaxedPrecision
 OpDecorate %207 RelaxedPrecision
-OpDecorate %209 RelaxedPrecision
-OpDecorate %211 RelaxedPrecision
+OpDecorate %208 RelaxedPrecision
+OpDecorate %210 RelaxedPrecision
 OpDecorate %212 RelaxedPrecision
-OpDecorate %214 RelaxedPrecision
+OpDecorate %213 RelaxedPrecision
 OpDecorate %215 RelaxedPrecision
-OpDecorate %217 RelaxedPrecision
+OpDecorate %216 RelaxedPrecision
 OpDecorate %218 RelaxedPrecision
 OpDecorate %221 RelaxedPrecision
 OpDecorate %224 RelaxedPrecision
@@ -217,18 +217,18 @@
 %main = OpFunction %void None %136
 %137 = OpLabel
 OpStore %b %true
-%17 = OpExtInst %float %1 Sqrt %float_1
-%16 = OpConvertFToS %int %17
-OpStore %s %16
-%21 = OpExtInst %float %1 Sqrt %float_1
-%20 = OpConvertFToS %int %21
-OpStore %i %20
-%26 = OpExtInst %float %1 Sqrt %float_1
-%25 = OpConvertFToU %uint %26
-OpStore %us %25
-%29 = OpExtInst %float %1 Sqrt %float_1
-%28 = OpConvertFToU %uint %29
-OpStore %ui %28
+%16 = OpExtInst %float %1 Sqrt %float_1
+%18 = OpConvertFToS %int %16
+OpStore %s %18
+%20 = OpExtInst %float %1 Sqrt %float_1
+%21 = OpConvertFToS %int %20
+OpStore %i %21
+%25 = OpExtInst %float %1 Sqrt %float_1
+%26 = OpConvertFToU %uint %25
+OpStore %us %26
+%28 = OpExtInst %float %1 Sqrt %float_1
+%29 = OpConvertFToU %uint %28
+OpStore %ui %29
 %32 = OpExtInst %float %1 Sqrt %float_1
 OpStore %h %32
 %34 = OpExtInst %float %1 Sqrt %float_1
@@ -237,199 +237,199 @@
 OpStore %s2s %36
 %38 = OpLoad %int %i
 OpStore %i2s %38
-%41 = OpLoad %uint %us
-%40 = OpBitcast %int %41
-OpStore %us2s %40
-%44 = OpLoad %uint %ui
-%43 = OpBitcast %int %44
-OpStore %ui2s %43
-%47 = OpLoad %float %h
-%46 = OpConvertFToS %int %47
-OpStore %h2s %46
-%50 = OpLoad %float %f
-%49 = OpConvertFToS %int %50
-OpStore %f2s %49
-%53 = OpLoad %bool %b
-%52 = OpSelect %int %53 %int_1 %int_0
-OpStore %b2s %52
+%40 = OpLoad %uint %us
+%41 = OpBitcast %int %40
+OpStore %us2s %41
+%43 = OpLoad %uint %ui
+%44 = OpBitcast %int %43
+OpStore %ui2s %44
+%46 = OpLoad %float %h
+%47 = OpConvertFToS %int %46
+OpStore %h2s %47
+%49 = OpLoad %float %f
+%50 = OpConvertFToS %int %49
+OpStore %f2s %50
+%52 = OpLoad %bool %b
+%53 = OpSelect %int %52 %int_1 %int_0
+OpStore %b2s %53
 %57 = OpLoad %int %s
 OpStore %s2i %57
 %59 = OpLoad %int %i
 OpStore %i2i %59
-%62 = OpLoad %uint %us
-%61 = OpBitcast %int %62
-OpStore %us2i %61
-%65 = OpLoad %uint %ui
-%64 = OpBitcast %int %65
-OpStore %ui2i %64
-%68 = OpLoad %float %h
-%67 = OpConvertFToS %int %68
-OpStore %h2i %67
-%71 = OpLoad %float %f
-%70 = OpConvertFToS %int %71
-OpStore %f2i %70
-%74 = OpLoad %bool %b
-%73 = OpSelect %int %74 %int_1 %int_0
-OpStore %b2i %73
-%77 = OpLoad %int %s
-%76 = OpBitcast %uint %77
-OpStore %s2us %76
-%80 = OpLoad %int %i
-%79 = OpBitcast %uint %80
-OpStore %i2us %79
+%61 = OpLoad %uint %us
+%62 = OpBitcast %int %61
+OpStore %us2i %62
+%64 = OpLoad %uint %ui
+%65 = OpBitcast %int %64
+OpStore %ui2i %65
+%67 = OpLoad %float %h
+%68 = OpConvertFToS %int %67
+OpStore %h2i %68
+%70 = OpLoad %float %f
+%71 = OpConvertFToS %int %70
+OpStore %f2i %71
+%73 = OpLoad %bool %b
+%74 = OpSelect %int %73 %int_1 %int_0
+OpStore %b2i %74
+%76 = OpLoad %int %s
+%77 = OpBitcast %uint %76
+OpStore %s2us %77
+%79 = OpLoad %int %i
+%80 = OpBitcast %uint %79
+OpStore %i2us %80
 %82 = OpLoad %uint %us
 OpStore %us2us %82
 %84 = OpLoad %uint %ui
 OpStore %ui2us %84
-%87 = OpLoad %float %h
-%86 = OpConvertFToU %uint %87
-OpStore %h2us %86
-%90 = OpLoad %float %f
-%89 = OpConvertFToU %uint %90
-OpStore %f2us %89
-%93 = OpLoad %bool %b
-%92 = OpSelect %uint %93 %uint_1 %uint_0
-OpStore %b2us %92
-%98 = OpLoad %int %s
-%97 = OpBitcast %uint %98
-OpStore %s2ui %97
-%101 = OpLoad %int %i
-%100 = OpBitcast %uint %101
-OpStore %i2ui %100
+%86 = OpLoad %float %h
+%87 = OpConvertFToU %uint %86
+OpStore %h2us %87
+%89 = OpLoad %float %f
+%90 = OpConvertFToU %uint %89
+OpStore %f2us %90
+%92 = OpLoad %bool %b
+%93 = OpSelect %uint %92 %uint_1 %uint_0
+OpStore %b2us %93
+%97 = OpLoad %int %s
+%98 = OpBitcast %uint %97
+OpStore %s2ui %98
+%100 = OpLoad %int %i
+%101 = OpBitcast %uint %100
+OpStore %i2ui %101
 %103 = OpLoad %uint %us
 OpStore %us2ui %103
 %105 = OpLoad %uint %ui
 OpStore %ui2ui %105
-%108 = OpLoad %float %h
-%107 = OpConvertFToU %uint %108
-OpStore %h2ui %107
-%111 = OpLoad %float %f
-%110 = OpConvertFToU %uint %111
-OpStore %f2ui %110
-%114 = OpLoad %bool %b
-%113 = OpSelect %uint %114 %uint_1 %uint_0
-OpStore %b2ui %113
-%117 = OpLoad %int %s
-%116 = OpConvertSToF %float %117
-OpStore %s2f %116
-%120 = OpLoad %int %i
-%119 = OpConvertSToF %float %120
-OpStore %i2f %119
-%123 = OpLoad %uint %us
-%122 = OpConvertUToF %float %123
-OpStore %us2f %122
-%126 = OpLoad %uint %ui
-%125 = OpConvertUToF %float %126
-OpStore %ui2f %125
+%107 = OpLoad %float %h
+%108 = OpConvertFToU %uint %107
+OpStore %h2ui %108
+%110 = OpLoad %float %f
+%111 = OpConvertFToU %uint %110
+OpStore %f2ui %111
+%113 = OpLoad %bool %b
+%114 = OpSelect %uint %113 %uint_1 %uint_0
+OpStore %b2ui %114
+%116 = OpLoad %int %s
+%117 = OpConvertSToF %float %116
+OpStore %s2f %117
+%119 = OpLoad %int %i
+%120 = OpConvertSToF %float %119
+OpStore %i2f %120
+%122 = OpLoad %uint %us
+%123 = OpConvertUToF %float %122
+OpStore %us2f %123
+%125 = OpLoad %uint %ui
+%126 = OpConvertUToF %float %125
+OpStore %ui2f %126
 %128 = OpLoad %float %h
 OpStore %h2f %128
 %130 = OpLoad %float %f
 OpStore %f2f %130
-%133 = OpLoad %bool %b
-%132 = OpSelect %float %133 %float_1 %float_0
-OpStore %b2f %132
-%139 = OpLoad %int %s
-%138 = OpConvertSToF %float %139
-%141 = OpLoad %int %i
-%140 = OpConvertSToF %float %141
-%142 = OpFAdd %float %138 %140
-%144 = OpLoad %uint %us
-%143 = OpConvertUToF %float %144
-%145 = OpFAdd %float %142 %143
-%147 = OpLoad %uint %ui
-%146 = OpConvertUToF %float %147
-%148 = OpFAdd %float %145 %146
+%132 = OpLoad %bool %b
+%133 = OpSelect %float %132 %float_1 %float_0
+OpStore %b2f %133
+%138 = OpLoad %int %s
+%139 = OpConvertSToF %float %138
+%140 = OpLoad %int %i
+%141 = OpConvertSToF %float %140
+%142 = OpFAdd %float %139 %141
+%143 = OpLoad %uint %us
+%144 = OpConvertUToF %float %143
+%145 = OpFAdd %float %142 %144
+%146 = OpLoad %uint %ui
+%147 = OpConvertUToF %float %146
+%148 = OpFAdd %float %145 %147
 %149 = OpLoad %float %h
 %150 = OpFAdd %float %148 %149
 %151 = OpLoad %float %f
 %152 = OpFAdd %float %150 %151
-%154 = OpLoad %int %s2s
-%153 = OpConvertSToF %float %154
-%155 = OpFAdd %float %152 %153
-%157 = OpLoad %int %i2s
-%156 = OpConvertSToF %float %157
-%158 = OpFAdd %float %155 %156
-%160 = OpLoad %int %us2s
-%159 = OpConvertSToF %float %160
-%161 = OpFAdd %float %158 %159
-%163 = OpLoad %int %ui2s
-%162 = OpConvertSToF %float %163
-%164 = OpFAdd %float %161 %162
-%166 = OpLoad %int %h2s
-%165 = OpConvertSToF %float %166
-%167 = OpFAdd %float %164 %165
-%169 = OpLoad %int %f2s
-%168 = OpConvertSToF %float %169
-%170 = OpFAdd %float %167 %168
-%172 = OpLoad %int %b2s
-%171 = OpConvertSToF %float %172
-%173 = OpFAdd %float %170 %171
-%175 = OpLoad %int %s2i
-%174 = OpConvertSToF %float %175
-%176 = OpFAdd %float %173 %174
-%178 = OpLoad %int %i2i
-%177 = OpConvertSToF %float %178
-%179 = OpFAdd %float %176 %177
-%181 = OpLoad %int %us2i
-%180 = OpConvertSToF %float %181
-%182 = OpFAdd %float %179 %180
-%184 = OpLoad %int %ui2i
-%183 = OpConvertSToF %float %184
-%185 = OpFAdd %float %182 %183
-%187 = OpLoad %int %h2i
-%186 = OpConvertSToF %float %187
-%188 = OpFAdd %float %185 %186
-%190 = OpLoad %int %f2i
-%189 = OpConvertSToF %float %190
-%191 = OpFAdd %float %188 %189
-%193 = OpLoad %int %b2i
-%192 = OpConvertSToF %float %193
-%194 = OpFAdd %float %191 %192
-%196 = OpLoad %uint %s2us
-%195 = OpConvertUToF %float %196
-%197 = OpFAdd %float %194 %195
-%199 = OpLoad %uint %i2us
-%198 = OpConvertUToF %float %199
-%200 = OpFAdd %float %197 %198
-%202 = OpLoad %uint %us2us
-%201 = OpConvertUToF %float %202
-%203 = OpFAdd %float %200 %201
+%153 = OpLoad %int %s2s
+%154 = OpConvertSToF %float %153
+%155 = OpFAdd %float %152 %154
+%156 = OpLoad %int %i2s
+%157 = OpConvertSToF %float %156
+%158 = OpFAdd %float %155 %157
+%159 = OpLoad %int %us2s
+%160 = OpConvertSToF %float %159
+%161 = OpFAdd %float %158 %160
+%162 = OpLoad %int %ui2s
+%163 = OpConvertSToF %float %162
+%164 = OpFAdd %float %161 %163
+%165 = OpLoad %int %h2s
+%166 = OpConvertSToF %float %165
+%167 = OpFAdd %float %164 %166
+%168 = OpLoad %int %f2s
+%169 = OpConvertSToF %float %168
+%170 = OpFAdd %float %167 %169
+%171 = OpLoad %int %b2s
+%172 = OpConvertSToF %float %171
+%173 = OpFAdd %float %170 %172
+%174 = OpLoad %int %s2i
+%175 = OpConvertSToF %float %174
+%176 = OpFAdd %float %173 %175
+%177 = OpLoad %int %i2i
+%178 = OpConvertSToF %float %177
+%179 = OpFAdd %float %176 %178
+%180 = OpLoad %int %us2i
+%181 = OpConvertSToF %float %180
+%182 = OpFAdd %float %179 %181
+%183 = OpLoad %int %ui2i
+%184 = OpConvertSToF %float %183
+%185 = OpFAdd %float %182 %184
+%186 = OpLoad %int %h2i
+%187 = OpConvertSToF %float %186
+%188 = OpFAdd %float %185 %187
+%189 = OpLoad %int %f2i
+%190 = OpConvertSToF %float %189
+%191 = OpFAdd %float %188 %190
+%192 = OpLoad %int %b2i
+%193 = OpConvertSToF %float %192
+%194 = OpFAdd %float %191 %193
+%195 = OpLoad %uint %s2us
+%196 = OpConvertUToF %float %195
+%197 = OpFAdd %float %194 %196
+%198 = OpLoad %uint %i2us
+%199 = OpConvertUToF %float %198
+%200 = OpFAdd %float %197 %199
+%201 = OpLoad %uint %us2us
+%202 = OpConvertUToF %float %201
+%203 = OpFAdd %float %200 %202
 %204 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
 OpStore %204 %203
 %206 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
 %207 = OpLoad %float %206
-%209 = OpLoad %uint %ui2us
-%208 = OpConvertUToF %float %209
-%211 = OpLoad %uint %h2us
-%210 = OpConvertUToF %float %211
-%212 = OpFAdd %float %208 %210
-%214 = OpLoad %uint %f2us
-%213 = OpConvertUToF %float %214
-%215 = OpFAdd %float %212 %213
-%217 = OpLoad %uint %b2us
-%216 = OpConvertUToF %float %217
-%218 = OpFAdd %float %215 %216
-%220 = OpLoad %uint %s2ui
-%219 = OpConvertUToF %float %220
-%221 = OpFAdd %float %218 %219
-%223 = OpLoad %uint %i2ui
-%222 = OpConvertUToF %float %223
-%224 = OpFAdd %float %221 %222
-%226 = OpLoad %uint %us2ui
-%225 = OpConvertUToF %float %226
-%227 = OpFAdd %float %224 %225
-%229 = OpLoad %uint %ui2ui
-%228 = OpConvertUToF %float %229
-%230 = OpFAdd %float %227 %228
-%232 = OpLoad %uint %h2ui
-%231 = OpConvertUToF %float %232
-%233 = OpFAdd %float %230 %231
-%235 = OpLoad %uint %f2ui
-%234 = OpConvertUToF %float %235
-%236 = OpFAdd %float %233 %234
-%238 = OpLoad %uint %b2ui
-%237 = OpConvertUToF %float %238
-%239 = OpFAdd %float %236 %237
+%208 = OpLoad %uint %ui2us
+%209 = OpConvertUToF %float %208
+%210 = OpLoad %uint %h2us
+%211 = OpConvertUToF %float %210
+%212 = OpFAdd %float %209 %211
+%213 = OpLoad %uint %f2us
+%214 = OpConvertUToF %float %213
+%215 = OpFAdd %float %212 %214
+%216 = OpLoad %uint %b2us
+%217 = OpConvertUToF %float %216
+%218 = OpFAdd %float %215 %217
+%219 = OpLoad %uint %s2ui
+%220 = OpConvertUToF %float %219
+%221 = OpFAdd %float %218 %220
+%222 = OpLoad %uint %i2ui
+%223 = OpConvertUToF %float %222
+%224 = OpFAdd %float %221 %223
+%225 = OpLoad %uint %us2ui
+%226 = OpConvertUToF %float %225
+%227 = OpFAdd %float %224 %226
+%228 = OpLoad %uint %ui2ui
+%229 = OpConvertUToF %float %228
+%230 = OpFAdd %float %227 %229
+%231 = OpLoad %uint %h2ui
+%232 = OpConvertUToF %float %231
+%233 = OpFAdd %float %230 %232
+%234 = OpLoad %uint %f2ui
+%235 = OpConvertUToF %float %234
+%236 = OpFAdd %float %233 %235
+%237 = OpLoad %uint %b2ui
+%238 = OpConvertUToF %float %237
+%239 = OpFAdd %float %236 %238
 %240 = OpLoad %float %s2f
 %241 = OpFAdd %float %239 %240
 %242 = OpLoad %float %i2f
diff --git a/tests/sksl/shared/golden/Offset.asm.frag b/tests/sksl/shared/golden/Offset.asm.frag
index ab18de6..ae00317 100644
--- a/tests/sksl/shared/golden/Offset.asm.frag
+++ b/tests/sksl/shared/golden/Offset.asm.frag
@@ -39,10 +39,10 @@
 %t = OpVariable %_ptr_Function_Test Function
 %18 = OpAccessChain %_ptr_Function_int %t %int_0
 OpStore %18 %int_0
-%21 = OpAccessChain %_ptr_Function_int %t %int_0
-%22 = OpLoad %int %21
-%20 = OpConvertSToF %float %22
+%20 = OpAccessChain %_ptr_Function_int %t %int_0
+%21 = OpLoad %int %20
+%22 = OpConvertSToF %float %21
 %23 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %23 %20
+OpStore %23 %22
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/Operators.asm.frag b/tests/sksl/shared/golden/Operators.asm.frag
index bc25251..2ec7cff 100644
--- a/tests/sksl/shared/golden/Operators.asm.frag
+++ b/tests/sksl/shared/golden/Operators.asm.frag
@@ -21,11 +21,11 @@
 OpDecorate %42 RelaxedPrecision
 OpDecorate %45 RelaxedPrecision
 OpDecorate %48 RelaxedPrecision
-OpDecorate %83 RelaxedPrecision
-OpDecorate %86 RelaxedPrecision
-OpDecorate %89 RelaxedPrecision
-OpDecorate %92 RelaxedPrecision
-OpDecorate %95 RelaxedPrecision
+OpDecorate %82 RelaxedPrecision
+OpDecorate %85 RelaxedPrecision
+OpDecorate %88 RelaxedPrecision
+OpDecorate %91 RelaxedPrecision
+OpDecorate %94 RelaxedPrecision
 %bool = OpTypeBool
 %_ptr_Input_bool = OpTypePointer Input %bool
 %sk_Clockwise = OpVariable %_ptr_Input_bool Input
@@ -135,24 +135,24 @@
 %74 = OpLoad %int %z
 %76 = OpSMod %int %74 %int_5
 OpStore %z %76
-%78 = OpExtInst %float %1 Sqrt %float_1
-%79 = OpCompositeConstruct %v2float %78 %78
-%77 = OpConvertSToF %float %int_6
-OpStore %x %77
-%83 = OpLoad %bool %b
-%82 = OpSelect %float %83 %float_1 %float_0
-%86 = OpLoad %bool %c
-%85 = OpSelect %float %86 %float_1 %float_0
-%87 = OpFMul %float %82 %85
-%89 = OpLoad %bool %d
-%88 = OpSelect %float %89 %float_1 %float_0
-%90 = OpFMul %float %87 %88
-%92 = OpLoad %bool %e
-%91 = OpSelect %float %92 %float_1 %float_0
-%93 = OpFMul %float %90 %91
-%95 = OpLoad %bool %f
-%94 = OpSelect %float %95 %float_1 %float_0
-%96 = OpFMul %float %93 %94
+%77 = OpExtInst %float %1 Sqrt %float_1
+%78 = OpCompositeConstruct %v2float %77 %77
+%81 = OpConvertSToF %float %int_6
+OpStore %x %81
+%82 = OpLoad %bool %b
+%83 = OpSelect %float %82 %float_1 %float_0
+%85 = OpLoad %bool %c
+%86 = OpSelect %float %85 %float_1 %float_0
+%87 = OpFMul %float %83 %86
+%88 = OpLoad %bool %d
+%89 = OpSelect %float %88 %float_1 %float_0
+%90 = OpFMul %float %87 %89
+%91 = OpLoad %bool %e
+%92 = OpSelect %float %91 %float_1 %float_0
+%93 = OpFMul %float %90 %92
+%94 = OpLoad %bool %f
+%95 = OpSelect %float %94 %float_1 %float_0
+%96 = OpFMul %float %93 %95
 OpStore %y %float_6
 %98 = OpExtInst %float %1 Sqrt %float_1
 %99 = OpCompositeConstruct %v2float %98 %98
diff --git a/tests/sksl/shared/golden/Ossfuzz28794.asm.frag b/tests/sksl/shared/golden/Ossfuzz28794.asm.frag
index f5f35dc..569dba1 100644
--- a/tests/sksl/shared/golden/Ossfuzz28794.asm.frag
+++ b/tests/sksl/shared/golden/Ossfuzz28794.asm.frag
@@ -31,9 +31,9 @@
 %main = OpFunction %void None %11
 %12 = OpLabel
 %i = OpVariable %_ptr_Function_int Function
-%17 = OpExtInst %float %1 Sqrt %float_1
-%16 = OpConvertFToS %int %17
-OpStore %i %16
+%16 = OpExtInst %float %1 Sqrt %float_1
+%18 = OpConvertFToS %int %16
+OpStore %i %18
 %19 = OpLoad %int %i
 OpStore %i %int_3
 %21 = OpIMul %int %19 %int_3
diff --git a/tests/sksl/shared/golden/OutParams.asm.frag b/tests/sksl/shared/golden/OutParams.asm.frag
index 02668e6..edb0ea0 100644
--- a/tests/sksl/shared/golden/OutParams.asm.frag
+++ b/tests/sksl/shared/golden/OutParams.asm.frag
@@ -46,8 +46,8 @@
 OpDecorate %73 RelaxedPrecision
 OpDecorate %76 RelaxedPrecision
 OpDecorate %152 RelaxedPrecision
-OpDecorate %156 RelaxedPrecision
-OpDecorate %159 RelaxedPrecision
+OpDecorate %155 RelaxedPrecision
+OpDecorate %158 RelaxedPrecision
 %float = OpTypeFloat 32
 %v4float = OpTypeVector %float 4
 %_ptr_Output_v4float = OpTypePointer Output %v4float
@@ -176,13 +176,13 @@
 OpStore %i4 %92
 %93 = OpAccessChain %_ptr_Function_int %i2 %int_1
 OpStore %93 %int_1
-%96 = OpLoad %v2int %i2
-%97 = OpCompositeExtract %int %96 0
-%95 = OpConvertSToF %float %97
-%99 = OpLoad %v4int %i4
-%100 = OpCompositeExtract %int %99 0
-%98 = OpConvertSToF %float %100
-%101 = OpCompositeConstruct %v4float %float_1 %95 %float_3 %98
+%95 = OpLoad %v2int %i2
+%96 = OpCompositeExtract %int %95 0
+%97 = OpConvertSToF %float %96
+%98 = OpLoad %v4int %i4
+%99 = OpCompositeExtract %int %98 0
+%100 = OpConvertSToF %float %99
+%101 = OpCompositeConstruct %v4float %float_1 %97 %float_3 %100
 OpStore %sk_FragColor %101
 OpStore %f2 %29
 OpStore %f3 %17
@@ -233,13 +233,13 @@
 OpStore %b4 %152
 %153 = OpAccessChain %_ptr_Function_bool %b3 %int_2
 OpStore %153 %true
-%156 = OpLoad %v3bool %b3
-%157 = OpCompositeExtract %bool %156 0
-%155 = OpSelect %float %157 %float_1 %float_0
-%159 = OpLoad %v4bool %b4
-%160 = OpCompositeExtract %bool %159 0
-%158 = OpSelect %float %160 %float_1 %float_0
-%161 = OpCompositeConstruct %v4float %float_1 %float_0 %155 %158
+%155 = OpLoad %v3bool %b3
+%156 = OpCompositeExtract %bool %155 0
+%157 = OpSelect %float %156 %float_1 %float_0
+%158 = OpLoad %v4bool %b4
+%159 = OpCompositeExtract %bool %158 0
+%160 = OpSelect %float %159 %float_1 %float_0
+%161 = OpCompositeConstruct %v4float %float_1 %float_0 %157 %160
 OpStore %sk_FragColor %161
 OpReturn
 OpFunctionEnd
diff --git a/tests/sksl/shared/golden/SampleLocations.asm.vert b/tests/sksl/shared/golden/SampleLocations.asm.vert
index 94e03fa..bf46340 100644
--- a/tests/sksl/shared/golden/SampleLocations.asm.vert
+++ b/tests/sksl/shared/golden/SampleLocations.asm.vert
@@ -119,32 +119,32 @@
 %67 = OpIEqual %bool %int_0 %66
 %69 = OpSelect %float %67 %float_n0_03125 %float_0_03125
 OpStore %outset %69
-%73 = OpLoad %int %ileft
-%72 = OpConvertSToF %float %73
-%75 = OpFDiv %float %72 %float_16
+%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
-%80 = OpLoad %int %iright
-%79 = OpConvertSToF %float %80
-%81 = OpFDiv %float %79 %float_16
+%79 = OpLoad %int %iright
+%80 = OpConvertSToF %float %79
+%81 = OpFDiv %float %80 %float_16
 %82 = OpLoad %float %outset
 %83 = OpFAdd %float %81 %82
 OpStore %r %83
-%86 = OpLoad %int %itop
-%85 = OpConvertSToF %float %86
-%87 = OpFDiv %float %85 %float_16
+%85 = OpLoad %int %itop
+%86 = OpConvertSToF %float %85
+%87 = OpFDiv %float %86 %float_16
 %88 = OpLoad %float %outset
 %89 = OpFSub %float %87 %88
 OpStore %t %89
-%92 = OpLoad %int %ibot
-%91 = OpConvertSToF %float %92
-%93 = OpFDiv %float %91 %float_16
+%91 = OpLoad %int %ibot
+%92 = OpConvertSToF %float %91
+%93 = OpFDiv %float %92 %float_16
 %94 = OpLoad %float %outset
 %95 = OpFAdd %float %93 %94
 OpStore %b %95
-%99 = OpLoad %int %x
-%98 = OpConvertSToF %float %99
+%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
@@ -160,11 +160,11 @@
 OpBranch %106
 %106 = OpLabel
 %109 = OpLoad %float %103
-%110 = OpFAdd %float %98 %109
+%110 = OpFAdd %float %99 %109
 %111 = OpAccessChain %_ptr_Function_float %vertexpos %int_0
 OpStore %111 %110
-%113 = OpLoad %int %y
-%112 = OpConvertSToF %float %113
+%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
@@ -180,23 +180,23 @@
 OpBranch %120
 %120 = OpLabel
 %123 = OpLoad %float %117
-%124 = OpFAdd %float %112 %123
+%124 = OpFAdd %float %113 %123
 %125 = OpAccessChain %_ptr_Function_float %vertexpos %int_1
 OpStore %125 %124
-%127 = OpLoad %int %sk_VertexID
-%128 = OpSMod %int %127 %int_2
-%129 = OpIEqual %bool %int_0 %128
-%130 = OpSelect %int %129 %int_n1 %int_1
-%126 = OpConvertSToF %float %130
+%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 %126
-%135 = OpLoad %int %sk_VertexID
-%136 = OpSDiv %int %135 %int_2
-%137 = OpIEqual %bool %int_0 %136
-%138 = OpSelect %int %137 %int_n1 %int_1
-%134 = OpConvertSToF %float %138
+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 %134
+OpStore %139 %138
 %140 = OpLoad %v2float %vertexpos
 %141 = OpCompositeExtract %float %140 0
 %142 = OpLoad %v2float %vertexpos
diff --git a/tests/sksl/shared/golden/Structs.asm.frag b/tests/sksl/shared/golden/Structs.asm.frag
index 91257e7..81439aa 100644
--- a/tests/sksl/shared/golden/Structs.asm.frag
+++ b/tests/sksl/shared/golden/Structs.asm.frag
@@ -60,12 +60,12 @@
 OpStore %23 %int_0
 %26 = OpAccessChain %_ptr_Private_float %b1 %int_0
 OpStore %26 %float_0
-%29 = OpAccessChain %_ptr_Private_int %a1 %int_0
-%30 = OpLoad %int %29
-%28 = OpConvertSToF %float %30
+%28 = OpAccessChain %_ptr_Private_int %a1 %int_0
+%29 = OpLoad %int %28
+%30 = OpConvertSToF %float %29
 %31 = OpAccessChain %_ptr_Private_float %b1 %int_0
 %32 = OpLoad %float %31
-%33 = OpFAdd %float %28 %32
+%33 = OpFAdd %float %30 %32
 %34 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
 OpStore %34 %33
 OpReturn
diff --git a/tests/sksl/shared/golden/Switch.asm.frag b/tests/sksl/shared/golden/Switch.asm.frag
index ec3e1e6..c996f1c 100644
--- a/tests/sksl/shared/golden/Switch.asm.frag
+++ b/tests/sksl/shared/golden/Switch.asm.frag
@@ -29,10 +29,10 @@
 %main = OpFunction %void None %11
 %12 = OpLabel
 %x = OpVariable %_ptr_Function_float Function
-%16 = OpExtInst %float %1 Sqrt %float_1
-%15 = OpConvertFToS %int %16
+%15 = OpExtInst %float %1 Sqrt %float_1
+%17 = OpConvertFToS %int %15
 OpSelectionMerge %19 None
-OpSwitch %15 %22 0 %20 1 %21
+OpSwitch %17 %22 0 %20 1 %21
 %20 = OpLabel
 OpStore %x %float_0
 OpBranch %19
diff --git a/tests/sksl/shared/golden/SwitchContainingDeadCode.asm.frag b/tests/sksl/shared/golden/SwitchContainingDeadCode.asm.frag
index b6e9e55..0a3cbbf 100644
--- a/tests/sksl/shared/golden/SwitchContainingDeadCode.asm.frag
+++ b/tests/sksl/shared/golden/SwitchContainingDeadCode.asm.frag
@@ -25,10 +25,10 @@
 %21 = OpConstantComposite %v4float %float_2 %float_2 %float_2 %float_2
 %main = OpFunction %void None %11
 %12 = OpLabel
-%14 = OpExtInst %float %1 Sqrt %float_2
-%13 = OpConvertFToS %int %14
+%13 = OpExtInst %float %1 Sqrt %float_2
+%15 = OpConvertFToS %int %13
 OpSelectionMerge %17 None
-OpSwitch %13 %20 0 %18 1 %19
+OpSwitch %15 %20 0 %18 1 %19
 %18 = OpLabel
 OpBranch %19
 %19 = OpLabel
diff --git a/tests/sksl/shared/golden/SwitchWithFallthrough.asm.frag b/tests/sksl/shared/golden/SwitchWithFallthrough.asm.frag
index 47cdfa2..b66e2a2 100644
--- a/tests/sksl/shared/golden/SwitchWithFallthrough.asm.frag
+++ b/tests/sksl/shared/golden/SwitchWithFallthrough.asm.frag
@@ -30,10 +30,10 @@
 %12 = OpLabel
 %x = OpVariable %_ptr_Function_float Function
 OpStore %x %float_0
-%17 = OpExtInst %float %1 Sqrt %float_3
-%16 = OpConvertFToS %int %17
+%16 = OpExtInst %float %1 Sqrt %float_3
+%18 = OpConvertFToS %int %16
 OpSelectionMerge %20 None
-OpSwitch %16 %20 0 %21 1 %22
+OpSwitch %18 %20 0 %21 1 %22
 %21 = OpLabel
 OpStore %x %float_0
 OpBranch %22
diff --git a/tests/sksl/shared/golden/SwizzleByIndex.asm.frag b/tests/sksl/shared/golden/SwizzleByIndex.asm.frag
index 0110d01..30339db 100644
--- a/tests/sksl/shared/golden/SwizzleByIndex.asm.frag
+++ b/tests/sksl/shared/golden/SwizzleByIndex.asm.frag
@@ -68,9 +68,9 @@
 %_8_y = OpVariable %_ptr_Function_float Function
 %_9_z = OpVariable %_ptr_Function_float Function
 %_10_w = OpVariable %_ptr_Function_float Function
-%18 = OpExtInst %float %1 Sqrt %float_1
-%17 = OpConvertFToS %int %18
-%20 = OpCompositeConstruct %v4int %17 %17 %17 %17
+%17 = OpExtInst %float %1 Sqrt %float_1
+%19 = OpConvertFToS %int %17
+%20 = OpCompositeConstruct %v4int %19 %19 %19 %19
 OpStore %_0_i %20
 %23 = OpExtInst %float %1 Sqrt %float_1
 %24 = OpCompositeConstruct %v4float %23 %23 %23 %23
diff --git a/tests/sksl/spirv/golden/ConstantVectorFromVector.asm.frag b/tests/sksl/spirv/golden/ConstantVectorFromVector.asm.frag
index 73b6e23..560a9b5 100644
--- a/tests/sksl/spirv/golden/ConstantVectorFromVector.asm.frag
+++ b/tests/sksl/spirv/golden/ConstantVectorFromVector.asm.frag
@@ -22,22 +22,22 @@
 %11 = OpTypeFunction %void
 %v2float = OpTypeVector %float 2
 %float_0 = OpConstant %float 0
-%17 = OpConstantComposite %v2float %float_0 %float_0
+%16 = OpConstantComposite %v2float %float_0 %float_0
 %int = OpTypeInt 32 1
 %v2int = OpTypeVector %int 2
 %_ptr_Output_float = OpTypePointer Output %float
 %int_0 = OpConstant %int 0
 %main = OpFunction %void None %11
 %12 = OpLabel
-%18 = OpCompositeExtract %float %17 0
-%19 = OpConvertFToS %int %18
-%21 = OpCompositeExtract %float %17 1
-%22 = OpConvertFToS %int %21
-%23 = OpCompositeConstruct %v2int %19 %22
-%14 = OpExtInst %v2int %1 SAbs %23
-%25 = OpCompositeExtract %int %14 0
-%13 = OpConvertSToF %float %25
+%17 = OpCompositeExtract %float %16 0
+%18 = OpConvertFToS %int %17
+%20 = OpCompositeExtract %float %16 1
+%21 = OpConvertFToS %int %20
+%22 = OpCompositeConstruct %v2int %18 %21
+%13 = OpExtInst %v2int %1 SAbs %22
+%24 = OpCompositeExtract %int %13 0
+%25 = OpConvertSToF %float %24
 %26 = OpAccessChain %_ptr_Output_float %sk_FragColor %int_0
-OpStore %26 %13
+OpStore %26 %25
 OpReturn
 OpFunctionEnd