tint/writer: Clean up EmitConstant() methods

Aside from more SPIR-V using OpConstantNull, this is a no-op change.
By refactoring these methods, they're easier to read, and contain less
lambda-heavy code.

Change-Id: I89c26b2b9f1cd0785d86fb3293f7cfda550bef2e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94331
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/tint/writer/glsl/generator_impl.cc b/src/tint/writer/glsl/generator_impl.cc
index 66ff64a..ba19a37 100644
--- a/src/tint/writer/glsl/generator_impl.cc
+++ b/src/tint/writer/glsl/generator_impl.cc
@@ -2210,85 +2210,76 @@
 }
 
 bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
-    auto emit_bool = [&](size_t element_idx) {
-        out << (constant.Element<AInt>(element_idx) ? "true" : "false");
-        return true;
-    };
-    auto emit_f32 = [&](size_t element_idx) {
-        PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
-        return true;
-    };
-    auto emit_i32 = [&](size_t element_idx) {
-        out << constant.Element<AInt>(element_idx).value;
-        return true;
-    };
-    auto emit_u32 = [&](size_t element_idx) {
-        out << constant.Element<AInt>(element_idx).value << "u";
-        return true;
-    };
-    auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
-        if (!EmitType(out, vec_ty, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
-            return false;
-        }
+    return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
+}
 
-        ScopedParen sp(out);
-
-        auto emit_els = [&](auto emit_el) {
-            if (constant.AllEqual(start, end)) {
-                return emit_el(start);
+bool GeneratorImpl::EmitConstantRange(std::ostream& out,
+                                      const sem::Constant& constant,
+                                      const sem::Type* range_ty,
+                                      size_t start,
+                                      size_t end) {
+    return Switch(
+        range_ty,  //
+        [&](const sem::Bool*) {
+            out << (constant.Element<AInt>(start) ? "true" : "false");
+            return true;
+        },
+        [&](const sem::F32*) {
+            PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
+            return true;
+        },
+        [&](const sem::I32*) {
+            out << constant.Element<AInt>(start).value;
+            return true;
+        },
+        [&](const sem::U32*) {
+            out << constant.Element<AInt>(start).value << "u";
+            return true;
+        },
+        [&](const sem::Vector* v) {
+            if (!EmitType(out, v, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
+                return false;
             }
+
+            ScopedParen sp(out);
+
+            if (constant.AllEqual(start, end)) {
+                if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
+                    return false;
+                }
+                return true;
+            }
+
             for (size_t i = start; i < end; i++) {
                 if (i > start) {
                     out << ", ";
                 }
-                if (!emit_el(i)) {
+                if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
                     return false;
                 }
             }
             return true;
-        };
-
-        return Switch(
-            vec_ty->type(),                                         //
-            [&](const sem::Bool*) { return emit_els(emit_bool); },  //
-            [&](const sem::F32*) { return emit_els(emit_f32); },    //
-            [&](const sem::I32*) { return emit_els(emit_i32); },    //
-            [&](const sem::U32*) { return emit_els(emit_u32); },    //
-            [&](Default) {
-                diagnostics_.add_error(diag::System::Writer,
-                                       "unhandled constant vector element type: " +
-                                           builder_.FriendlyName(vec_ty->type()));
-                return false;
-            });
-    };
-    auto emit_matrix = [&](const sem::Matrix* m) {
-        if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
-                      "")) {
-            return false;
-        }
-
-        ScopedParen sp(out);
-
-        for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
-            if (column_idx > 0) {
-                out << ", ";
-            }
-            size_t start = m->rows() * column_idx;
-            size_t end = m->rows() * (column_idx + 1);
-            if (!emit_vector(m->ColumnType(), start, end)) {
+        },
+        [&](const sem::Matrix* m) {
+            if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
+                          "")) {
                 return false;
             }
-        }
-        return true;
-    };
-    return Switch(
-        constant.Type(),                                                                   //
-        [&](const sem::Bool*) { return emit_bool(0); },                                    //
-        [&](const sem::F32*) { return emit_f32(0); },                                      //
-        [&](const sem::I32*) { return emit_i32(0); },                                      //
-        [&](const sem::U32*) { return emit_u32(0); },                                      //
-        [&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); },  //
-        [&](const sem::Matrix* m) { return emit_matrix(m); },                              //
+
+            ScopedParen sp(out);
+
+            for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
+                if (column_idx > 0) {
+                    out << ", ";
+                }
+                size_t col_start = m->rows() * column_idx;
+                size_t col_end = col_start + m->rows();
+                if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
+                    return false;
+                }
+            }
+            return true;
+        },
         [&](Default) {
             diagnostics_.add_error(
                 diag::System::Writer,
diff --git a/src/tint/writer/glsl/generator_impl.h b/src/tint/writer/glsl/generator_impl.h
index 5b07fd3..f925bba 100644
--- a/src/tint/writer/glsl/generator_impl.h
+++ b/src/tint/writer/glsl/generator_impl.h
@@ -347,6 +347,18 @@
     /// @param constant the constant value to emit
     /// @returns true if the constant value was successfully emitted
     bool EmitConstant(std::ostream& out, const sem::Constant& constant);
+    /// Handles emitting a sub-range of a constant value
+    /// @param out the output stream
+    /// @param constant the constant value to emit
+    /// @param range_ty the sub-range type
+    /// @param start the element index for the first element
+    /// @param end the element index for one past the last element
+    /// @returns true if the constant value was successfully emitted
+    bool EmitConstantRange(std::ostream& out,
+                           const sem::Constant& constant,
+                           const sem::Type* range_ty,
+                           size_t start,
+                           size_t end);
     /// Handles a literal
     /// @param out the output stream
     /// @param lit the literal to emit
diff --git a/src/tint/writer/hlsl/generator_impl.cc b/src/tint/writer/hlsl/generator_impl.cc
index de7a0be..0533826 100644
--- a/src/tint/writer/hlsl/generator_impl.cc
+++ b/src/tint/writer/hlsl/generator_impl.cc
@@ -3144,102 +3144,83 @@
 }
 
 bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
-    auto emit_bool = [&](size_t element_idx) {
-        out << (constant.Element<AInt>(element_idx) ? "true" : "false");
-        return true;
-    };
-    auto emit_f32 = [&](size_t element_idx) {
-        PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
-        return true;
-    };
-    auto emit_i32 = [&](size_t element_idx) {
-        out << constant.Element<AInt>(element_idx).value;
-        return true;
-    };
-    auto emit_u32 = [&](size_t element_idx) {
-        out << constant.Element<AInt>(element_idx).value << "u";
-        return true;
-    };
-    auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
-        if (constant.AllEqual(start, end)) {
-            {
-                ScopedParen sp(out);
-                bool ok = Switch(
-                    vec_ty->type(),                                      //
-                    [&](const sem::Bool*) { return emit_bool(start); },  //
-                    [&](const sem::F32*) { return emit_f32(start); },    //
-                    [&](const sem::I32*) { return emit_i32(start); },    //
-                    [&](const sem::U32*) { return emit_u32(start); }     //
-                );
-                if (!ok) {
-                    return false;
-                }
-            }
-            out << ".";
-            for (size_t i = start; i < end; i++) {
-                out << "x";
-            }
+    return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
+}
+
+bool GeneratorImpl::EmitConstantRange(std::ostream& out,
+                                      const sem::Constant& constant,
+                                      const sem::Type* range_ty,
+                                      size_t start,
+                                      size_t end) {
+    return Switch(
+        range_ty,  //
+        [&](const sem::Bool*) {
+            out << (constant.Element<AInt>(start) ? "true" : "false");
             return true;
-        }
+        },
+        [&](const sem::F32*) {
+            PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
+            return true;
+        },
+        [&](const sem::I32*) {
+            out << constant.Element<AInt>(start).value;
+            return true;
+        },
+        [&](const sem::U32*) {
+            out << constant.Element<AInt>(start).value << "u";
+            return true;
+        },
+        [&](const sem::Vector* v) {
+            if (constant.AllEqual(start, end)) {
+                {
+                    ScopedParen sp(out);
+                    if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
+                        return false;
+                    }
+                }
+                out << ".";
+                for (size_t i = start; i < end; i++) {
+                    out << "x";
+                }
+                return true;
+            }
 
-        if (!EmitType(out, vec_ty, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
-            return false;
-        }
+            if (!EmitType(out, v, ast::StorageClass::kNone, ast::Access::kUndefined, "")) {
+                return false;
+            }
 
-        ScopedParen sp(out);
+            ScopedParen sp(out);
 
-        auto emit_els = [&](auto emit_el) {
             for (size_t i = start; i < end; i++) {
                 if (i > start) {
                     out << ", ";
                 }
-                if (!emit_el(i)) {
+                if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
                     return false;
                 }
             }
             return true;
-        };
-        return Switch(
-            vec_ty->type(),                                         //
-            [&](const sem::Bool*) { return emit_els(emit_bool); },  //
-            [&](const sem::F32*) { return emit_els(emit_f32); },    //
-            [&](const sem::I32*) { return emit_els(emit_i32); },    //
-            [&](const sem::U32*) { return emit_els(emit_u32); },    //
-            [&](Default) {
-                diagnostics_.add_error(diag::System::Writer,
-                                       "unhandled constant vector element type: " +
-                                           builder_.FriendlyName(vec_ty->type()));
-                return false;
-            });
-    };
-    auto emit_matrix = [&](const sem::Matrix* m) {
-        if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
-                      "")) {
-            return false;
-        }
-
-        ScopedParen sp(out);
-
-        for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
-            if (column_idx > 0) {
-                out << ", ";
-            }
-            size_t start = m->rows() * column_idx;
-            size_t end = m->rows() * (column_idx + 1);
-            if (!emit_vector(m->ColumnType(), start, end)) {
+        },
+        [&](const sem::Matrix* m) {
+            if (!EmitType(out, constant.Type(), ast::StorageClass::kNone, ast::Access::kUndefined,
+                          "")) {
                 return false;
             }
-        }
-        return true;
-    };
-    return Switch(
-        constant.Type(),                                                                   //
-        [&](const sem::Bool*) { return emit_bool(0); },                                    //
-        [&](const sem::F32*) { return emit_f32(0); },                                      //
-        [&](const sem::I32*) { return emit_i32(0); },                                      //
-        [&](const sem::U32*) { return emit_u32(0); },                                      //
-        [&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); },  //
-        [&](const sem::Matrix* m) { return emit_matrix(m); },
+
+            ScopedParen sp(out);
+
+            for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
+                if (column_idx > 0) {
+                    out << ", ";
+                }
+                size_t col_start = m->rows() * column_idx;
+                size_t col_end = col_start + m->rows();
+                if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
+                    return false;
+                }
+            }
+            return true;
+        },
         [&](Default) {
             diagnostics_.add_error(
                 diag::System::Writer,
diff --git a/src/tint/writer/hlsl/generator_impl.h b/src/tint/writer/hlsl/generator_impl.h
index 485b779..f082f77 100644
--- a/src/tint/writer/hlsl/generator_impl.h
+++ b/src/tint/writer/hlsl/generator_impl.h
@@ -343,6 +343,18 @@
     /// @param constant the constant value to emit
     /// @returns true if the constant value was successfully emitted
     bool EmitConstant(std::ostream& out, const sem::Constant& constant);
+    /// Handles emitting a sub-range of a constant value
+    /// @param out the output stream
+    /// @param constant the constant value to emit
+    /// @param range_ty the sub-range type
+    /// @param start the element index for the first element
+    /// @param end the element index for one past the last element
+    /// @returns true if the constant value was successfully emitted
+    bool EmitConstantRange(std::ostream& out,
+                           const sem::Constant& constant,
+                           const sem::Type* range_ty,
+                           size_t start,
+                           size_t end);
     /// Handles a literal
     /// @param out the output stream
     /// @param lit the literal to emit
diff --git a/src/tint/writer/msl/generator_impl.cc b/src/tint/writer/msl/generator_impl.cc
index 1181c02..8880696 100644
--- a/src/tint/writer/msl/generator_impl.cc
+++ b/src/tint/writer/msl/generator_impl.cc
@@ -1579,83 +1579,75 @@
 }
 
 bool GeneratorImpl::EmitConstant(std::ostream& out, const sem::Constant& constant) {
-    auto emit_bool = [&](size_t element_idx) {
-        out << (constant.Element<AInt>(element_idx) ? "true" : "false");
-        return true;
-    };
-    auto emit_f32 = [&](size_t element_idx) {
-        PrintF32(out, static_cast<float>(constant.Element<AFloat>(element_idx)));
-        return true;
-    };
-    auto emit_i32 = [&](size_t element_idx) {
-        PrintI32(out, static_cast<int32_t>(constant.Element<AInt>(element_idx).value));
-        return true;
-    };
-    auto emit_u32 = [&](size_t element_idx) {
-        out << constant.Element<AInt>(element_idx).value << "u";
-        return true;
-    };
-    auto emit_vector = [&](const sem::Vector* vec_ty, size_t start, size_t end) {
-        if (!EmitType(out, vec_ty, "")) {
-            return false;
-        }
+    return EmitConstantRange(out, constant, constant.Type(), 0, constant.ElementCount());
+}
 
-        ScopedParen sp(out);
-
-        auto emit_els = [&](auto emit_el) {
-            if (constant.AllEqual(start, end)) {
-                return emit_el(start);
+bool GeneratorImpl::EmitConstantRange(std::ostream& out,
+                                      const sem::Constant& constant,
+                                      const sem::Type* range_ty,
+                                      size_t start,
+                                      size_t end) {
+    return Switch(
+        range_ty,  //
+        [&](const sem::Bool*) {
+            out << (constant.Element<AInt>(start) ? "true" : "false");
+            return true;
+        },
+        [&](const sem::F32*) {
+            PrintF32(out, static_cast<float>(constant.Element<AFloat>(start)));
+            return true;
+        },
+        [&](const sem::I32*) {
+            PrintI32(out, static_cast<int32_t>(constant.Element<AInt>(start).value));
+            return true;
+        },
+        [&](const sem::U32*) {
+            out << constant.Element<AInt>(start).value << "u";
+            return true;
+        },
+        [&](const sem::Vector* v) {
+            if (!EmitType(out, v, "")) {
+                return false;
             }
+
+            ScopedParen sp(out);
+
+            if (constant.AllEqual(start, end)) {
+                if (!EmitConstantRange(out, constant, v->type(), start, start + 1)) {
+                    return false;
+                }
+                return true;
+            }
+
             for (size_t i = start; i < end; i++) {
                 if (i > start) {
                     out << ", ";
                 }
-                if (!emit_el(i)) {
+                if (!EmitConstantRange(out, constant, v->type(), i, i + 1u)) {
                     return false;
                 }
             }
             return true;
-        };
-        return Switch(
-            vec_ty->type(),                                         //
-            [&](const sem::Bool*) { return emit_els(emit_bool); },  //
-            [&](const sem::F32*) { return emit_els(emit_f32); },    //
-            [&](const sem::I32*) { return emit_els(emit_i32); },    //
-            [&](const sem::U32*) { return emit_els(emit_u32); },    //
-            [&](Default) {
-                diagnostics_.add_error(diag::System::Writer,
-                                       "unhandled constant vector element type: " +
-                                           builder_.FriendlyName(vec_ty->type()));
-                return false;
-            });
-    };
-    auto emit_matrix = [&](const sem::Matrix* m) {
-        if (!EmitType(out, constant.Type(), "")) {
-            return false;
-        }
-
-        ScopedParen sp(out);
-
-        for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
-            if (column_idx > 0) {
-                out << ", ";
-            }
-            size_t start = m->rows() * column_idx;
-            size_t end = m->rows() * (column_idx + 1);
-            if (!emit_vector(m->ColumnType(), start, end)) {
+        },
+        [&](const sem::Matrix* m) {
+            if (!EmitType(out, m, "")) {
                 return false;
             }
-        }
-        return true;
-    };
-    return Switch(
-        constant.Type(),                                                                   //
-        [&](const sem::Bool*) { return emit_bool(0); },                                    //
-        [&](const sem::F32*) { return emit_f32(0); },                                      //
-        [&](const sem::I32*) { return emit_i32(0); },                                      //
-        [&](const sem::U32*) { return emit_u32(0); },                                      //
-        [&](const sem::Vector* v) { return emit_vector(v, 0, constant.ElementCount()); },  //
-        [&](const sem::Matrix* m) { return emit_matrix(m); },                              //
+
+            ScopedParen sp(out);
+
+            for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
+                if (column_idx > 0) {
+                    out << ", ";
+                }
+                size_t col_start = m->rows() * column_idx;
+                size_t col_end = col_start + m->rows();
+                if (!EmitConstantRange(out, constant, m->ColumnType(), col_start, col_end)) {
+                    return false;
+                }
+            }
+            return true;
+        },
         [&](Default) {
             diagnostics_.add_error(
                 diag::System::Writer,
diff --git a/src/tint/writer/msl/generator_impl.h b/src/tint/writer/msl/generator_impl.h
index 59af5c3..d80d501 100644
--- a/src/tint/writer/msl/generator_impl.h
+++ b/src/tint/writer/msl/generator_impl.h
@@ -257,6 +257,18 @@
     /// @param constant the constant value to emit
     /// @returns true if the constant value was successfully emitted
     bool EmitConstant(std::ostream& out, const sem::Constant& constant);
+    /// Handles emitting a sub-range of a constant value
+    /// @param out the output stream
+    /// @param constant the constant value to emit
+    /// @param range_ty the sub-range type
+    /// @param start the element index for the first element
+    /// @param end the element index for one past the last element
+    /// @returns true if the constant value was successfully emitted
+    bool EmitConstantRange(std::ostream& out,
+                           const sem::Constant& constant,
+                           const sem::Type* range_ty,
+                           size_t start,
+                           size_t end);
     /// Handles a literal
     /// @param out the output of the expression stream
     /// @param lit the literal to emit
diff --git a/src/tint/writer/spirv/builder.cc b/src/tint/writer/spirv/builder.cc
index c71f0fc..9d0d613 100644
--- a/src/tint/writer/spirv/builder.cc
+++ b/src/tint/writer/spirv/builder.cc
@@ -1675,92 +1675,41 @@
 }
 
 uint32_t Builder::GenerateConstantIfNeeded(const sem::Constant& constant) {
-    if (constant.AllZero()) {
-        return GenerateConstantNullIfNeeded(constant.Type());
+    return GenerateConstantRangeIfNeeded(constant, constant.Type(), 0, constant.ElementCount());
+}
+
+uint32_t Builder::GenerateConstantRangeIfNeeded(const sem::Constant& constant,
+                                                const sem::Type* range_ty,
+                                                size_t start,
+                                                size_t end) {
+    if (constant.AllZero(start, end)) {
+        return GenerateConstantNullIfNeeded(range_ty);
     }
 
-    static constexpr size_t kOpsResultIdx = 1;  // operand index of the result
-    auto& global_scope = scope_stack_[0];
-
-    auto gen_bool = [&](size_t element_idx) {
-        bool val = constant.Element<AInt>(element_idx);
-        return GenerateConstantIfNeeded(ScalarConstant::Bool(val));
-    };
-    auto gen_f32 = [&](size_t element_idx) {
-        auto val = f32(constant.Element<AFloat>(element_idx));
-        return GenerateConstantIfNeeded(ScalarConstant::F32(val.value));
-    };
-    auto gen_i32 = [&](size_t element_idx) {
-        auto val = i32(constant.Element<AInt>(element_idx));
-        return GenerateConstantIfNeeded(ScalarConstant::I32(val.value));
-    };
-    auto gen_u32 = [&](size_t element_idx) {
-        auto val = u32(constant.Element<AInt>(element_idx));
-        return GenerateConstantIfNeeded(ScalarConstant::U32(val.value));
-    };
-    auto gen_els = [&](std::vector<Operand>& ids, size_t start, size_t end, auto gen_el) {
-        for (size_t i = start; i < end; i++) {
-            auto id = gen_el(i);
-            if (!id) {
-                return false;
-            }
-            ids.emplace_back(id);
-        }
-        return true;
-    };
-    auto gen_vector = [&](const sem::Vector* ty, size_t start, size_t end) -> uint32_t {
-        auto type_id = GenerateTypeIfNeeded(ty);
+    auto composite = [&](const sem::Type* el_ty) -> uint32_t {
+        auto type_id = GenerateTypeIfNeeded(range_ty);
         if (!type_id) {
             return 0;
         }
 
+        static constexpr size_t kOpsResultIdx = 1;  // operand index of the result
+
         std::vector<Operand> ops;
         ops.reserve(end - start + 2);
         ops.emplace_back(type_id);
         ops.push_back(Operand(0u));  // Placeholder for the result ID
-        auto ok = Switch(
-            constant.ElementType(),                                                //
-            [&](const sem::Bool*) { return gen_els(ops, start, end, gen_bool); },  //
-            [&](const sem::F32*) { return gen_els(ops, start, end, gen_f32); },    //
-            [&](const sem::I32*) { return gen_els(ops, start, end, gen_i32); },    //
-            [&](const sem::U32*) { return gen_els(ops, start, end, gen_u32); },    //
-            [&](Default) {
-                error_ = "unhandled constant element type: " + builder_.FriendlyName(ty);
-                return false;
-            });
-        if (!ok) {
-            return 0;
-        }
 
-        return utils::GetOrCreate(global_scope.type_ctor_to_id_, OperandListKey{ops},
-                                  [&]() -> uint32_t {
-                                      auto result = result_op();
-                                      ops[kOpsResultIdx] = result;
-                                      push_type(spv::Op::OpConstantComposite, std::move(ops));
-                                      return std::get<uint32_t>(result);
-                                  });
-    };
-    auto gen_matrix = [&](const sem::Matrix* m) -> uint32_t {
-        auto mat_type_id = GenerateTypeIfNeeded(m);
-        if (!mat_type_id) {
-            return 0;
-        }
-
-        std::vector<Operand> ops;
-        ops.reserve(m->columns() + 2);
-        ops.emplace_back(mat_type_id);
-        ops.push_back(Operand(0u));  // Placeholder for the result ID
-
-        for (size_t column_idx = 0; column_idx < m->columns(); column_idx++) {
-            size_t start = m->rows() * column_idx;
-            size_t end = m->rows() * (column_idx + 1);
-            auto column_id = gen_vector(m->ColumnType(), start, end);
-            if (!column_id) {
+        uint32_t step = 0;
+        sem::Type::DeepestElementOf(el_ty, &step);
+        for (size_t i = start; i < end; i += step) {
+            auto id = GenerateConstantRangeIfNeeded(constant, el_ty, i, i + step);
+            if (!id) {
                 return 0;
             }
-            ops.emplace_back(column_id);
+            ops.emplace_back(id);
         }
 
+        auto& global_scope = scope_stack_[0];
         return utils::GetOrCreate(global_scope.type_ctor_to_id_, OperandListKey{ops},
                                   [&]() -> uint32_t {
                                       auto result = result_op();
@@ -1771,13 +1720,26 @@
     };
 
     return Switch(
-        constant.Type(),                                                                  //
-        [&](const sem::Bool*) { return gen_bool(0); },                                    //
-        [&](const sem::F32*) { return gen_f32(0); },                                      //
-        [&](const sem::I32*) { return gen_i32(0); },                                      //
-        [&](const sem::U32*) { return gen_u32(0); },                                      //
-        [&](const sem::Vector* v) { return gen_vector(v, 0, constant.ElementCount()); },  //
-        [&](const sem::Matrix* m) { return gen_matrix(m); },                              //
+        range_ty,  //
+        [&](const sem::Bool*) {
+            bool val = constant.Element<AInt>(start);
+            return GenerateConstantIfNeeded(ScalarConstant::Bool(val));
+        },
+        [&](const sem::F32*) {
+            auto val = f32(constant.Element<AFloat>(start));
+            return GenerateConstantIfNeeded(ScalarConstant::F32(val.value));
+        },
+        [&](const sem::I32*) {
+            auto val = i32(constant.Element<AInt>(start));
+            return GenerateConstantIfNeeded(ScalarConstant::I32(val.value));
+        },
+        [&](const sem::U32*) {
+            auto val = u32(constant.Element<AInt>(start));
+            return GenerateConstantIfNeeded(ScalarConstant::U32(val.value));
+        },
+        [&](const sem::Vector* v) { return composite(v->type()); },
+        [&](const sem::Matrix* m) { return composite(m->ColumnType()); },
+        [&](const sem::Array* a) { return composite(a->ElemType()); },
         [&](Default) {
             error_ = "unhandled constant type: " + builder_.FriendlyName(constant.Type());
             return false;
diff --git a/src/tint/writer/spirv/builder.h b/src/tint/writer/spirv/builder.h
index 9866328..8465089 100644
--- a/src/tint/writer/spirv/builder.h
+++ b/src/tint/writer/spirv/builder.h
@@ -556,6 +556,17 @@
     /// @returns the ID on success or 0 on failure
     uint32_t GenerateConstantIfNeeded(const sem::Constant& constant);
 
+    /// Handles emitting a sub-range of a constant value
+    /// @param constant the constant value to emit
+    /// @param range_ty the sub-range type
+    /// @param start the element index for the first element
+    /// @param end the element index for one past the last element
+    /// @returns true if the constant value was successfully emitted
+    uint32_t GenerateConstantRangeIfNeeded(const sem::Constant& constant,
+                                           const sem::Type* range_ty,
+                                           size_t start,
+                                           size_t end);
+
     /// Generates a scalar constant if needed
     /// @param constant the constant to generate.
     /// @returns the ID on success or 0 on failure
diff --git a/src/tint/writer/spirv/builder_accessor_expression_test.cc b/src/tint/writer/spirv/builder_accessor_expression_test.cc
index 2df1b65..c04ef6e 100644
--- a/src/tint/writer/spirv/builder_accessor_expression_test.cc
+++ b/src/tint/writer/spirv/builder_accessor_expression_test.cc
@@ -770,7 +770,7 @@
 %8 = OpTypeInt 32 0
 %9 = OpConstant %8 3
 %5 = OpTypeArray %6 %9
-%10 = OpConstant %7 0
+%10 = OpConstantNull %7
 %11 = OpConstant %7 0.5
 %12 = OpConstantComposite %6 %10 %11
 %13 = OpConstant %7 -0.5
@@ -813,7 +813,7 @@
 %8 = OpTypeInt 32 0
 %9 = OpConstant %8 3
 %5 = OpTypeArray %6 %9
-%10 = OpConstant %7 0
+%10 = OpConstantNull %7
 %11 = OpConstant %7 0.5
 %12 = OpConstantComposite %6 %10 %11
 %13 = OpConstant %7 -0.5
@@ -850,7 +850,7 @@
 
     EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeFloat 32
 %1 = OpTypeVector %2 2
-%3 = OpConstant %2 0
+%3 = OpConstantNull %2
 %4 = OpConstant %2 0.5
 %5 = OpConstantComposite %1 %3 %4
 %6 = OpTypeInt 32 0
@@ -882,7 +882,7 @@
 
     EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeFloat 32
 %1 = OpTypeVector %2 2
-%3 = OpConstant %2 0
+%3 = OpConstantNull %2
 %4 = OpConstant %2 0.5
 %5 = OpConstantComposite %1 %3 %4
 %8 = OpTypeInt 32 1
diff --git a/src/tint/writer/spirv/builder_binary_expression_test.cc b/src/tint/writer/spirv/builder_binary_expression_test.cc
index abaee2e..608cd1e 100644
--- a/src/tint/writer/spirv/builder_binary_expression_test.cc
+++ b/src/tint/writer/spirv/builder_binary_expression_test.cc
@@ -287,7 +287,7 @@
     EXPECT_EQ(b.GenerateBinaryExpression(expr), 7u) << b.error();
     EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeBool
 %1 = OpTypeVector %2 3
-%3 = OpConstantFalse %2
+%3 = OpConstantNull %2
 %4 = OpConstantTrue %2
 %5 = OpConstantComposite %1 %3 %4 %3
 %6 = OpConstantComposite %1 %4 %3 %4
diff --git a/src/tint/writer/spirv/builder_builtin_texture_test.cc b/src/tint/writer/spirv/builder_builtin_texture_test.cc
index b4abfcf..ea81211 100644
--- a/src/tint/writer/spirv/builder_builtin_texture_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_texture_test.cc
@@ -2683,7 +2683,7 @@
 %26 = OpConstantComposite %14 %23 %24 %25
 %28 = OpTypeInt 32 1
 %27 = OpTypeVector %28 3
-%29 = OpConstant %28 0
+%29 = OpConstantNull %28
 %30 = OpConstant %28 1
 %31 = OpConstant %28 2
 %32 = OpConstantComposite %27 %29 %30 %31
diff --git a/src/tint/writer/spirv/builder_constructor_expression_test.cc b/src/tint/writer/spirv/builder_constructor_expression_test.cc
index d1fba8f..09a3f0d 100644
--- a/src/tint/writer/spirv/builder_constructor_expression_test.cc
+++ b/src/tint/writer/spirv/builder_constructor_expression_test.cc
@@ -439,7 +439,7 @@
     EXPECT_EQ(DumpInstructions(b.types()), R"(%2 = OpTypeBool
 %1 = OpTypeVector %2 3
 %3 = OpConstantTrue %2
-%4 = OpConstantFalse %2
+%4 = OpConstantNull %2
 %5 = OpConstantComposite %1 %3 %4 %3
 )");
     EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()), R"()");
diff --git a/test/tint/bug/dawn/947.wgsl.expected.spvasm b/test/tint/bug/dawn/947.wgsl.expected.spvasm
index 8e5c56c..636dbca 100644
--- a/test/tint/bug/dawn/947.wgsl.expected.spvasm
+++ b/test/tint/bug/dawn/947.wgsl.expected.spvasm
@@ -13,10 +13,10 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 139
+; Bound: 138
 ; Schema: 0
                OpCapability Shader
-        %118 = OpExtInstImport "GLSL.std.450"
+        %117 = OpExtInstImport "GLSL.std.450"
                OpMemoryModel Logical GLSL450
                OpEntryPoint Vertex %vs_main "vs_main" %VertexIndex_1 %texcoords_1 %position_1 %vertex_point_size
                OpEntryPoint Fragment %fs_main "fs_main" %texcoord_1 %value
@@ -99,136 +99,135 @@
      %uint_3 = OpConstant %uint 3
 %_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
  %float_n0_5 = OpConstant %float -0.5
-    %float_0 = OpConstant %float 0
-         %37 = OpConstantComposite %v2float %float_n0_5 %float_0
+         %36 = OpConstantComposite %v2float %float_n0_5 %15
   %float_1_5 = OpConstant %float 1.5
-         %39 = OpConstantComposite %v2float %float_1_5 %float_0
+         %38 = OpConstantComposite %v2float %float_1_5 %15
   %float_0_5 = OpConstant %float 0.5
     %float_2 = OpConstant %float 2
-         %42 = OpConstantComposite %v2float %float_0_5 %float_2
-         %43 = OpConstantComposite %_arr_v2float_uint_3 %37 %39 %42
+         %41 = OpConstantComposite %v2float %float_0_5 %float_2
+         %42 = OpConstantComposite %_arr_v2float_uint_3 %36 %38 %41
 %_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
-         %46 = OpConstantNull %_arr_v2float_uint_3
+         %45 = OpConstantNull %_arr_v2float_uint_3
 %_ptr_Function_VertexOutputs = OpTypePointer Function %VertexOutputs
-         %49 = OpConstantNull %VertexOutputs
+         %48 = OpConstantNull %VertexOutputs
      %uint_1 = OpConstant %uint 1
 %_ptr_Function_v4float = OpTypePointer Function %v4float
 %_ptr_Function_v2float = OpTypePointer Function %v2float
     %float_1 = OpConstant %float 1
-         %58 = OpConstantComposite %v2float %float_1 %float_1
+         %57 = OpConstantComposite %v2float %float_1 %float_1
      %uint_0 = OpConstant %uint 0
 %_ptr_Uniform_float = OpTypePointer Uniform %float
        %bool = OpTypeBool
 %_ptr_Function_bool = OpTypePointer Function %bool
-         %71 = OpConstantNull %bool
+         %70 = OpConstantNull %bool
 %_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
    %float_n1 = OpConstant %float -1
-         %87 = OpConstantComposite %v2float %float_1 %float_n1
-         %89 = OpConstantComposite %v2float %float_0 %float_1
+         %86 = OpConstantComposite %v2float %float_1 %float_n1
+         %88 = OpConstantComposite %v2float %15 %float_1
        %void = OpTypeVoid
-        %103 = OpTypeFunction %void
-        %113 = OpTypeFunction %v4float %v2float
+        %102 = OpTypeFunction %void
+        %112 = OpTypeFunction %v4float %v2float
      %v2bool = OpTypeVector %bool 2
-        %131 = OpTypeSampledImage %27
+        %130 = OpTypeSampledImage %27
 %vs_main_inner = OpFunction %VertexOutputs None %28
 %VertexIndex = OpFunctionParameter %uint
          %32 = OpLabel
-   %texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %46
-     %output = OpVariable %_ptr_Function_VertexOutputs Function %49
-      %flipY = OpVariable %_ptr_Function_bool Function %71
-               OpStore %texcoord %43
-         %52 = OpAccessChain %_ptr_Function_v4float %output %uint_1
-         %54 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
-         %55 = OpLoad %v2float %54
-         %56 = OpVectorTimesScalar %v2float %55 %float_2
-         %59 = OpFSub %v2float %56 %58
-         %60 = OpCompositeExtract %float %59 0
-         %61 = OpCompositeExtract %float %59 1
-         %62 = OpCompositeConstruct %v4float %60 %61 %15 %float_1
-               OpStore %52 %62
-         %65 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0 %uint_1
-         %66 = OpLoad %float %65
-         %67 = OpFOrdLessThan %bool %66 %15
-               OpStore %flipY %67
-         %72 = OpLoad %bool %flipY
-               OpSelectionMerge %73 None
-               OpBranchConditional %72 %74 %75
-         %74 = OpLabel
-         %76 = OpAccessChain %_ptr_Function_v2float %output %uint_0
-         %77 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
-         %78 = OpLoad %v2float %77
-         %80 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
-         %81 = OpLoad %v2float %80
-         %82 = OpFMul %v2float %78 %81
-         %83 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
-         %84 = OpLoad %v2float %83
-         %85 = OpFAdd %v2float %82 %84
-         %88 = OpFMul %v2float %85 %87
-         %90 = OpFAdd %v2float %88 %89
-               OpStore %76 %90
-               OpBranch %73
-         %75 = OpLabel
-         %91 = OpAccessChain %_ptr_Function_v2float %output %uint_0
-         %92 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
-         %93 = OpLoad %v2float %92
-         %94 = OpFMul %v2float %93 %87
-         %95 = OpFAdd %v2float %94 %89
-         %96 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
-         %97 = OpLoad %v2float %96
-         %98 = OpFMul %v2float %95 %97
-         %99 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
-        %100 = OpLoad %v2float %99
-        %101 = OpFAdd %v2float %98 %100
-               OpStore %91 %101
-               OpBranch %73
+   %texcoord = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %45
+     %output = OpVariable %_ptr_Function_VertexOutputs Function %48
+      %flipY = OpVariable %_ptr_Function_bool Function %70
+               OpStore %texcoord %42
+         %51 = OpAccessChain %_ptr_Function_v4float %output %uint_1
+         %53 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
+         %54 = OpLoad %v2float %53
+         %55 = OpVectorTimesScalar %v2float %54 %float_2
+         %58 = OpFSub %v2float %55 %57
+         %59 = OpCompositeExtract %float %58 0
+         %60 = OpCompositeExtract %float %58 1
+         %61 = OpCompositeConstruct %v4float %59 %60 %15 %float_1
+               OpStore %51 %61
+         %64 = OpAccessChain %_ptr_Uniform_float %uniforms %uint_0 %uint_1
+         %65 = OpLoad %float %64
+         %66 = OpFOrdLessThan %bool %65 %15
+               OpStore %flipY %66
+         %71 = OpLoad %bool %flipY
+               OpSelectionMerge %72 None
+               OpBranchConditional %71 %73 %74
          %73 = OpLabel
-        %102 = OpLoad %VertexOutputs %output
-               OpReturnValue %102
+         %75 = OpAccessChain %_ptr_Function_v2float %output %uint_0
+         %76 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
+         %77 = OpLoad %v2float %76
+         %79 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
+         %80 = OpLoad %v2float %79
+         %81 = OpFMul %v2float %77 %80
+         %82 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
+         %83 = OpLoad %v2float %82
+         %84 = OpFAdd %v2float %81 %83
+         %87 = OpFMul %v2float %84 %86
+         %89 = OpFAdd %v2float %87 %88
+               OpStore %75 %89
+               OpBranch %72
+         %74 = OpLabel
+         %90 = OpAccessChain %_ptr_Function_v2float %output %uint_0
+         %91 = OpAccessChain %_ptr_Function_v2float %texcoord %VertexIndex
+         %92 = OpLoad %v2float %91
+         %93 = OpFMul %v2float %92 %86
+         %94 = OpFAdd %v2float %93 %88
+         %95 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_0
+         %96 = OpLoad %v2float %95
+         %97 = OpFMul %v2float %94 %96
+         %98 = OpAccessChain %_ptr_Uniform_v2float %uniforms %uint_1
+         %99 = OpLoad %v2float %98
+        %100 = OpFAdd %v2float %97 %99
+               OpStore %90 %100
+               OpBranch %72
+         %72 = OpLabel
+        %101 = OpLoad %VertexOutputs %output
+               OpReturnValue %101
                OpFunctionEnd
-    %vs_main = OpFunction %void None %103
-        %106 = OpLabel
-        %108 = OpLoad %uint %VertexIndex_1
-        %107 = OpFunctionCall %VertexOutputs %vs_main_inner %108
-        %109 = OpCompositeExtract %v2float %107 0
-               OpStore %texcoords_1 %109
-        %110 = OpCompositeExtract %v4float %107 1
-               OpStore %position_1 %110
+    %vs_main = OpFunction %void None %102
+        %105 = OpLabel
+        %107 = OpLoad %uint %VertexIndex_1
+        %106 = OpFunctionCall %VertexOutputs %vs_main_inner %107
+        %108 = OpCompositeExtract %v2float %106 0
+               OpStore %texcoords_1 %108
+        %109 = OpCompositeExtract %v4float %106 1
+               OpStore %position_1 %109
                OpStore %vertex_point_size %float_1
                OpReturn
                OpFunctionEnd
-%tint_discard_func = OpFunction %void None %103
-        %112 = OpLabel
+%tint_discard_func = OpFunction %void None %102
+        %111 = OpLabel
                OpKill
                OpFunctionEnd
-%fs_main_inner = OpFunction %v4float None %113
+%fs_main_inner = OpFunction %v4float None %112
  %texcoord_0 = OpFunctionParameter %v2float
-        %116 = OpLabel
+        %115 = OpLabel
 %clampedTexcoord = OpVariable %_ptr_Function_v2float Function %8
    %srcColor = OpVariable %_ptr_Function_v4float Function %12
-        %117 = OpExtInst %v2float %118 NClamp %texcoord_0 %8 %58
-               OpStore %clampedTexcoord %117
-        %122 = OpLoad %v2float %clampedTexcoord
-        %123 = OpFOrdEqual %v2bool %122 %texcoord_0
-        %121 = OpAll %bool %123
-        %120 = OpLogicalNot %bool %121
-               OpSelectionMerge %125 None
-               OpBranchConditional %120 %126 %125
-        %126 = OpLabel
-        %127 = OpFunctionCall %void %tint_discard_func
-               OpReturnValue %12
+        %116 = OpExtInst %v2float %117 NClamp %texcoord_0 %8 %57
+               OpStore %clampedTexcoord %116
+        %121 = OpLoad %v2float %clampedTexcoord
+        %122 = OpFOrdEqual %v2bool %121 %texcoord_0
+        %120 = OpAll %bool %122
+        %119 = OpLogicalNot %bool %120
+               OpSelectionMerge %124 None
+               OpBranchConditional %119 %125 %124
         %125 = OpLabel
-        %129 = OpLoad %24 %mySampler
-        %130 = OpLoad %27 %myTexture
-        %132 = OpSampledImage %131 %130 %129
-        %128 = OpImageSampleImplicitLod %v4float %132 %texcoord_0
-               OpStore %srcColor %128
-        %134 = OpLoad %v4float %srcColor
-               OpReturnValue %134
+        %126 = OpFunctionCall %void %tint_discard_func
+               OpReturnValue %12
+        %124 = OpLabel
+        %128 = OpLoad %24 %mySampler
+        %129 = OpLoad %27 %myTexture
+        %131 = OpSampledImage %130 %129 %128
+        %127 = OpImageSampleImplicitLod %v4float %131 %texcoord_0
+               OpStore %srcColor %127
+        %133 = OpLoad %v4float %srcColor
+               OpReturnValue %133
                OpFunctionEnd
-    %fs_main = OpFunction %void None %103
-        %136 = OpLabel
-        %138 = OpLoad %v2float %texcoord_1
-        %137 = OpFunctionCall %v4float %fs_main_inner %138
-               OpStore %value %137
+    %fs_main = OpFunction %void None %102
+        %135 = OpLabel
+        %137 = OpLoad %v2float %texcoord_1
+        %136 = OpFunctionCall %v4float %fs_main_inner %137
+               OpStore %value %136
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/bug/tint/1046.wgsl.expected.spvasm b/test/tint/bug/tint/1046.wgsl.expected.spvasm
index 781d830..591ded6 100644
--- a/test/tint/bug/tint/1046.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/1046.wgsl.expected.spvasm
@@ -126,8 +126,8 @@
 %_ptr_Function_FragmentOutput = OpTypePointer Function %FragmentOutput
          %89 = OpConstantNull %FragmentOutput
      %uint_0 = OpConstant %uint 0
-    %float_0 = OpConstant %float 0
-         %93 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
+         %92 = OpConstantNull %float
+         %93 = OpConstantComposite %v4float %float_1 %92 %92 %float_1
        %void = OpTypeVoid
          %96 = OpTypeFunction %void
    %getColor = OpFunction %v4float None %30
diff --git a/test/tint/bug/tint/1118.wgsl.expected.spvasm b/test/tint/bug/tint/1118.wgsl.expected.spvasm
index c4595fc..8266cfa 100644
--- a/test/tint/bug/tint/1118.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/1118.wgsl.expected.spvasm
@@ -13,7 +13,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 195
+; Bound: 194
 ; Schema: 0
                OpCapability Shader
          %71 = OpExtInstImport "GLSL.std.450"
@@ -133,13 +133,12 @@
      %uint_3 = OpConstant %uint 3
 %_ptr_Uniform_float = OpTypePointer Uniform %float
         %110 = OpConstantComposite %v3float %float_1 %float_1 %float_1
-    %float_0 = OpConstant %float 0
-        %112 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
+        %111 = OpConstantComposite %v4float %11 %11 %11 %float_1
 %_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
      %uint_1 = OpConstant %uint 1
    %main_out = OpTypeStruct %v4float
-        %175 = OpTypeFunction %main_out %float %float
-        %186 = OpConstantNull %main_out
+        %174 = OpTypeFunction %main_out %float %float
+        %185 = OpConstantNull %main_out
      %main_1 = OpFunction %void None %29
          %32 = OpLabel
 %viewDirectionW = OpVariable %_ptr_Function_v3float Function %35
@@ -222,103 +221,103 @@
                OpStore %glossiness %11
                OpStore %diffuseBase %35
                OpStore %shadow %float_1
-               OpStore %refractionColor %112
-               OpStore %reflectionColor %112
-        %114 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_3
-        %115 = OpLoad %v3float %114
-               OpStore %emissiveColor %115
-        %116 = OpLoad %v3float %diffuseBase
-        %117 = OpLoad %v3float %diffuseColor
-        %118 = OpLoad %v3float %emissiveColor
-        %120 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_1
-        %121 = OpLoad %v3float %120
-        %122 = OpLoad %v4float %baseColor
-        %124 = OpFMul %v3float %116 %117
-        %125 = OpFAdd %v3float %124 %118
-        %126 = OpFAdd %v3float %125 %121
-        %123 = OpExtInst %v3float %71 NClamp %126 %35 %110
-        %127 = OpCompositeExtract %float %122 0
-        %128 = OpCompositeExtract %float %122 1
-        %129 = OpCompositeExtract %float %122 2
-        %130 = OpCompositeConstruct %v3float %127 %128 %129
-        %131 = OpFMul %v3float %123 %130
-               OpStore %finalDiffuse %131
+               OpStore %refractionColor %111
+               OpStore %reflectionColor %111
+        %113 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_3
+        %114 = OpLoad %v3float %113
+               OpStore %emissiveColor %114
+        %115 = OpLoad %v3float %diffuseBase
+        %116 = OpLoad %v3float %diffuseColor
+        %117 = OpLoad %v3float %emissiveColor
+        %119 = OpAccessChain %_ptr_Uniform_v3float %x_49 %uint_1
+        %120 = OpLoad %v3float %119
+        %121 = OpLoad %v4float %baseColor
+        %123 = OpFMul %v3float %115 %116
+        %124 = OpFAdd %v3float %123 %117
+        %125 = OpFAdd %v3float %124 %120
+        %122 = OpExtInst %v3float %71 NClamp %125 %35 %110
+        %126 = OpCompositeExtract %float %121 0
+        %127 = OpCompositeExtract %float %121 1
+        %128 = OpCompositeExtract %float %121 2
+        %129 = OpCompositeConstruct %v3float %126 %127 %128
+        %130 = OpFMul %v3float %122 %129
+               OpStore %finalDiffuse %130
                OpStore %finalSpecular %35
-        %132 = OpLoad %v3float %finalDiffuse
-        %133 = OpLoad %v3float %baseAmbientColor
-        %134 = OpLoad %v3float %finalSpecular
-        %135 = OpLoad %v4float %reflectionColor
-        %136 = OpLoad %v4float %refractionColor
-        %137 = OpFMul %v3float %132 %133
-        %138 = OpFAdd %v3float %137 %134
-        %139 = OpCompositeExtract %float %135 0
-        %140 = OpCompositeExtract %float %135 1
-        %141 = OpCompositeExtract %float %135 2
-        %142 = OpCompositeConstruct %v3float %139 %140 %141
-        %143 = OpFAdd %v3float %138 %142
-        %144 = OpCompositeExtract %float %136 0
-        %145 = OpCompositeExtract %float %136 1
-        %146 = OpCompositeExtract %float %136 2
-        %147 = OpCompositeConstruct %v3float %144 %145 %146
-        %148 = OpFAdd %v3float %143 %147
-        %149 = OpLoad %float %alpha
-        %150 = OpCompositeExtract %float %148 0
-        %151 = OpCompositeExtract %float %148 1
-        %152 = OpCompositeExtract %float %148 2
-        %153 = OpCompositeConstruct %v4float %150 %151 %152 %149
-               OpStore %color %153
-        %154 = OpLoad %v4float %color
-        %156 = OpCompositeExtract %float %154 0
-        %157 = OpCompositeExtract %float %154 1
-        %158 = OpCompositeExtract %float %154 2
-        %159 = OpCompositeConstruct %v3float %156 %157 %158
-        %155 = OpExtInst %v3float %71 NMax %159 %35
-        %160 = OpLoad %v4float %color
-        %161 = OpCompositeExtract %float %155 0
-        %162 = OpCompositeExtract %float %155 1
-        %163 = OpCompositeExtract %float %155 2
-        %164 = OpCompositeExtract %float %160 3
-        %165 = OpCompositeConstruct %v4float %161 %162 %163 %164
-               OpStore %color %165
-        %166 = OpAccessChain %_ptr_Uniform_float %x_137 %uint_0
-        %167 = OpLoad %float %166
-        %168 = OpAccessChain %_ptr_Function_float %color %uint_3
-        %169 = OpLoad %float %168
-        %170 = OpAccessChain %_ptr_Function_float %color %uint_3
-        %171 = OpFMul %float %169 %167
-               OpStore %170 %171
-        %172 = OpLoad %v4float %color
-               OpStore %glFragColor %172
+        %131 = OpLoad %v3float %finalDiffuse
+        %132 = OpLoad %v3float %baseAmbientColor
+        %133 = OpLoad %v3float %finalSpecular
+        %134 = OpLoad %v4float %reflectionColor
+        %135 = OpLoad %v4float %refractionColor
+        %136 = OpFMul %v3float %131 %132
+        %137 = OpFAdd %v3float %136 %133
+        %138 = OpCompositeExtract %float %134 0
+        %139 = OpCompositeExtract %float %134 1
+        %140 = OpCompositeExtract %float %134 2
+        %141 = OpCompositeConstruct %v3float %138 %139 %140
+        %142 = OpFAdd %v3float %137 %141
+        %143 = OpCompositeExtract %float %135 0
+        %144 = OpCompositeExtract %float %135 1
+        %145 = OpCompositeExtract %float %135 2
+        %146 = OpCompositeConstruct %v3float %143 %144 %145
+        %147 = OpFAdd %v3float %142 %146
+        %148 = OpLoad %float %alpha
+        %149 = OpCompositeExtract %float %147 0
+        %150 = OpCompositeExtract %float %147 1
+        %151 = OpCompositeExtract %float %147 2
+        %152 = OpCompositeConstruct %v4float %149 %150 %151 %148
+               OpStore %color %152
+        %153 = OpLoad %v4float %color
+        %155 = OpCompositeExtract %float %153 0
+        %156 = OpCompositeExtract %float %153 1
+        %157 = OpCompositeExtract %float %153 2
+        %158 = OpCompositeConstruct %v3float %155 %156 %157
+        %154 = OpExtInst %v3float %71 NMax %158 %35
+        %159 = OpLoad %v4float %color
+        %160 = OpCompositeExtract %float %154 0
+        %161 = OpCompositeExtract %float %154 1
+        %162 = OpCompositeExtract %float %154 2
+        %163 = OpCompositeExtract %float %159 3
+        %164 = OpCompositeConstruct %v4float %160 %161 %162 %163
+               OpStore %color %164
+        %165 = OpAccessChain %_ptr_Uniform_float %x_137 %uint_0
+        %166 = OpLoad %float %165
+        %167 = OpAccessChain %_ptr_Function_float %color %uint_3
+        %168 = OpLoad %float %167
+        %169 = OpAccessChain %_ptr_Function_float %color %uint_3
+        %170 = OpFMul %float %168 %166
+               OpStore %169 %170
+        %171 = OpLoad %v4float %color
+               OpStore %glFragColor %171
                OpReturn
                OpFunctionEnd
 %tint_discard_func = OpFunction %void None %29
-        %174 = OpLabel
+        %173 = OpLabel
                OpKill
                OpFunctionEnd
- %main_inner = OpFunction %main_out None %175
+ %main_inner = OpFunction %main_out None %174
 %fClipDistance3_param = OpFunctionParameter %float
 %fClipDistance4_param = OpFunctionParameter %float
-        %180 = OpLabel
+        %179 = OpLabel
                OpStore %fClipDistance3 %fClipDistance3_param
                OpStore %fClipDistance4 %fClipDistance4_param
-        %181 = OpFunctionCall %void %main_1
-        %182 = OpLoad %bool %tint_discard
-               OpSelectionMerge %183 None
-               OpBranchConditional %182 %184 %183
-        %184 = OpLabel
-        %185 = OpFunctionCall %void %tint_discard_func
-               OpReturnValue %186
+        %180 = OpFunctionCall %void %main_1
+        %181 = OpLoad %bool %tint_discard
+               OpSelectionMerge %182 None
+               OpBranchConditional %181 %183 %182
         %183 = OpLabel
-        %187 = OpLoad %v4float %glFragColor
-        %188 = OpCompositeConstruct %main_out %187
-               OpReturnValue %188
+        %184 = OpFunctionCall %void %tint_discard_func
+               OpReturnValue %185
+        %182 = OpLabel
+        %186 = OpLoad %v4float %glFragColor
+        %187 = OpCompositeConstruct %main_out %186
+               OpReturnValue %187
                OpFunctionEnd
        %main = OpFunction %void None %29
-        %190 = OpLabel
-        %192 = OpLoad %float %fClipDistance3_param_1
-        %193 = OpLoad %float %fClipDistance4_param_1
-        %191 = OpFunctionCall %main_out %main_inner %192 %193
-        %194 = OpCompositeExtract %v4float %191 0
-               OpStore %glFragColor_1_1 %194
+        %189 = OpLabel
+        %191 = OpLoad %float %fClipDistance3_param_1
+        %192 = OpLoad %float %fClipDistance4_param_1
+        %190 = OpFunctionCall %main_out %main_inner %191 %192
+        %193 = OpCompositeExtract %v4float %190 0
+               OpStore %glFragColor_1_1 %193
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/bug/tint/824.wgsl.expected.spvasm b/test/tint/bug/tint/824.wgsl.expected.spvasm
index 1af29d5..9b7e663 100644
--- a/test/tint/bug/tint/824.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/824.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 71
+; Bound: 70
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -67,47 +67,46 @@
   %float_0_5 = OpConstant %float 0.5
     %float_1 = OpConstant %float 1
 %_arr_v4float_uint_4 = OpTypeArray %v4float %uint_4
-    %float_0 = OpConstant %float 0
-         %49 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
-         %50 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
-         %51 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1
-         %52 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
-         %53 = OpConstantComposite %_arr_v4float_uint_4 %49 %50 %51 %52
+         %48 = OpConstantComposite %v4float %float_1 %13 %13 %float_1
+         %49 = OpConstantComposite %v4float %13 %float_1 %13 %float_1
+         %50 = OpConstantComposite %v4float %13 %13 %float_1 %float_1
+         %51 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
+         %52 = OpConstantComposite %_arr_v4float_uint_4 %48 %49 %50 %51
 %_ptr_Function__arr_v4float_uint_4 = OpTypePointer Function %_arr_v4float_uint_4
-         %56 = OpConstantNull %_arr_v4float_uint_4
+         %55 = OpConstantNull %_arr_v4float_uint_4
      %uint_1 = OpConstant %uint 1
        %void = OpTypeVoid
-         %62 = OpTypeFunction %void
+         %61 = OpTypeFunction %void
  %main_inner = OpFunction %Output None %14
 %VertexIndex = OpFunctionParameter %uint
 %InstanceIndex = OpFunctionParameter %uint
          %19 = OpLabel
 %var_for_index = OpVariable %_ptr_Function__arr_v2float_uint_4 Function %34
      %output = OpVariable %_ptr_Function_Output Function %41
-%var_for_index_1 = OpVariable %_ptr_Function__arr_v4float_uint_4 Function %56
+%var_for_index_1 = OpVariable %_ptr_Function__arr_v4float_uint_4 Function %55
                OpStore %var_for_index %31
          %37 = OpAccessChain %_ptr_Function_float %var_for_index %InstanceIndex %uint_0
          %38 = OpLoad %float %37
          %43 = OpAccessChain %_ptr_Function_v4float %output %uint_0
          %46 = OpCompositeConstruct %v4float %float_0_5 %float_0_5 %38 %float_1
                OpStore %43 %46
-               OpStore %var_for_index_1 %53
-         %58 = OpAccessChain %_ptr_Function_v4float %output %uint_1
-         %59 = OpAccessChain %_ptr_Function_v4float %var_for_index_1 %InstanceIndex
-         %60 = OpLoad %v4float %59
-               OpStore %58 %60
-         %61 = OpLoad %Output %output
-               OpReturnValue %61
+               OpStore %var_for_index_1 %52
+         %57 = OpAccessChain %_ptr_Function_v4float %output %uint_1
+         %58 = OpAccessChain %_ptr_Function_v4float %var_for_index_1 %InstanceIndex
+         %59 = OpLoad %v4float %58
+               OpStore %57 %59
+         %60 = OpLoad %Output %output
+               OpReturnValue %60
                OpFunctionEnd
-       %main = OpFunction %void None %62
-         %65 = OpLabel
-         %67 = OpLoad %uint %VertexIndex_1
-         %68 = OpLoad %uint %InstanceIndex_1
-         %66 = OpFunctionCall %Output %main_inner %67 %68
-         %69 = OpCompositeExtract %v4float %66 0
-               OpStore %Position_1 %69
-         %70 = OpCompositeExtract %v4float %66 1
-               OpStore %color_1 %70
+       %main = OpFunction %void None %61
+         %64 = OpLabel
+         %66 = OpLoad %uint %VertexIndex_1
+         %67 = OpLoad %uint %InstanceIndex_1
+         %65 = OpFunctionCall %Output %main_inner %66 %67
+         %68 = OpCompositeExtract %v4float %65 0
+               OpStore %Position_1 %68
+         %69 = OpCompositeExtract %v4float %65 1
+               OpStore %color_1 %69
                OpStore %vertex_point_size %float_1
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/bug/tint/913.wgsl.expected.spvasm b/test/tint/bug/tint/913.wgsl.expected.spvasm
index 29d8c16..416999d 100644
--- a/test/tint/bug/tint/913.wgsl.expected.spvasm
+++ b/test/tint/bug/tint/913.wgsl.expected.spvasm
@@ -81,9 +81,9 @@
       %v2int = OpTypeVector %int 2
       %int_0 = OpConstant %int 0
     %v4float = OpTypeVector %float 4
-    %float_0 = OpConstant %float 0
+         %44 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-         %46 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
+         %46 = OpConstantComposite %v4float %44 %float_1 %44 %float_1
        %true = OpConstantTrue %bool
 %_ptr_Function_bool = OpTypePointer Function %bool
          %50 = OpConstantNull %bool
diff --git a/test/tint/expressions/binary/bit-and/vec3-vec3/bool.wgsl.expected.spvasm b/test/tint/expressions/binary/bit-and/vec3-vec3/bool.wgsl.expected.spvasm
index 6c965db..9e9e13a 100644
--- a/test/tint/expressions/binary/bit-and/vec3-vec3/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/bit-and/vec3-vec3/bool.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
        %bool = OpTypeBool
      %v3bool = OpTypeVector %bool 3
        %true = OpConstantTrue %bool
-      %false = OpConstantFalse %bool
-          %9 = OpConstantComposite %v3bool %true %true %false
-         %10 = OpConstantComposite %v3bool %true %false %true
+          %8 = OpConstantNull %bool
+          %9 = OpConstantComposite %v3bool %true %true %8
+         %10 = OpConstantComposite %v3bool %true %8 %true
           %f = OpFunction %void None %1
           %4 = OpLabel
          %11 = OpLogicalAnd %v3bool %9 %10
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.spvasm
index 517826d3..456e143 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/f32.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
       %float = OpTypeFloat 32
     %float_4 = OpConstant %float 4
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
+          %8 = OpConstantNull %float
     %float_2 = OpConstant %float 2
-         %10 = OpConstantComposite %v3float %float_0 %float_2 %float_0
+         %10 = OpConstantComposite %v3float %8 %float_2 %8
 %_ptr_Function_v3float = OpTypePointer Function %v3float
          %14 = OpConstantNull %v3float
           %f = OpFunction %void None %1
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
index 7cf0d58..7cfcbad 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
         %int = OpTypeInt 32 1
       %int_4 = OpConstant %int 4
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
+          %8 = OpConstantNull %int
       %int_2 = OpConstant %int 2
-         %10 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %10 = OpConstantComposite %v3int %8 %int_2 %8
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %14 = OpConstantNull %v3int
           %f = OpFunction %void None %1
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
index af6d858..81b4416 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
        %uint = OpTypeInt 32 0
      %uint_4 = OpConstant %uint 4
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
+          %8 = OpConstantNull %uint
      %uint_2 = OpConstant %uint 2
-         %10 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %10 = OpConstantComposite %v3uint %8 %uint_2 %8
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %14 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
index 5a8a4d8..bb66a5e 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
-    %float_0 = OpConstant %float 0
+         %11 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %13 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %13 = OpConstantComposite %v3float %11 %float_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpFDiv %v3float %10 %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
index 8176141..e986304 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
       %int_2 = OpConstant %int 2
       %int_3 = OpConstant %int 3
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
-      %int_0 = OpConstant %int 0
+         %11 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %13 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %13 = OpConstantComposite %v3int %11 %int_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpSDiv %v3int %10 %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
index 276d688..2536318 100644
--- a/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
      %uint_2 = OpConstant %uint 2
      %uint_3 = OpConstant %uint 3
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
-     %uint_0 = OpConstant %uint 0
+         %11 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %13 = OpConstantComposite %v3uint %11 %uint_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpUDiv %v3uint %10 %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.spvasm
index ac14577..e44ff2d 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/f32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 23
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,23 +17,22 @@
 %_ptr_Function_float = OpTypePointer Function %float
           %9 = OpConstantNull %float
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
     %float_2 = OpConstant %float 2
-         %13 = OpConstantComposite %v3float %float_0 %float_2 %float_0
+         %12 = OpConstantComposite %v3float %9 %float_2 %9
 %_ptr_Function_v3float = OpTypePointer Function %v3float
-         %16 = OpConstantNull %v3float
+         %15 = OpConstantNull %v3float
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_float Function %9
-          %b = OpVariable %_ptr_Function_v3float Function %16
-         %22 = OpVariable %_ptr_Function_v3float Function %16
+          %b = OpVariable %_ptr_Function_v3float Function %15
+         %21 = OpVariable %_ptr_Function_v3float Function %15
                OpStore %a %float_4
-               OpStore %b %13
-         %17 = OpLoad %float %a
+               OpStore %b %12
+         %16 = OpLoad %float %a
+         %17 = OpLoad %v3float %b
          %18 = OpLoad %v3float %b
-         %19 = OpLoad %v3float %b
-         %20 = OpFAdd %v3float %18 %19
-         %23 = OpCompositeConstruct %v3float %17 %17 %17
-         %21 = OpFDiv %v3float %23 %20
+         %19 = OpFAdd %v3float %17 %18
+         %22 = OpCompositeConstruct %v3float %16 %16 %16
+         %20 = OpFDiv %v3float %22 %19
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
index cfc7c26..ac46dbb 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 23
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,23 +17,22 @@
 %_ptr_Function_int = OpTypePointer Function %int
           %9 = OpConstantNull %int
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
       %int_2 = OpConstant %int 2
-         %13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %12 = OpConstantComposite %v3int %9 %int_2 %9
 %_ptr_Function_v3int = OpTypePointer Function %v3int
-         %16 = OpConstantNull %v3int
+         %15 = OpConstantNull %v3int
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_int Function %9
-          %b = OpVariable %_ptr_Function_v3int Function %16
-         %22 = OpVariable %_ptr_Function_v3int Function %16
+          %b = OpVariable %_ptr_Function_v3int Function %15
+         %21 = OpVariable %_ptr_Function_v3int Function %15
                OpStore %a %int_4
-               OpStore %b %13
-         %17 = OpLoad %int %a
+               OpStore %b %12
+         %16 = OpLoad %int %a
+         %17 = OpLoad %v3int %b
          %18 = OpLoad %v3int %b
-         %19 = OpLoad %v3int %b
-         %20 = OpIAdd %v3int %18 %19
-         %23 = OpCompositeConstruct %v3int %17 %17 %17
-         %21 = OpSDiv %v3int %23 %20
+         %19 = OpIAdd %v3int %17 %18
+         %22 = OpCompositeConstruct %v3int %16 %16 %16
+         %20 = OpSDiv %v3int %22 %19
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
index e0abc2f..d4fb717 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 23
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,23 +17,22 @@
 %_ptr_Function_uint = OpTypePointer Function %uint
           %9 = OpConstantNull %uint
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
      %uint_2 = OpConstant %uint 2
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %12 = OpConstantComposite %v3uint %9 %uint_2 %9
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
-         %16 = OpConstantNull %v3uint
+         %15 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_uint Function %9
-          %b = OpVariable %_ptr_Function_v3uint Function %16
-         %22 = OpVariable %_ptr_Function_v3uint Function %16
+          %b = OpVariable %_ptr_Function_v3uint Function %15
+         %21 = OpVariable %_ptr_Function_v3uint Function %15
                OpStore %a %uint_4
-               OpStore %b %13
-         %17 = OpLoad %uint %a
+               OpStore %b %12
+         %16 = OpLoad %uint %a
+         %17 = OpLoad %v3uint %b
          %18 = OpLoad %v3uint %b
-         %19 = OpLoad %v3uint %b
-         %20 = OpIAdd %v3uint %18 %19
-         %23 = OpCompositeConstruct %v3uint %17 %17 %17
-         %21 = OpUDiv %v3uint %23 %20
+         %19 = OpIAdd %v3uint %17 %18
+         %22 = OpCompositeConstruct %v3uint %16 %16 %16
+         %20 = OpUDiv %v3uint %22 %19
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
index eed89f7..f3ba492 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
          %13 = OpConstantNull %v3float
-    %float_0 = OpConstant %float 0
+         %14 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %16 = OpConstantComposite %v3float %14 %float_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3float Function %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
index 5552161..03b642c 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %13 = OpConstantNull %v3int
-      %int_0 = OpConstant %int 0
+         %14 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %16 = OpConstantComposite %v3int %14 %int_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3int Function %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
index 8f37304..9cde60a 100644
--- a/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %13 = OpConstantNull %v3uint
-     %uint_0 = OpConstant %uint 0
+         %14 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %16 = OpConstantComposite %v3uint %14 %uint_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3uint Function %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.spvasm
index a213c44..fc18a9e 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/f32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 22
+; Bound: 21
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,21 +17,20 @@
 %_ptr_Function_float = OpTypePointer Function %float
           %9 = OpConstantNull %float
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
     %float_2 = OpConstant %float 2
-         %13 = OpConstantComposite %v3float %float_0 %float_2 %float_0
+         %12 = OpConstantComposite %v3float %9 %float_2 %9
 %_ptr_Function_v3float = OpTypePointer Function %v3float
-         %16 = OpConstantNull %v3float
+         %15 = OpConstantNull %v3float
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_float Function %9
-          %b = OpVariable %_ptr_Function_v3float Function %16
-         %20 = OpVariable %_ptr_Function_v3float Function %16
+          %b = OpVariable %_ptr_Function_v3float Function %15
+         %19 = OpVariable %_ptr_Function_v3float Function %15
                OpStore %a %float_4
-               OpStore %b %13
-         %17 = OpLoad %float %a
-         %18 = OpLoad %v3float %b
-         %21 = OpCompositeConstruct %v3float %17 %17 %17
-         %19 = OpFDiv %v3float %21 %18
+               OpStore %b %12
+         %16 = OpLoad %float %a
+         %17 = OpLoad %v3float %b
+         %20 = OpCompositeConstruct %v3float %16 %16 %16
+         %18 = OpFDiv %v3float %20 %17
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
index 9164966..34cd2cf 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 22
+; Bound: 21
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,21 +17,20 @@
 %_ptr_Function_int = OpTypePointer Function %int
           %9 = OpConstantNull %int
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
       %int_2 = OpConstant %int 2
-         %13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %12 = OpConstantComposite %v3int %9 %int_2 %9
 %_ptr_Function_v3int = OpTypePointer Function %v3int
-         %16 = OpConstantNull %v3int
+         %15 = OpConstantNull %v3int
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_int Function %9
-          %b = OpVariable %_ptr_Function_v3int Function %16
-         %20 = OpVariable %_ptr_Function_v3int Function %16
+          %b = OpVariable %_ptr_Function_v3int Function %15
+         %19 = OpVariable %_ptr_Function_v3int Function %15
                OpStore %a %int_4
-               OpStore %b %13
-         %17 = OpLoad %int %a
-         %18 = OpLoad %v3int %b
-         %21 = OpCompositeConstruct %v3int %17 %17 %17
-         %19 = OpSDiv %v3int %21 %18
+               OpStore %b %12
+         %16 = OpLoad %int %a
+         %17 = OpLoad %v3int %b
+         %20 = OpCompositeConstruct %v3int %16 %16 %16
+         %18 = OpSDiv %v3int %20 %17
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
index ce88d36..9f6d5d5 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 22
+; Bound: 21
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,21 +17,20 @@
 %_ptr_Function_uint = OpTypePointer Function %uint
           %9 = OpConstantNull %uint
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
      %uint_2 = OpConstant %uint 2
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %12 = OpConstantComposite %v3uint %9 %uint_2 %9
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
-         %16 = OpConstantNull %v3uint
+         %15 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_uint Function %9
-          %b = OpVariable %_ptr_Function_v3uint Function %16
-         %20 = OpVariable %_ptr_Function_v3uint Function %16
+          %b = OpVariable %_ptr_Function_v3uint Function %15
+         %19 = OpVariable %_ptr_Function_v3uint Function %15
                OpStore %a %uint_4
-               OpStore %b %13
-         %17 = OpLoad %uint %a
-         %18 = OpLoad %v3uint %b
-         %21 = OpCompositeConstruct %v3uint %17 %17 %17
-         %19 = OpUDiv %v3uint %21 %18
+               OpStore %b %12
+         %16 = OpLoad %uint %a
+         %17 = OpLoad %v3uint %b
+         %20 = OpCompositeConstruct %v3uint %16 %16 %16
+         %18 = OpUDiv %v3uint %20 %17
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
index f5b1805..ade4c78 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
          %13 = OpConstantNull %v3float
-    %float_0 = OpConstant %float 0
+         %14 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %16 = OpConstantComposite %v3float %14 %float_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3float Function %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
index 5647910..575bfe6 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %13 = OpConstantNull %v3int
-      %int_0 = OpConstant %int 0
+         %14 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %16 = OpConstantComposite %v3int %14 %int_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3int Function %13
diff --git a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
index aba2a2b..0336127 100644
--- a/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/div_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %13 = OpConstantNull %v3uint
-     %uint_0 = OpConstant %uint 0
+         %14 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %16 = OpConstantComposite %v3uint %14 %uint_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3uint Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
index dc1cd05..65d27ce 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/i32.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
         %int = OpTypeInt 32 1
       %int_4 = OpConstant %int 4
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
+          %8 = OpConstantNull %int
       %int_2 = OpConstant %int 2
-         %10 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %10 = OpConstantComposite %v3int %8 %int_2 %8
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %14 = OpConstantNull %v3int
           %f = OpFunction %void None %1
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
index 019876b..03b0409 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/scalar-vec3/u32.wgsl.expected.spvasm
@@ -13,9 +13,9 @@
        %uint = OpTypeInt 32 0
      %uint_4 = OpConstant %uint 4
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
+          %8 = OpConstantNull %uint
      %uint_2 = OpConstant %uint 2
-         %10 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %10 = OpConstantComposite %v3uint %8 %uint_2 %8
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %14 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
index 6f5c427..cfb714d 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/f32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
-    %float_0 = OpConstant %float 0
+         %11 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %13 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %13 = OpConstantComposite %v3float %11 %float_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpFRem %v3float %10 %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
index 5205a19..64e929a 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/i32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
       %int_2 = OpConstant %int 2
       %int_3 = OpConstant %int 3
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
-      %int_0 = OpConstant %int 0
+         %11 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %13 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %13 = OpConstantComposite %v3int %11 %int_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpSMod %v3int %10 %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
index f1fa325..1dd5605 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_constant/vec3-vec3/u32.wgsl.expected.spvasm
@@ -16,9 +16,9 @@
      %uint_2 = OpConstant %uint 2
      %uint_3 = OpConstant %uint 3
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
-     %uint_0 = OpConstant %uint 0
+         %11 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %13 = OpConstantComposite %v3uint %11 %uint_5 %11
           %f = OpFunction %void None %1
           %4 = OpLabel
          %14 = OpUMod %v3uint %10 %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
index b293226..a4acd72 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/i32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 23
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,23 +17,22 @@
 %_ptr_Function_int = OpTypePointer Function %int
           %9 = OpConstantNull %int
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
       %int_2 = OpConstant %int 2
-         %13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %12 = OpConstantComposite %v3int %9 %int_2 %9
 %_ptr_Function_v3int = OpTypePointer Function %v3int
-         %16 = OpConstantNull %v3int
+         %15 = OpConstantNull %v3int
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_int Function %9
-          %b = OpVariable %_ptr_Function_v3int Function %16
-         %22 = OpVariable %_ptr_Function_v3int Function %16
+          %b = OpVariable %_ptr_Function_v3int Function %15
+         %21 = OpVariable %_ptr_Function_v3int Function %15
                OpStore %a %int_4
-               OpStore %b %13
-         %17 = OpLoad %int %a
+               OpStore %b %12
+         %16 = OpLoad %int %a
+         %17 = OpLoad %v3int %b
          %18 = OpLoad %v3int %b
-         %19 = OpLoad %v3int %b
-         %20 = OpIAdd %v3int %18 %19
-         %23 = OpCompositeConstruct %v3int %17 %17 %17
-         %21 = OpSMod %v3int %23 %20
+         %19 = OpIAdd %v3int %17 %18
+         %22 = OpCompositeConstruct %v3int %16 %16 %16
+         %20 = OpSMod %v3int %22 %19
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
index ee0be7a..296cc5c 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/scalar-vec3/u32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 24
+; Bound: 23
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,23 +17,22 @@
 %_ptr_Function_uint = OpTypePointer Function %uint
           %9 = OpConstantNull %uint
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
      %uint_2 = OpConstant %uint 2
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %12 = OpConstantComposite %v3uint %9 %uint_2 %9
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
-         %16 = OpConstantNull %v3uint
+         %15 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_uint Function %9
-          %b = OpVariable %_ptr_Function_v3uint Function %16
-         %22 = OpVariable %_ptr_Function_v3uint Function %16
+          %b = OpVariable %_ptr_Function_v3uint Function %15
+         %21 = OpVariable %_ptr_Function_v3uint Function %15
                OpStore %a %uint_4
-               OpStore %b %13
-         %17 = OpLoad %uint %a
+               OpStore %b %12
+         %16 = OpLoad %uint %a
+         %17 = OpLoad %v3uint %b
          %18 = OpLoad %v3uint %b
-         %19 = OpLoad %v3uint %b
-         %20 = OpIAdd %v3uint %18 %19
-         %23 = OpCompositeConstruct %v3uint %17 %17 %17
-         %21 = OpUMod %v3uint %23 %20
+         %19 = OpIAdd %v3uint %17 %18
+         %22 = OpCompositeConstruct %v3uint %16 %16 %16
+         %20 = OpUMod %v3uint %22 %19
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
index fb8ce28..f8ef6f3 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/f32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
          %13 = OpConstantNull %v3float
-    %float_0 = OpConstant %float 0
+         %14 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %16 = OpConstantComposite %v3float %14 %float_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3float Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
index b96d65a..0a116e0 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/i32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %13 = OpConstantNull %v3int
-      %int_0 = OpConstant %int 0
+         %14 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %16 = OpConstantComposite %v3int %14 %int_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3int Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
index c4b1f90..92c1718 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_expression/vec3-vec3/u32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %13 = OpConstantNull %v3uint
-     %uint_0 = OpConstant %uint 0
+         %14 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %16 = OpConstantComposite %v3uint %14 %uint_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3uint Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
index 1098fb2..4ceb097 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/i32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 22
+; Bound: 21
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,21 +17,20 @@
 %_ptr_Function_int = OpTypePointer Function %int
           %9 = OpConstantNull %int
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
       %int_2 = OpConstant %int 2
-         %13 = OpConstantComposite %v3int %int_0 %int_2 %int_0
+         %12 = OpConstantComposite %v3int %9 %int_2 %9
 %_ptr_Function_v3int = OpTypePointer Function %v3int
-         %16 = OpConstantNull %v3int
+         %15 = OpConstantNull %v3int
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_int Function %9
-          %b = OpVariable %_ptr_Function_v3int Function %16
-         %20 = OpVariable %_ptr_Function_v3int Function %16
+          %b = OpVariable %_ptr_Function_v3int Function %15
+         %19 = OpVariable %_ptr_Function_v3int Function %15
                OpStore %a %int_4
-               OpStore %b %13
-         %17 = OpLoad %int %a
-         %18 = OpLoad %v3int %b
-         %21 = OpCompositeConstruct %v3int %17 %17 %17
-         %19 = OpSMod %v3int %21 %18
+               OpStore %b %12
+         %16 = OpLoad %int %a
+         %17 = OpLoad %v3int %b
+         %20 = OpCompositeConstruct %v3int %16 %16 %16
+         %18 = OpSMod %v3int %20 %17
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
index 45bce24..3c1d47c 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/scalar-vec3/u32.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 22
+; Bound: 21
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -17,21 +17,20 @@
 %_ptr_Function_uint = OpTypePointer Function %uint
           %9 = OpConstantNull %uint
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
      %uint_2 = OpConstant %uint 2
-         %13 = OpConstantComposite %v3uint %uint_0 %uint_2 %uint_0
+         %12 = OpConstantComposite %v3uint %9 %uint_2 %9
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
-         %16 = OpConstantNull %v3uint
+         %15 = OpConstantNull %v3uint
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_uint Function %9
-          %b = OpVariable %_ptr_Function_v3uint Function %16
-         %20 = OpVariable %_ptr_Function_v3uint Function %16
+          %b = OpVariable %_ptr_Function_v3uint Function %15
+         %19 = OpVariable %_ptr_Function_v3uint Function %15
                OpStore %a %uint_4
-               OpStore %b %13
-         %17 = OpLoad %uint %a
-         %18 = OpLoad %v3uint %b
-         %21 = OpCompositeConstruct %v3uint %17 %17 %17
-         %19 = OpUMod %v3uint %21 %18
+               OpStore %b %12
+         %16 = OpLoad %uint %a
+         %17 = OpLoad %v3uint %b
+         %20 = OpCompositeConstruct %v3uint %16 %16 %16
+         %18 = OpUMod %v3uint %20 %17
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
index 1cdd95a..4dce153 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/f32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3float %float_1 %float_2 %float_3
 %_ptr_Function_v3float = OpTypePointer Function %v3float
          %13 = OpConstantNull %v3float
-    %float_0 = OpConstant %float 0
+         %14 = OpConstantNull %float
     %float_5 = OpConstant %float 5
-         %16 = OpConstantComposite %v3float %float_0 %float_5 %float_0
+         %16 = OpConstantComposite %v3float %14 %float_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3float Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
index 29c04a6..fe57bb5 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/i32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3int %int_1 %int_2 %int_3
 %_ptr_Function_v3int = OpTypePointer Function %v3int
          %13 = OpConstantNull %v3int
-      %int_0 = OpConstant %int 0
+         %14 = OpConstantNull %int
       %int_5 = OpConstant %int 5
-         %16 = OpConstantComposite %v3int %int_0 %int_5 %int_0
+         %16 = OpConstantComposite %v3int %14 %int_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3int Function %13
diff --git a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
index 3fbdc22..2c87495 100644
--- a/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/binary/mod_by_zero/by_identifier/vec3-vec3/u32.wgsl.expected.spvasm
@@ -20,9 +20,9 @@
          %10 = OpConstantComposite %v3uint %uint_1 %uint_2 %uint_3
 %_ptr_Function_v3uint = OpTypePointer Function %v3uint
          %13 = OpConstantNull %v3uint
-     %uint_0 = OpConstant %uint 0
+         %14 = OpConstantNull %uint
      %uint_5 = OpConstant %uint 5
-         %16 = OpConstantComposite %v3uint %uint_0 %uint_5 %uint_0
+         %16 = OpConstantComposite %v3uint %14 %uint_5 %14
           %f = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_v3uint Function %13
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm
index 16c6345..126308b 100644
--- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat2v2float = OpTypeMatrix %v2float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm
index d99921c..c4ce1bd 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat2v3float = OpTypeMatrix %v3float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm
index 57110c5..39a2a21 100644
--- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat2v4float = OpTypeMatrix %v4float 2
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm
index ffaa504..ba16661 100644
--- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat3v2float = OpTypeMatrix %v2float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm
index 8ec1da4..16290c0 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat3v3float = OpTypeMatrix %v3float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm
index b6ff57d..9740914 100644
--- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat3v4float = OpTypeMatrix %v4float 3
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm
index c6a6c63..ef14ca0 100644
--- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,9 +12,9 @@
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
 %mat4v2float = OpTypeMatrix %v2float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %6 = OpConstantComposite %v2float %float_0 %float_1
+          %6 = OpConstantComposite %v2float %4 %float_1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
           %9 = OpConstantComposite %v2float %float_2 %float_3
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm
index d99b492..cf9f4f3 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,10 +12,10 @@
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
 %mat4v3float = OpTypeMatrix %v3float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %7 = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %7 = OpConstantComposite %v3float %4 %float_1 %float_2
     %float_3 = OpConstant %float 3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm
index 84a8f89..7006fcd 100644
--- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm
@@ -12,11 +12,11 @@
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
 %mat4v4float = OpTypeMatrix %v4float 4
-    %float_0 = OpConstant %float 0
+          %4 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %8 = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %8 = OpConstantComposite %v4float %4 %float_1 %float_2 %float_3
     %float_4 = OpConstant %float 4
     %float_5 = OpConstant %float 5
     %float_6 = OpConstant %float 6
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm
index b982dbd..a686023 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v2bool = OpTypeVector %bool 2
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v2bool %false %true
+          %v = OpConstantComposite %v2bool %3 %true
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm
index d12bbf2..8e31d05 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %v = OpConstantComposite %v2float %float_0 %float_1
+          %v = OpConstantComposite %v2float %3 %float_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm
index 2e021f9..1c6792f 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
-          %v = OpConstantComposite %v2int %int_0 %int_1
+          %v = OpConstantComposite %v2int %3 %int_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm
index 8c3ad8f..7f95ffd 100644
--- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v2uint = OpTypeVector %uint 2
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
-          %v = OpConstantComposite %v2uint %uint_0 %uint_1
+          %v = OpConstantComposite %v2uint %3 %uint_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm
index d12bbf2..8e31d05 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %v = OpConstantComposite %v2float %float_0 %float_1
+          %v = OpConstantComposite %v2float %3 %float_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm
index 2e021f9..1c6792f 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
-          %v = OpConstantComposite %v2int %int_0 %int_1
+          %v = OpConstantComposite %v2int %3 %int_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm
index b982dbd..a686023 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v2bool = OpTypeVector %bool 2
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v2bool %false %true
+          %v = OpConstantComposite %v2bool %3 %true
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm
index d12bbf2..8e31d05 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v2float = OpTypeVector %float 2
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
-          %v = OpConstantComposite %v2float %float_0 %float_1
+          %v = OpConstantComposite %v2float %3 %float_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm
index 2e021f9..1c6792f 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
-          %v = OpConstantComposite %v2int %int_0 %int_1
+          %v = OpConstantComposite %v2int %3 %int_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm
index 8c3ad8f..7f95ffd 100644
--- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v2uint = OpTypeVector %uint 2
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
-          %v = OpConstantComposite %v2uint %uint_0 %uint_1
+          %v = OpConstantComposite %v2uint %3 %uint_1
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm
index b712760..4abfaa6 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v3bool = OpTypeVector %bool 3
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v3bool %false %true %false
+          %v = OpConstantComposite %v3bool %3 %true %3
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm
index 62e8bc3..5dde9d6 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %v = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %v = OpConstantComposite %v3float %3 %float_1 %float_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm
index fe0276e..20bcaa8 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
-          %v = OpConstantComposite %v3int %int_0 %int_1 %int_2
+          %v = OpConstantComposite %v3int %3 %int_1 %int_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm
index e4b4797..74c3ed3 100644
--- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
      %uint_2 = OpConstant %uint 2
-          %v = OpConstantComposite %v3uint %uint_0 %uint_1 %uint_2
+          %v = OpConstantComposite %v3uint %3 %uint_1 %uint_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm
index 62e8bc3..5dde9d6 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %v = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %v = OpConstantComposite %v3float %3 %float_1 %float_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm
index fe0276e..20bcaa8 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
-          %v = OpConstantComposite %v3int %int_0 %int_1 %int_2
+          %v = OpConstantComposite %v3int %3 %int_1 %int_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm
index b712760..4abfaa6 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v3bool = OpTypeVector %bool 3
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v3bool %false %true %false
+          %v = OpConstantComposite %v3bool %3 %true %3
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm
index 62e8bc3..5dde9d6 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v3float = OpTypeVector %float 3
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
-          %v = OpConstantComposite %v3float %float_0 %float_1 %float_2
+          %v = OpConstantComposite %v3float %3 %float_1 %float_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm
index fe0276e..20bcaa8 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
-          %v = OpConstantComposite %v3int %int_0 %int_1 %int_2
+          %v = OpConstantComposite %v3int %3 %int_1 %int_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm
index e4b4797..74c3ed3 100644
--- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm
@@ -11,10 +11,10 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v3uint = OpTypeVector %uint 3
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
      %uint_2 = OpConstant %uint 2
-          %v = OpConstantComposite %v3uint %uint_0 %uint_1 %uint_2
+          %v = OpConstantComposite %v3uint %3 %uint_1 %uint_2
        %void = OpTypeVoid
           %7 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %7
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm
index 1ecbff1..e5ad229 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v4bool = OpTypeVector %bool 4
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v4bool %false %true %false %true
+          %v = OpConstantComposite %v4bool %3 %true %3 %true
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm
index 783aa84..a45788b 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %v = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm
index 88201cc..8518f99 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v4int = OpTypeVector %int 4
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
       %int_3 = OpConstant %int 3
-          %v = OpConstantComposite %v4int %int_0 %int_1 %int_2 %int_3
+          %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm
index 23b7d44..2424ee0 100644
--- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v4uint = OpTypeVector %uint 4
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
      %uint_2 = OpConstant %uint 2
      %uint_3 = OpConstant %uint 3
-          %v = OpConstantComposite %v4uint %uint_0 %uint_1 %uint_2 %uint_3
+          %v = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm
index 783aa84..a45788b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %v = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm
index 88201cc..8518f99 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v4int = OpTypeVector %int 4
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
       %int_3 = OpConstant %int 3
-          %v = OpConstantComposite %v4int %int_0 %int_1 %int_2 %int_3
+          %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm
index 1ecbff1..e5ad229 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm
@@ -11,9 +11,9 @@
                OpName %unused_entry_point "unused_entry_point"
        %bool = OpTypeBool
      %v4bool = OpTypeVector %bool 4
-      %false = OpConstantFalse %bool
+          %3 = OpConstantNull %bool
        %true = OpConstantTrue %bool
-          %v = OpConstantComposite %v4bool %false %true %false %true
+          %v = OpConstantComposite %v4bool %3 %true %3 %true
        %void = OpTypeVoid
           %6 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %6
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm
index 783aa84..a45788b 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
       %float = OpTypeFloat 32
     %v4float = OpTypeVector %float 4
-    %float_0 = OpConstant %float 0
+          %3 = OpConstantNull %float
     %float_1 = OpConstant %float 1
     %float_2 = OpConstant %float 2
     %float_3 = OpConstant %float 3
-          %v = OpConstantComposite %v4float %float_0 %float_1 %float_2 %float_3
+          %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm
index 88201cc..8518f99 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
         %int = OpTypeInt 32 1
       %v4int = OpTypeVector %int 4
-      %int_0 = OpConstant %int 0
+          %3 = OpConstantNull %int
       %int_1 = OpConstant %int 1
       %int_2 = OpConstant %int 2
       %int_3 = OpConstant %int 3
-          %v = OpConstantComposite %v4int %int_0 %int_1 %int_2 %int_3
+          %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm
index 23b7d44..2424ee0 100644
--- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm
+++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm
@@ -11,11 +11,11 @@
                OpName %unused_entry_point "unused_entry_point"
        %uint = OpTypeInt 32 0
      %v4uint = OpTypeVector %uint 4
-     %uint_0 = OpConstant %uint 0
+          %3 = OpConstantNull %uint
      %uint_1 = OpConstant %uint 1
      %uint_2 = OpConstant %uint 2
      %uint_3 = OpConstant %uint 3
-          %v = OpConstantComposite %v4uint %uint_0 %uint_1 %uint_2 %uint_3
+          %v = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3
        %void = OpTypeVoid
           %8 = OpTypeFunction %void
 %unused_entry_point = OpFunction %void None %8
diff --git a/test/tint/samples/triangle.wgsl.expected.spvasm b/test/tint/samples/triangle.wgsl.expected.spvasm
index e72e5aa..63b1751 100644
--- a/test/tint/samples/triangle.wgsl.expected.spvasm
+++ b/test/tint/samples/triangle.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 50
+; Bound: 49
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -39,49 +39,48 @@
     %v2float = OpTypeVector %float 2
      %uint_3 = OpConstant %uint 3
 %_arr_v2float_uint_3 = OpTypeArray %v2float %uint_3
-    %float_0 = OpConstant %float 0
   %float_0_5 = OpConstant %float 0.5
-         %18 = OpConstantComposite %v2float %float_0 %float_0_5
+         %17 = OpConstantComposite %v2float %11 %float_0_5
  %float_n0_5 = OpConstant %float -0.5
-         %20 = OpConstantComposite %v2float %float_n0_5 %float_n0_5
-         %21 = OpConstantComposite %v2float %float_0_5 %float_n0_5
-        %pos = OpConstantComposite %_arr_v2float_uint_3 %18 %20 %21
-         %23 = OpTypeFunction %v4float %uint
+         %19 = OpConstantComposite %v2float %float_n0_5 %float_n0_5
+         %20 = OpConstantComposite %v2float %float_0_5 %float_n0_5
+        %pos = OpConstantComposite %_arr_v2float_uint_3 %17 %19 %20
+         %22 = OpTypeFunction %v4float %uint
 %_ptr_Function__arr_v2float_uint_3 = OpTypePointer Function %_arr_v2float_uint_3
-         %29 = OpConstantNull %_arr_v2float_uint_3
+         %28 = OpConstantNull %_arr_v2float_uint_3
 %_ptr_Function_v2float = OpTypePointer Function %v2float
     %float_1 = OpConstant %float 1
        %void = OpTypeVoid
-         %37 = OpTypeFunction %void
-         %43 = OpTypeFunction %v4float
-         %46 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
-%vtx_main_inner = OpFunction %v4float None %23
+         %36 = OpTypeFunction %void
+         %42 = OpTypeFunction %v4float
+         %45 = OpConstantComposite %v4float %float_1 %11 %11 %float_1
+%vtx_main_inner = OpFunction %v4float None %22
 %VertexIndex = OpFunctionParameter %uint
-         %26 = OpLabel
-%var_for_index = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %29
+         %25 = OpLabel
+%var_for_index = OpVariable %_ptr_Function__arr_v2float_uint_3 Function %28
                OpStore %var_for_index %pos
-         %31 = OpAccessChain %_ptr_Function_v2float %var_for_index %VertexIndex
-         %32 = OpLoad %v2float %31
-         %33 = OpCompositeExtract %float %32 0
-         %34 = OpCompositeExtract %float %32 1
-         %36 = OpCompositeConstruct %v4float %33 %34 %11 %float_1
-               OpReturnValue %36
+         %30 = OpAccessChain %_ptr_Function_v2float %var_for_index %VertexIndex
+         %31 = OpLoad %v2float %30
+         %32 = OpCompositeExtract %float %31 0
+         %33 = OpCompositeExtract %float %31 1
+         %35 = OpCompositeConstruct %v4float %32 %33 %11 %float_1
+               OpReturnValue %35
                OpFunctionEnd
-   %vtx_main = OpFunction %void None %37
-         %40 = OpLabel
-         %42 = OpLoad %uint %VertexIndex_1
-         %41 = OpFunctionCall %v4float %vtx_main_inner %42
-               OpStore %value %41
+   %vtx_main = OpFunction %void None %36
+         %39 = OpLabel
+         %41 = OpLoad %uint %VertexIndex_1
+         %40 = OpFunctionCall %v4float %vtx_main_inner %41
+               OpStore %value %40
                OpStore %vertex_point_size %float_1
                OpReturn
                OpFunctionEnd
-%frag_main_inner = OpFunction %v4float None %43
-         %45 = OpLabel
-               OpReturnValue %46
+%frag_main_inner = OpFunction %v4float None %42
+         %44 = OpLabel
+               OpReturnValue %45
                OpFunctionEnd
-  %frag_main = OpFunction %void None %37
-         %48 = OpLabel
-         %49 = OpFunctionCall %v4float %frag_main_inner
-               OpStore %value_1 %49
+  %frag_main = OpFunction %void None %36
+         %47 = OpLabel
+         %48 = OpFunctionCall %v4float %frag_main_inner
+               OpStore %value_1 %48
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/types/function_scope_var_conversions.wgsl.expected.spvasm b/test/tint/types/function_scope_var_conversions.wgsl.expected.spvasm
index 5eee4df..4135223 100644
--- a/test/tint/types/function_scope_var_conversions.wgsl.expected.spvasm
+++ b/test/tint/types/function_scope_var_conversions.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 72
+; Bound: 71
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -70,10 +70,9 @@
          %61 = OpConstantNull %v3uint
          %63 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
      %v4bool = OpTypeVector %bool 4
-      %false = OpConstantFalse %bool
-         %68 = OpConstantComposite %v4bool %true %false %true %false
+         %67 = OpConstantComposite %v4bool %true %22 %true %22
 %_ptr_Function_v4bool = OpTypePointer Function %v4bool
-         %71 = OpConstantNull %v4bool
+         %70 = OpConstantNull %v4bool
 %constant_with_non_constant = OpFunction %void None %1
           %4 = OpLabel
           %a = OpVariable %_ptr_Function_float Function %6
@@ -106,7 +105,7 @@
  %v3u32_var2 = OpVariable %_ptr_Function_v3uint Function %61
  %v3u32_var3 = OpVariable %_ptr_Function_v3uint Function %61
 %v3bool_var4 = OpVariable %_ptr_Function_v3bool Function %45
-%v4bool_var5 = OpVariable %_ptr_Function_v4bool Function %71
+%v4bool_var5 = OpVariable %_ptr_Function_v4bool Function %70
                OpStore %bool_var1 %true
                OpStore %bool_var2 %true
                OpStore %bool_var3 %true
@@ -127,6 +126,6 @@
                OpStore %v3u32_var2 %58
                OpStore %v3u32_var3 %63
                OpStore %v3bool_var4 %42
-               OpStore %v4bool_var5 %68
+               OpStore %v4bool_var5 %67
                OpReturn
                OpFunctionEnd
diff --git a/test/tint/types/module_scope_var_conversions.wgsl.expected.spvasm b/test/tint/types/module_scope_var_conversions.wgsl.expected.spvasm
index beb15ff..2488e4e 100644
--- a/test/tint/types/module_scope_var_conversions.wgsl.expected.spvasm
+++ b/test/tint/types/module_scope_var_conversions.wgsl.expected.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.3
 ; Generator: Google Tint Compiler; 0
-; Bound: 54
+; Bound: 53
 ; Schema: 0
                OpCapability Shader
                OpMemoryModel Logical GLSL450
@@ -66,40 +66,39 @@
  %v3u32_var3 = OpVariable %_ptr_Private_v3uint Private %32
 %v3bool_var4 = OpVariable %_ptr_Private_v3bool Private %20
      %v4bool = OpTypeVector %bool 4
-      %false = OpConstantFalse %bool
-         %40 = OpConstantComposite %v4bool %true %false %true %false
+         %39 = OpConstantNull %bool
+         %40 = OpConstantComposite %v4bool %true %39 %true %39
 %_ptr_Private_v4bool = OpTypePointer Private %v4bool
 %v4bool_var5 = OpVariable %_ptr_Private_v4bool Private %40
        %void = OpTypeVoid
          %43 = OpTypeFunction %void
-         %47 = OpConstantNull %bool
-         %48 = OpConstantNull %int
-         %49 = OpConstantNull %uint
-         %50 = OpConstantNull %v3bool
-         %51 = OpConstantNull %v4bool
-         %52 = OpConstantNull %v3int
-         %53 = OpConstantNull %v3uint
+         %47 = OpConstantNull %int
+         %48 = OpConstantNull %uint
+         %49 = OpConstantNull %v3bool
+         %50 = OpConstantNull %v4bool
+         %51 = OpConstantNull %v3int
+         %52 = OpConstantNull %v3uint
        %main = OpFunction %void None %43
          %46 = OpLabel
-               OpStore %bool_var1 %47
-               OpStore %bool_var2 %47
-               OpStore %bool_var3 %47
-               OpStore %i32_var1 %48
-               OpStore %i32_var2 %48
-               OpStore %i32_var3 %48
-               OpStore %u32_var1 %49
-               OpStore %u32_var2 %49
-               OpStore %u32_var3 %49
-               OpStore %v3bool_var1 %50
-               OpStore %v3bool_var2 %50
-               OpStore %v3bool_var3 %50
-               OpStore %v3bool_var4 %50
-               OpStore %v4bool_var5 %51
-               OpStore %v3i32_var1 %52
-               OpStore %v3i32_var2 %52
-               OpStore %v3i32_var3 %52
-               OpStore %v3u32_var1 %53
-               OpStore %v3u32_var2 %53
-               OpStore %v3u32_var3 %53
+               OpStore %bool_var1 %39
+               OpStore %bool_var2 %39
+               OpStore %bool_var3 %39
+               OpStore %i32_var1 %47
+               OpStore %i32_var2 %47
+               OpStore %i32_var3 %47
+               OpStore %u32_var1 %48
+               OpStore %u32_var2 %48
+               OpStore %u32_var3 %48
+               OpStore %v3bool_var1 %49
+               OpStore %v3bool_var2 %49
+               OpStore %v3bool_var3 %49
+               OpStore %v3bool_var4 %49
+               OpStore %v4bool_var5 %50
+               OpStore %v3i32_var1 %51
+               OpStore %v3i32_var2 %51
+               OpStore %v3i32_var3 %51
+               OpStore %v3u32_var1 %52
+               OpStore %v3u32_var2 %52
+               OpStore %v3u32_var3 %52
                OpReturn
                OpFunctionEnd