From 08105461ce58be9442253b4f4e7e186a25a078fa Mon Sep 17 00:00:00 2001
From: teoxoy <28601907+teoxoy@users.noreply.github.com>
Date: Mon, 12 Jun 2023 17:02:27 +0200
Subject: [PATCH] omit non referenced expressions

---
 src/back/glsl/mod.rs                          |   2 -
 src/back/hlsl/writer.rs                       |   2 -
 src/back/msl/writer.rs                        |   2 -
 src/back/spv/block.rs                         |   9 +
 src/back/wgsl/writer.rs                       |   5 -
 src/valid/analyzer.rs                         |  14 +-
 tests/in/access.wgsl                          |  32 +-
 tests/in/array-in-ctor.wgsl                   |   2 +-
 tests/in/atomicOps.wgsl                       |  16 +-
 tests/in/globals.wgsl                         |  12 +-
 tests/in/operators.wgsl                       | 370 +++++-----
 tests/out/glsl/access.foo_vert.Vertex.glsl    |  30 +-
 .../glsl/array-in-ctor.cs_main.Compute.glsl   |   2 +-
 tests/out/glsl/atomicOps.cs_main.Compute.glsl |  16 +-
 tests/out/glsl/break-if.main.Compute.glsl     |   6 +-
 tests/out/glsl/do-while.main.Fragment.glsl    |   3 +-
 tests/out/glsl/globals.main.Compute.glsl      |  12 +-
 tests/out/glsl/operators.main.Compute.glsl    | 316 ++++-----
 tests/out/hlsl/access.hlsl                    |  30 +-
 tests/out/hlsl/array-in-ctor.hlsl             |   2 +-
 tests/out/hlsl/atomicOps.hlsl                 |  16 +-
 tests/out/hlsl/break-if.hlsl                  |   6 +-
 tests/out/hlsl/do-while.hlsl                  |   3 +-
 tests/out/hlsl/globals.hlsl                   |  12 +-
 tests/out/hlsl/operators.hlsl                 | 316 ++++-----
 tests/out/ir/access.ron                       |  21 +-
 tests/out/msl/access.msl                      |  30 +-
 tests/out/msl/array-in-ctor.msl               |   2 +-
 tests/out/msl/atomicOps.msl                   |  16 +-
 tests/out/msl/break-if.msl                    |   2 -
 tests/out/msl/do-while.msl                    |   1 -
 tests/out/msl/globals.msl                     |  12 +-
 tests/out/msl/operators.msl                   | 316 ++++-----
 tests/out/spv/access.spvasm                   | 325 +++++----
 tests/out/spv/binding-buffer-arrays.spvasm    |  85 ++-
 tests/out/spv/bounds-check-restrict.spvasm    | 177 +++--
 tests/out/spv/bounds-check-zero.spvasm        | 229 +++---
 tests/out/spv/globals.spvasm                  | 276 ++++----
 tests/out/spv/interface.compute.spvasm        |  61 +-
 tests/out/spv/operators.spvasm                | 658 +++++++++---------
 tests/out/wgsl/210-bevy-2d-shader-vert.wgsl   |   2 -
 tests/out/wgsl/210-bevy-shader-vert.wgsl      |   1 -
 tests/out/wgsl/246-collatz-comp.wgsl          |   3 -
 .../wgsl/800-out-of-bounds-panic-vert.wgsl    |   2 -
 .../wgsl/900-implicit-conversions-frag.wgsl   |   1 -
 tests/out/wgsl/access.wgsl                    |  30 +-
 tests/out/wgsl/array-in-ctor.wgsl             |   2 +-
 tests/out/wgsl/atomicOps.wgsl                 |  16 +-
 tests/out/wgsl/bevy-pbr-frag.wgsl             | 403 -----------
 tests/out/wgsl/bevy-pbr-vert.wgsl             |   1 -
 tests/out/wgsl/bits_glsl-frag.wgsl            |  58 --
 tests/out/wgsl/bool-select-frag.wgsl          |   5 -
 tests/out/wgsl/break-if.wgsl                  |   2 -
 tests/out/wgsl/buffer-frag.wgsl               |   5 -
 tests/out/wgsl/clamp-splat-vert.wgsl          |   1 -
 tests/out/wgsl/declarations-frag.wgsl         |   8 -
 tests/out/wgsl/do-while.wgsl                  |   1 -
 tests/out/wgsl/expressions-frag.wgsl          |  12 -
 tests/out/wgsl/fma-frag.wgsl                  |   1 -
 tests/out/wgsl/functions_call-frag.wgsl       |   5 -
 .../out/wgsl/global-constant-array-frag.wgsl  |   1 -
 tests/out/wgsl/globals.wgsl                   |  12 +-
 tests/out/wgsl/images-frag.wgsl               |  18 -
 tests/out/wgsl/math-functions-frag.wgsl       |  56 --
 tests/out/wgsl/operators.wgsl                 | 316 ++++-----
 tests/out/wgsl/sampler-functions-frag.wgsl    |   2 -
 tests/out/wgsl/samplers-frag.wgsl             | 245 -------
 tests/out/wgsl/vector-functions-frag.wgsl     |  55 --
 68 files changed, 1918 insertions(+), 2793 deletions(-)

diff --git a/src/back/glsl/mod.rs b/src/back/glsl/mod.rs
index ea13d87063..d5fc89bcaa 100644
--- a/src/back/glsl/mod.rs
+++ b/src/back/glsl/mod.rs
@@ -1803,8 +1803,6 @@ impl<'a, W: Write> Writer<'a, W> {
                         Some(self.namer.call(name))
                     } else if self.need_bake_expressions.contains(&handle) {
                         Some(format!("{}{}", back::BAKE_PREFIX, handle.index()))
-                    } else if info.ref_count == 0 {
-                        Some(self.namer.call(""))
                     } else {
                         None
                     };
diff --git a/src/back/hlsl/writer.rs b/src/back/hlsl/writer.rs
index 5547e94ceb..45c0a464ab 100644
--- a/src/back/hlsl/writer.rs
+++ b/src/back/hlsl/writer.rs
@@ -1336,8 +1336,6 @@ impl<'a, W: fmt::Write> super::Writer<'a, W> {
                         Some(self.namer.call(name))
                     } else if self.need_bake_expressions.contains(&handle) {
                         Some(format!("_expr{}", handle.index()))
-                    } else if info.ref_count == 0 {
-                        Some(self.namer.call(""))
                     } else {
                         None
                     };
diff --git a/src/back/msl/writer.rs b/src/back/msl/writer.rs
index 16a3ab888f..22a5f56b72 100644
--- a/src/back/msl/writer.rs
+++ b/src/back/msl/writer.rs
@@ -2581,8 +2581,6 @@ impl<W: Write> Writer<W> {
                             // Don't assume the names in `named_expressions` are unique,
                             // or even valid. Use the `Namer`.
                             Some(self.namer.call(name))
-                        } else if info.ref_count == 0 {
-                            Some(self.namer.call(""))
                         } else {
                             // If this expression is an index that we're going to first compare
                             // against a limit, and then actually use as an index, then we may
diff --git a/src/back/spv/block.rs b/src/back/spv/block.rs
index 1ba61ad398..fa95966552 100644
--- a/src/back/spv/block.rs
+++ b/src/back/spv/block.rs
@@ -220,6 +220,15 @@ impl<'w> BlockContext<'w> {
         expr_handle: Handle<crate::Expression>,
         block: &mut Block,
     ) -> Result<(), Error> {
+        let is_named_expression = self
+            .ir_function
+            .named_expressions
+            .contains_key(&expr_handle);
+
+        if self.fun_info[expr_handle].ref_count == 0 && !is_named_expression {
+            return Ok(());
+        }
+
         let result_type_id = self.get_expression_type_id(&self.fun_info[expr_handle].ty);
         let id = match self.ir_function.expressions[expr_handle] {
             crate::Expression::Access { base, index: _ } if self.is_intermediate(base) => {
diff --git a/src/back/wgsl/writer.rs b/src/back/wgsl/writer.rs
index 46393c643f..225df0b898 100644
--- a/src/back/wgsl/writer.rs
+++ b/src/back/wgsl/writer.rs
@@ -634,11 +634,6 @@ impl<W: Write> Writer<W> {
                         // Otherwise, we could accidentally write variable name instead of full expression.
                         // Also, we use sanitized names! It defense backend from generating variable with name from reserved keywords.
                         Some(self.namer.call(name))
-                    } else if info.ref_count == 0 {
-                        write!(self.out, "{level}_ = ")?;
-                        self.write_expr(module, handle, func_ctx)?;
-                        writeln!(self.out, ";")?;
-                        continue;
                     } else {
                         let expr = &func_ctx.expressions[handle];
                         let min_ref_count = expr.bake_ref_count();
diff --git a/src/valid/analyzer.rs b/src/valid/analyzer.rs
index 18d6ace2eb..8ce63eaf3a 100644
--- a/src/valid/analyzer.rs
+++ b/src/valid/analyzer.rs
@@ -675,12 +675,17 @@ impl FunctionInfo {
                 requirements: UniformityRequirements::empty(),
             },
             E::Math {
-                arg, arg1, arg2, ..
+                fun: _,
+                arg,
+                arg1,
+                arg2,
+                arg3,
             } => {
                 let arg1_nur = arg1.and_then(|h| self.add_ref(h));
                 let arg2_nur = arg2.and_then(|h| self.add_ref(h));
+                let arg3_nur = arg3.and_then(|h| self.add_ref(h));
                 Uniformity {
-                    non_uniform_result: self.add_ref(arg).or(arg1_nur).or(arg2_nur),
+                    non_uniform_result: self.add_ref(arg).or(arg1_nur).or(arg2_nur).or(arg3_nur),
                     requirements: UniformityRequirements::empty(),
                 }
             }
@@ -868,7 +873,7 @@ impl FunctionInfo {
                 S::Loop {
                     ref body,
                     ref continuing,
-                    break_if: _,
+                    break_if,
                 } => {
                     let body_uniformity =
                         self.process_block(body, other_functions, disruptor, expression_arena)?;
@@ -879,6 +884,9 @@ impl FunctionInfo {
                         continuing_disruptor,
                         expression_arena,
                     )?;
+                    if let Some(expr) = break_if {
+                        let _ = self.add_ref(expr);
+                    }
                     body_uniformity | continuing_uniformity
                 }
                 S::Return { value } => FunctionUniformity {
diff --git a/tests/in/access.wgsl b/tests/in/access.wgsl
index ed4988532d..c9097f913b 100644
--- a/tests/in/access.wgsl
+++ b/tests/in/access.wgsl
@@ -40,13 +40,13 @@ fn test_matrix_within_struct_accesses() {
     idx--;
 
 	// loads
-    _ = baz.m;
-    _ = baz.m[0];
-    _ = baz.m[idx];
-    _ = baz.m[0][1];
-    _ = baz.m[0][idx];
-    _ = baz.m[idx][1];
-    _ = baz.m[idx][idx];
+    let l0 = baz.m;
+    let l1 = baz.m[0];
+    let l2 = baz.m[idx];
+    let l3 = baz.m[0][1];
+    let l4 = baz.m[0][idx];
+    let l5 = baz.m[idx][1];
+    let l6 = baz.m[idx][idx];
 
     var t = Baz(mat3x2<f32>(vec2<f32>(1.0), vec2<f32>(2.0), vec2<f32>(3.0)));
 
@@ -75,14 +75,14 @@ fn test_matrix_within_array_within_struct_accesses() {
     idx--;
 
 	// loads
-    _ = nested_mat_cx2.am;
-    _ = nested_mat_cx2.am[0];
-    _ = nested_mat_cx2.am[0][0];
-    _ = nested_mat_cx2.am[0][idx];
-    _ = nested_mat_cx2.am[0][0][1];
-    _ = nested_mat_cx2.am[0][0][idx];
-    _ = nested_mat_cx2.am[0][idx][1];
-    _ = nested_mat_cx2.am[0][idx][idx];
+    let l0 = nested_mat_cx2.am;
+    let l1 = nested_mat_cx2.am[0];
+    let l2 = nested_mat_cx2.am[0][0];
+    let l3 = nested_mat_cx2.am[0][idx];
+    let l4 = nested_mat_cx2.am[0][0][1];
+    let l5 = nested_mat_cx2.am[0][0][idx];
+    let l6 = nested_mat_cx2.am[0][idx][1];
+    let l7 = nested_mat_cx2.am[0][idx][idx];
 
     var t = MatCx2InArray(array<mat4x2<f32>, 2>());
 
@@ -134,7 +134,7 @@ fn foo_vert(@builtin(vertex_index) vi: u32) -> @builtin(position) vec4<f32> {
 	c2[vi + 1u] = 42;
 	let value = c2[vi];
 
-	_ = test_arr_as_arg(array<array<f32, 10>, 5>());
+	test_arr_as_arg(array<array<f32, 10>, 5>());
 
 	return vec4<f32>(_matrix * vec4<f32>(vec4<i32>(value)), 2.0);
 }
diff --git a/tests/in/array-in-ctor.wgsl b/tests/in/array-in-ctor.wgsl
index a7ca66be61..9607826fdf 100644
--- a/tests/in/array-in-ctor.wgsl
+++ b/tests/in/array-in-ctor.wgsl
@@ -6,5 +6,5 @@ var<storage> ah: Ah;
 
 @compute @workgroup_size(1)
 fn cs_main() {
-    _ = ah;
+    let ah = ah;
 }
diff --git a/tests/in/atomicOps.wgsl b/tests/in/atomicOps.wgsl
index 111a9abbc8..c1dd6b6326 100644
--- a/tests/in/atomicOps.wgsl
+++ b/tests/in/atomicOps.wgsl
@@ -34,14 +34,14 @@ fn cs_main(@builtin(local_invocation_id) id: vec3<u32>) {
 
     workgroupBarrier();
 
-    atomicLoad(&storage_atomic_scalar);
-    atomicLoad(&storage_atomic_arr[1]);
-    atomicLoad(&storage_struct.atomic_scalar);
-    atomicLoad(&storage_struct.atomic_arr[1]);
-    atomicLoad(&workgroup_atomic_scalar);
-    atomicLoad(&workgroup_atomic_arr[1]);
-    atomicLoad(&workgroup_struct.atomic_scalar);
-    atomicLoad(&workgroup_struct.atomic_arr[1]);
+    let l0 = atomicLoad(&storage_atomic_scalar);
+    let l1 = atomicLoad(&storage_atomic_arr[1]);
+    let l2 = atomicLoad(&storage_struct.atomic_scalar);
+    let l3 = atomicLoad(&storage_struct.atomic_arr[1]);
+    let l4 = atomicLoad(&workgroup_atomic_scalar);
+    let l5 = atomicLoad(&workgroup_atomic_arr[1]);
+    let l6 = atomicLoad(&workgroup_struct.atomic_scalar);
+    let l7 = atomicLoad(&workgroup_struct.atomic_arr[1]);
 
     workgroupBarrier();
 
diff --git a/tests/in/globals.wgsl b/tests/in/globals.wgsl
index 8f687fd356..859ad369ed 100644
--- a/tests/in/globals.wgsl
+++ b/tests/in/globals.wgsl
@@ -45,17 +45,17 @@ fn test_msl_packed_vec3() {
     let data = alignment;
 
     // loads
-    _ = data.v3;
-    _ = data.v3.zx;
+    let l0 = data.v3;
+    let l1 = data.v3.zx;
     test_msl_packed_vec3_as_arg(data.v3);
 
     // matrix vector multiplication
-    _ = data.v3 * mat3x3<f32>();
-    _ = mat3x3<f32>() * data.v3;
+    let mvm0 = data.v3 * mat3x3<f32>();
+    let mvm1 = mat3x3<f32>() * data.v3;
 
     // scalar vector multiplication
-    _ = data.v3 * 2.0;
-    _ = 2.0 * data.v3;
+    let svm0 = data.v3 * 2.0;
+    let svm1 = 2.0 * data.v3;
 }
 
 @compute @workgroup_size(1)
diff --git a/tests/in/operators.wgsl b/tests/in/operators.wgsl
index eadafbdc11..365a039921 100644
--- a/tests/in/operators.wgsl
+++ b/tests/in/operators.wgsl
@@ -50,11 +50,11 @@ fn constructors() -> f32 {
     var foo: Foo;
     foo = Foo(vec4<f32>(1.0), 1);
 
-    let mat2comp = mat2x2<f32>(
+    let m0 = mat2x2<f32>(
         1.0, 0.0,
         0.0, 1.0,
     );
-    let mat4comp = mat4x4<f32>(
+    let m1 = mat4x4<f32>(
         1.0, 0.0, 0.0, 0.0,
         0.0, 1.0, 0.0, 0.0,
         0.0, 0.0, 1.0, 0.0,
@@ -62,219 +62,221 @@ fn constructors() -> f32 {
     );
 
     // zero value constructors
-    _ = bool();
-    _ = i32();
-    _ = u32();
-    _ = f32();
-    _ = vec2<u32>();
-    _ = mat2x2<f32>();
-    _ = array<Foo, 3>();
-    _ = Foo();
+    let zvc0 = bool();
+    let zvc1 = i32();
+    let zvc2 = u32();
+    let zvc3 = f32();
+    let zvc4 = vec2<u32>();
+    let zvc5 = mat2x2<f32>();
+    let zvc6 = array<Foo, 3>();
+    let zvc7 = Foo();
 
     // constructors that infer their type from their parameters
-    _ = vec2(0u);
-    _ = mat2x2(vec2(0.), vec2(0.));
-    _ = array(0, 1, 2, 3);
+    let cit0 = vec2(0u);
+    let cit1 = mat2x2(vec2(0.), vec2(0.));
+    let cit2 = array(0, 1, 2, 3);
 
     // identity constructors
-    _ = bool(bool());
-    _ = i32(i32());
-    _ = u32(u32());
-    _ = f32(f32());
-    _ = vec2<u32>(vec2<u32>());
-    _ = mat2x3<f32>(mat2x3<f32>());
-    _ = vec2(vec2<u32>());
-    _ = mat2x3(mat2x3<f32>());
+    let ic0 = bool(bool());
+    let ic1 = i32(i32());
+    let ic2 = u32(u32());
+    let ic3 = f32(f32());
+    let ic4 = vec2<u32>(vec2<u32>());
+    let ic5 = mat2x3<f32>(mat2x3<f32>());
+    let ic6 = vec2(vec2<u32>());
+    let ic7 = mat2x3(mat2x3<f32>());
 
     return foo.a.x;
 }
 
 fn logical() {
     // unary
-    _ = !true;
-    _ = !vec2(true);
+    let neg0 = !true;
+    let neg1 = !vec2(true);
 
     // binary
-    _ = true || false;
-    _ = true && false;
-    _ = true | false;
-    _ = vec3(true) | vec3(false);
-    _ = true & false;
-    _ = vec4(true) & vec4(false);
+    let or = true || false;
+    let and = true && false;
+    let bitwise_or0 = true | false;
+    let bitwise_or1 = vec3(true) | vec3(false);
+    let bitwise_and0 = true & false;
+    let bitwise_and1 = vec4(true) & vec4(false);
 }
 
 fn arithmetic() {
     // unary
-    _ = -1.0;
-    _ = -vec2(1);
-    _ = -vec2(1.0);
+    let neg0 = -1.0;
+    let neg1 = -vec2(1);
+    let neg2 = -vec2(1.0);
 
     // binary
     // Addition
-    _ = 2 + 1;
-    _ = 2u + 1u;
-    _ = 2.0 + 1.0;
-    _ = vec2(2) + vec2(1);
-    _ = vec3(2u) + vec3(1u);
-    _ = vec4(2.0) + vec4(1.0);
+    let add0 = 2 + 1;
+    let add1 = 2u + 1u;
+    let add2 = 2.0 + 1.0;
+    let add3 = vec2(2) + vec2(1);
+    let add4 = vec3(2u) + vec3(1u);
+    let add5 = vec4(2.0) + vec4(1.0);
 
     // Subtraction
-    _ = 2 - 1;
-    _ = 2u - 1u;
-    _ = 2.0 - 1.0;
-    _ = vec2(2) - vec2(1);
-    _ = vec3(2u) - vec3(1u);
-    _ = vec4(2.0) - vec4(1.0);
+    let sub0 = 2 - 1;
+    let sub1 = 2u - 1u;
+    let sub2 = 2.0 - 1.0;
+    let sub3 = vec2(2) - vec2(1);
+    let sub4 = vec3(2u) - vec3(1u);
+    let sub5 = vec4(2.0) - vec4(1.0);
 
     // Multiplication
-    _ = 2 * 1;
-    _ = 2u * 1u;
-    _ = 2.0 * 1.0;
-    _ = vec2(2) * vec2(1);
-    _ = vec3(2u) * vec3(1u);
-    _ = vec4(2.0) * vec4(1.0);
+    let mul0 = 2 * 1;
+    let mul1 = 2u * 1u;
+    let mul2 = 2.0 * 1.0;
+    let mul3 = vec2(2) * vec2(1);
+    let mul4 = vec3(2u) * vec3(1u);
+    let mul5 = vec4(2.0) * vec4(1.0);
 
     // Division
-    _ = 2 / 1;
-    _ = 2u / 1u;
-    _ = 2.0 / 1.0;
-    _ = vec2(2) / vec2(1);
-    _ = vec3(2u) / vec3(1u);
-    _ = vec4(2.0) / vec4(1.0);
+    let div0 = 2 / 1;
+    let div1 = 2u / 1u;
+    let div2 = 2.0 / 1.0;
+    let div3 = vec2(2) / vec2(1);
+    let div4 = vec3(2u) / vec3(1u);
+    let div5 = vec4(2.0) / vec4(1.0);
 
     // Remainder
-    _ = 2 % 1;
-    _ = 2u % 1u;
-    _ = 2.0 % 1.0;
-    _ = vec2(2) % vec2(1);
-    _ = vec3(2u) % vec3(1u);
-    _ = vec4(2.0) % vec4(1.0);
+    let rem0 = 2 % 1;
+    let rem1 = 2u % 1u;
+    let rem2 = 2.0 % 1.0;
+    let rem3 = vec2(2) % vec2(1);
+    let rem4 = vec3(2u) % vec3(1u);
+    let rem5 = vec4(2.0) % vec4(1.0);
 
     // Binary arithmetic expressions with mixed scalar and vector operands
-    _ = vec2(2) + 1;
-    _ = 2 + vec2(1);
-    _ = vec2(2u) + 1u;
-    _ = 2u + vec2(1u);
-    _ = vec2(2.0) + 1.0;
-    _ = 2.0 + vec2(1.0);
-
-    _ = vec2(2) - 1;
-    _ = 2 - vec2(1);
-    _ = vec2(2u) - 1u;
-    _ = 2u - vec2(1u);
-    _ = vec2(2.0) - 1.0;
-    _ = 2.0 - vec2(1.0);
-
-    _ = vec2(2) * 1;
-    _ = 2 * vec2(1);
-    _ = vec2(2u) * 1u;
-    _ = 2u * vec2(1u);
-    _ = vec2(2.0) * 1.0;
-    _ = 2.0 * vec2(1.0);
-
-    _ = vec2(2) / 1;
-    _ = 2 / vec2(1);
-    _ = vec2(2u) / 1u;
-    _ = 2u / vec2(1u);
-    _ = vec2(2.0) / 1.0;
-    _ = 2.0 / vec2(1.0);
-
-    _ = vec2(2) % 1;
-    _ = 2 % vec2(1);
-    _ = vec2(2u) % 1u;
-    _ = 2u % vec2(1u);
-    _ = vec2(2.0) % 1.0;
-    _ = 2.0 % vec2(1.0);
+    {
+        let add0 = vec2(2) + 1;
+        let add1 = 2 + vec2(1);
+        let add2 = vec2(2u) + 1u;
+        let add3 = 2u + vec2(1u);
+        let add4 = vec2(2.0) + 1.0;
+        let add5 = 2.0 + vec2(1.0);
+
+        let sub0 = vec2(2) - 1;
+        let sub1 = 2 - vec2(1);
+        let sub2 = vec2(2u) - 1u;
+        let sub3 = 2u - vec2(1u);
+        let sub4 = vec2(2.0) - 1.0;
+        let sub5 = 2.0 - vec2(1.0);
+
+        let mul0 = vec2(2) * 1;
+        let mul1 = 2 * vec2(1);
+        let mul2 = vec2(2u) * 1u;
+        let mul3 = 2u * vec2(1u);
+        let mul4 = vec2(2.0) * 1.0;
+        let mul5 = 2.0 * vec2(1.0);
+
+        let div0 = vec2(2) / 1;
+        let div1 = 2 / vec2(1);
+        let div2 = vec2(2u) / 1u;
+        let div3 = 2u / vec2(1u);
+        let div4 = vec2(2.0) / 1.0;
+        let div5 = 2.0 / vec2(1.0);
+
+        let rem0 = vec2(2) % 1;
+        let rem1 = 2 % vec2(1);
+        let rem2 = vec2(2u) % 1u;
+        let rem3 = 2u % vec2(1u);
+        let rem4 = vec2(2.0) % 1.0;
+        let rem5 = 2.0 % vec2(1.0);
+    }
 
     // Matrix arithmetic
-    _ = mat3x3<f32>() + mat3x3<f32>();
-    _ = mat3x3<f32>() - mat3x3<f32>();
+    let add = mat3x3<f32>() + mat3x3<f32>();
+    let sub = mat3x3<f32>() - mat3x3<f32>();
 
-    _ = mat3x3<f32>() * 1.0;
-    _ = 2.0 * mat3x3<f32>();
+    let mul_scalar0 = mat3x3<f32>() * 1.0;
+    let mul_scalar1 = 2.0 * mat3x3<f32>();
 
-    _ = mat4x3<f32>() * vec4(1.0);
-    _ = vec3f(2.0) * mat4x3f();
+    let mul_vector0 = mat4x3<f32>() * vec4(1.0);
+    let mul_vector1 = vec3f(2.0) * mat4x3f();
 
-    _ = mat4x3<f32>() * mat3x4<f32>();
+    let mul = mat4x3<f32>() * mat3x4<f32>();
 }
 
 fn bit() {
     // unary
-    _ = ~1;
-    _ = ~1u;
-    _ = ~vec2(1);
-    _ = ~vec3(1u);
+    let flip0 = ~1;
+    let flip1 = ~1u;
+    let flip2 = ~vec2(1);
+    let flip3 = ~vec3(1u);
 
     // binary
-    _ = 2 | 1;
-    _ = 2u | 1u;
-    _ = vec2(2) | vec2(1);
-    _ = vec3(2u) | vec3(1u);
-
-    _ = 2 & 1;
-    _ = 2u & 1u;
-    _ = vec2(2) & vec2(1);
-    _ = vec3(2u) & vec3(1u);
-
-    _ = 2 ^ 1;
-    _ = 2u ^ 1u;
-    _ = vec2(2) ^ vec2(1);
-    _ = vec3(2u) ^ vec3(1u);
-
-    _ = 2 << 1u;
-    _ = 2u << 1u;
-    _ = vec2(2) << vec2(1u);
-    _ = vec3(2u) << vec3(1u);
-
-    _ = 2 >> 1u;
-    _ = 2u >> 1u;
-    _ = vec2(2) >> vec2(1u);
-    _ = vec3(2u) >> vec3(1u);
+    let or0 = 2 | 1;
+    let or1 = 2u | 1u;
+    let or2 = vec2(2) | vec2(1);
+    let or3 = vec3(2u) | vec3(1u);
+
+    let and0 = 2 & 1;
+    let and1 = 2u & 1u;
+    let and2 = vec2(2) & vec2(1);
+    let and3 = vec3(2u) & vec3(1u);
+
+    let xor0 = 2 ^ 1;
+    let xor1 = 2u ^ 1u;
+    let xor2 = vec2(2) ^ vec2(1);
+    let xor3 = vec3(2u) ^ vec3(1u);
+
+    let shl0 = 2 << 1u;
+    let shl1 = 2u << 1u;
+    let shl2 = vec2(2) << vec2(1u);
+    let shl3 = vec3(2u) << vec3(1u);
+
+    let shr0 = 2 >> 1u;
+    let shr1 = 2u >> 1u;
+    let shr2 = vec2(2) >> vec2(1u);
+    let shr3 = vec3(2u) >> vec3(1u);
 }
 
 fn comparison() {
-    _ = 2 == 1;
-    _ = 2u == 1u;
-    _ = 2.0 == 1.0;
-    _ = vec2(2) == vec2(1);
-    _ = vec3(2u) == vec3(1u);
-    _ = vec4(2.0) == vec4(1.0);
-
-    _ = 2 != 1;
-    _ = 2u != 1u;
-    _ = 2.0 != 1.0;
-    _ = vec2(2) != vec2(1);
-    _ = vec3(2u) != vec3(1u);
-    _ = vec4(2.0) != vec4(1.0);
-
-    _ = 2 < 1;
-    _ = 2u < 1u;
-    _ = 2.0 < 1.0;
-    _ = vec2(2) < vec2(1);
-    _ = vec3(2u) < vec3(1u);
-    _ = vec4(2.0) < vec4(1.0);
-
-    _ = 2 <= 1;
-    _ = 2u <= 1u;
-    _ = 2.0 <= 1.0;
-    _ = vec2(2) <= vec2(1);
-    _ = vec3(2u) <= vec3(1u);
-    _ = vec4(2.0) <= vec4(1.0);
-
-    _ = 2 > 1;
-    _ = 2u > 1u;
-    _ = 2.0 > 1.0;
-    _ = vec2(2) > vec2(1);
-    _ = vec3(2u) > vec3(1u);
-    _ = vec4(2.0) > vec4(1.0);
-
-    _ = 2 >= 1;
-    _ = 2u >= 1u;
-    _ = 2.0 >= 1.0;
-    _ = vec2(2) >= vec2(1);
-    _ = vec3(2u) >= vec3(1u);
-    _ = vec4(2.0) >= vec4(1.0);
+    let eq0 = 2 == 1;
+    let eq1 = 2u == 1u;
+    let eq2 = 2.0 == 1.0;
+    let eq3 = vec2(2) == vec2(1);
+    let eq4 = vec3(2u) == vec3(1u);
+    let eq5 = vec4(2.0) == vec4(1.0);
+
+    let neq0 = 2 != 1;
+    let neq1 = 2u != 1u;
+    let neq2 = 2.0 != 1.0;
+    let neq3 = vec2(2) != vec2(1);
+    let neq4 = vec3(2u) != vec3(1u);
+    let neq5 = vec4(2.0) != vec4(1.0);
+
+    let lt0 = 2 < 1;
+    let lt1 = 2u < 1u;
+    let lt2 = 2.0 < 1.0;
+    let lt3 = vec2(2) < vec2(1);
+    let lt4 = vec3(2u) < vec3(1u);
+    let lt5 = vec4(2.0) < vec4(1.0);
+
+    let lte0 = 2 <= 1;
+    let lte1 = 2u <= 1u;
+    let lte2 = 2.0 <= 1.0;
+    let lte3 = vec2(2) <= vec2(1);
+    let lte4 = vec3(2u) <= vec3(1u);
+    let lte5 = vec4(2.0) <= vec4(1.0);
+
+    let gt0 = 2 > 1;
+    let gt1 = 2u > 1u;
+    let gt2 = 2.0 > 1.0;
+    let gt3 = vec2(2) > vec2(1);
+    let gt4 = vec3(2u) > vec3(1u);
+    let gt5 = vec4(2.0) > vec4(1.0);
+
+    let gte0 = 2 >= 1;
+    let gte1 = 2u >= 1u;
+    let gte2 = 2.0 >= 1.0;
+    let gte3 = vec2(2) >= vec2(1);
+    let gte4 = vec3(2u) >= vec3(1u);
+    let gte5 = vec4(2.0) >= vec4(1.0);
 }
 
 fn assignment() {
@@ -301,10 +303,10 @@ fn assignment() {
 
 @compute @workgroup_size(1)
 fn main() {
-    _ = builtins();
-    _ = splat();
-    _ = bool_cast(v_f32_one.xyz);
-    _ = constructors();
+    builtins();
+    splat();
+    bool_cast(v_f32_one.xyz);
+    constructors();
 
     logical();
     arithmetic();
@@ -314,12 +316,12 @@ fn main() {
 }
 
 fn negation_avoids_prefix_decrement() {
-    _ = -1;
-    _ = - -2;
-    _ = -(-3);
-    _ = -(- 4);
-    _ = - - -5;
-    _ = - - - - 6;
-    _ = - - -(- -7);
-    _ = (- - - - -8);
+    let p0 = -1;
+    let p1 = - -2;
+    let p2 = -(-3);
+    let p3 = -(- 4);
+    let p4 = - - -5;
+    let p5 = - - - - 6;
+    let p6 = - - -(- -7);
+    let p7 = (- - - - -8);
 }
diff --git a/tests/out/glsl/access.foo_vert.Vertex.glsl b/tests/out/glsl/access.foo_vert.Vertex.glsl
index f3754247bd..2a5e038821 100644
--- a/tests/out/glsl/access.foo_vert.Vertex.glsl
+++ b/tests/out/glsl/access.foo_vert.Vertex.glsl
@@ -39,18 +39,18 @@ void test_matrix_within_struct_accesses() {
     idx = 1;
     int _e2 = idx;
     idx = (_e2 - 1);
-    mat3x2 unnamed = _group_0_binding_1_vs.m;
-    vec2 unnamed_1 = _group_0_binding_1_vs.m[0];
+    mat3x2 l0_ = _group_0_binding_1_vs.m;
+    vec2 l1_ = _group_0_binding_1_vs.m[0];
     int _e15 = idx;
-    vec2 unnamed_2 = _group_0_binding_1_vs.m[_e15];
-    float unnamed_3 = _group_0_binding_1_vs.m[0][1];
+    vec2 l2_ = _group_0_binding_1_vs.m[_e15];
+    float l3_ = _group_0_binding_1_vs.m[0][1];
     int _e29 = idx;
-    float unnamed_4 = _group_0_binding_1_vs.m[0][_e29];
+    float l4_ = _group_0_binding_1_vs.m[0][_e29];
     int _e34 = idx;
-    float unnamed_5 = _group_0_binding_1_vs.m[_e34][1];
+    float l5_ = _group_0_binding_1_vs.m[_e34][1];
     int _e41 = idx;
     int _e43 = idx;
-    float unnamed_6 = _group_0_binding_1_vs.m[_e41][_e43];
+    float l6_ = _group_0_binding_1_vs.m[_e41][_e43];
     t = Baz(mat3x2(vec2(1.0), vec2(2.0), vec2(3.0)));
     int _e55 = idx;
     idx = (_e55 + 1);
@@ -75,19 +75,19 @@ void test_matrix_within_array_within_struct_accesses() {
     idx_1 = 1;
     int _e2 = idx_1;
     idx_1 = (_e2 - 1);
-    mat4x2 unnamed_7[2] = _group_0_binding_3_vs.am;
-    mat4x2 unnamed_8 = _group_0_binding_3_vs.am[0];
-    vec2 unnamed_9 = _group_0_binding_3_vs.am[0][0];
+    mat4x2 l0_1[2] = _group_0_binding_3_vs.am;
+    mat4x2 l1_1 = _group_0_binding_3_vs.am[0];
+    vec2 l2_1 = _group_0_binding_3_vs.am[0][0];
     int _e24 = idx_1;
-    vec2 unnamed_10 = _group_0_binding_3_vs.am[0][_e24];
-    float unnamed_11 = _group_0_binding_3_vs.am[0][0][1];
+    vec2 l3_1 = _group_0_binding_3_vs.am[0][_e24];
+    float l4_1 = _group_0_binding_3_vs.am[0][0][1];
     int _e42 = idx_1;
-    float unnamed_12 = _group_0_binding_3_vs.am[0][0][_e42];
+    float l5_1 = _group_0_binding_3_vs.am[0][0][_e42];
     int _e49 = idx_1;
-    float unnamed_13 = _group_0_binding_3_vs.am[0][_e49][1];
+    float l6_1 = _group_0_binding_3_vs.am[0][_e49][1];
     int _e58 = idx_1;
     int _e60 = idx_1;
-    float unnamed_14 = _group_0_binding_3_vs.am[0][_e58][_e60];
+    float l7_ = _group_0_binding_3_vs.am[0][_e58][_e60];
     t_1 = MatCx2InArray(mat4x2[2](mat4x2(0.0), mat4x2(0.0)));
     int _e66 = idx_1;
     idx_1 = (_e66 + 1);
diff --git a/tests/out/glsl/array-in-ctor.cs_main.Compute.glsl b/tests/out/glsl/array-in-ctor.cs_main.Compute.glsl
index e8245d55ee..bd918087b8 100644
--- a/tests/out/glsl/array-in-ctor.cs_main.Compute.glsl
+++ b/tests/out/glsl/array-in-ctor.cs_main.Compute.glsl
@@ -12,6 +12,6 @@ layout(std430) readonly buffer Ah_block_0Compute { Ah _group_0_binding_0_cs; };
 
 
 void main() {
-    Ah unnamed = _group_0_binding_0_cs;
+    Ah ah_1 = _group_0_binding_0_cs;
 }
 
diff --git a/tests/out/glsl/atomicOps.cs_main.Compute.glsl b/tests/out/glsl/atomicOps.cs_main.Compute.glsl
index 30086fa8ef..c40e85d30f 100644
--- a/tests/out/glsl/atomicOps.cs_main.Compute.glsl
+++ b/tests/out/glsl/atomicOps.cs_main.Compute.glsl
@@ -41,14 +41,14 @@ void main() {
     workgroup_struct.atomic_arr[1] = 1;
     memoryBarrierShared();
     barrier();
-    uint unnamed = _group_0_binding_0_cs;
-    int unnamed_1 = _group_0_binding_1_cs[1];
-    uint unnamed_2 = _group_0_binding_2_cs.atomic_scalar;
-    int unnamed_3 = _group_0_binding_2_cs.atomic_arr[1];
-    uint unnamed_4 = workgroup_atomic_scalar;
-    int unnamed_5 = workgroup_atomic_arr[1];
-    uint unnamed_6 = workgroup_struct.atomic_scalar;
-    int unnamed_7 = workgroup_struct.atomic_arr[1];
+    uint l0_ = _group_0_binding_0_cs;
+    int l1_ = _group_0_binding_1_cs[1];
+    uint l2_ = _group_0_binding_2_cs.atomic_scalar;
+    int l3_ = _group_0_binding_2_cs.atomic_arr[1];
+    uint l4_ = workgroup_atomic_scalar;
+    int l5_ = workgroup_atomic_arr[1];
+    uint l6_ = workgroup_struct.atomic_scalar;
+    int l7_ = workgroup_struct.atomic_arr[1];
     memoryBarrierShared();
     barrier();
     uint _e59 = atomicAdd(_group_0_binding_0_cs, 1u);
diff --git a/tests/out/glsl/break-if.main.Compute.glsl b/tests/out/glsl/break-if.main.Compute.glsl
index 025156af7b..b4554d5d31 100644
--- a/tests/out/glsl/break-if.main.Compute.glsl
+++ b/tests/out/glsl/break-if.main.Compute.glsl
@@ -29,8 +29,7 @@ void breakIfEmptyBody(bool a) {
             bool _e2 = b;
             c = (a != _e2);
             bool _e5 = c;
-            bool unnamed = (a == _e5);
-            if (unnamed) {
+            if ((a == _e5)) {
                 break;
             }
         }
@@ -46,8 +45,7 @@ void breakIf(bool a_1) {
     while(true) {
         if (!loop_init_2) {
             bool _e5 = e;
-            bool unnamed_1 = (a_1 == _e5);
-            if (unnamed_1) {
+            if ((a_1 == _e5)) {
                 break;
             }
         }
diff --git a/tests/out/glsl/do-while.main.Fragment.glsl b/tests/out/glsl/do-while.main.Fragment.glsl
index 1d1ca4e8ec..56a69123cf 100644
--- a/tests/out/glsl/do-while.main.Fragment.glsl
+++ b/tests/out/glsl/do-while.main.Fragment.glsl
@@ -9,8 +9,7 @@ void fb1_(inout bool cond) {
     while(true) {
         if (!loop_init) {
             bool _e6 = cond;
-            bool unnamed = !(_e6);
-            if (unnamed) {
+            if (!(_e6)) {
                 break;
             }
         }
diff --git a/tests/out/glsl/globals.main.Compute.glsl b/tests/out/glsl/globals.main.Compute.glsl
index cb695ac1d6..5c194d5326 100644
--- a/tests/out/glsl/globals.main.Compute.glsl
+++ b/tests/out/glsl/globals.main.Compute.glsl
@@ -41,13 +41,13 @@ void test_msl_packed_vec3_() {
     int _e17 = idx;
     _group_0_binding_1_cs.v3_[_e17] = 3.0;
     FooStruct data = _group_0_binding_1_cs;
-    vec3 unnamed = data.v3_;
-    vec2 unnamed_1 = data.v3_.zx;
+    vec3 l0_ = data.v3_;
+    vec2 l1_ = data.v3_.zx;
     test_msl_packed_vec3_as_arg(data.v3_);
-    vec3 unnamed_2 = (data.v3_ * mat3x3(0.0));
-    vec3 unnamed_3 = (mat3x3(0.0) * data.v3_);
-    vec3 unnamed_4 = (data.v3_ * 2.0);
-    vec3 unnamed_5 = (2.0 * data.v3_);
+    vec3 mvm0_ = (data.v3_ * mat3x3(0.0));
+    vec3 mvm1_ = (mat3x3(0.0) * data.v3_);
+    vec3 svm0_ = (data.v3_ * 2.0);
+    vec3 svm1_ = (2.0 * data.v3_);
 }
 
 void main() {
diff --git a/tests/out/glsl/operators.main.Compute.glsl b/tests/out/glsl/operators.main.Compute.glsl
index 9754ae2bbb..d3859ef63b 100644
--- a/tests/out/glsl/operators.main.Compute.glsl
+++ b/tests/out/glsl/operators.main.Compute.glsl
@@ -49,170 +49,172 @@ vec3 bool_cast(vec3 x) {
 float constructors() {
     Foo foo = Foo(vec4(0.0), 0);
     foo = Foo(vec4(1.0), 1);
-    mat2x2 mat2comp = mat2x2(vec2(1.0, 0.0), vec2(0.0, 1.0));
-    mat4x4 mat4comp = mat4x4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
-    uvec2 unnamed = uvec2(0u);
-    mat2x2 unnamed_1 = mat2x2(vec2(0.0), vec2(0.0));
-    int unnamed_2[4] = int[4](0, 1, 2, 3);
-    bool unnamed_3 = bool(false);
-    int unnamed_4 = int(0);
-    uint unnamed_5 = uint(0u);
-    float unnamed_6 = float(0.0);
-    uvec2 unnamed_7 = uvec2(uvec2(0u));
-    mat2x3 unnamed_8 = mat2x3(mat2x3(0.0));
-    uvec2 unnamed_9 = uvec2(0u);
-    mat2x3 unnamed_10 = mat2x3(0.0);
+    mat2x2 m0_ = mat2x2(vec2(1.0, 0.0), vec2(0.0, 1.0));
+    mat4x4 m1_1 = mat4x4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
+    uvec2 cit0_ = uvec2(0u);
+    mat2x2 cit1_ = mat2x2(vec2(0.0), vec2(0.0));
+    int cit2_[4] = int[4](0, 1, 2, 3);
+    bool ic0_ = bool(false);
+    int ic1_ = int(0);
+    uint ic2_ = uint(0u);
+    float ic3_ = float(0.0);
+    uvec2 ic4_ = uvec2(uvec2(0u));
+    mat2x3 ic5_ = mat2x3(mat2x3(0.0));
+    uvec2 ic6_ = uvec2(0u);
+    mat2x3 ic7_ = mat2x3(0.0);
     float _e71 = foo.a.x;
     return _e71;
 }
 
 void logical() {
-    bool unnamed_11 = !(true);
-    bvec2 unnamed_12 = not(bvec2(true));
-    bool unnamed_13 = (true || false);
-    bool unnamed_14 = (true && false);
-    bool unnamed_15 = (true || false);
-    bvec3 unnamed_16 = bvec3(bvec3(true).x || bvec3(false).x, bvec3(true).y || bvec3(false).y, bvec3(true).z || bvec3(false).z);
-    bool unnamed_17 = (true && false);
-    bvec4 unnamed_18 = bvec4(bvec4(true).x && bvec4(false).x, bvec4(true).y && bvec4(false).y, bvec4(true).z && bvec4(false).z, bvec4(true).w && bvec4(false).w);
+    bool neg0_ = !(true);
+    bvec2 neg1_ = not(bvec2(true));
+    bool or = (true || false);
+    bool and = (true && false);
+    bool bitwise_or0_ = (true || false);
+    bvec3 bitwise_or1_ = bvec3(bvec3(true).x || bvec3(false).x, bvec3(true).y || bvec3(false).y, bvec3(true).z || bvec3(false).z);
+    bool bitwise_and0_ = (true && false);
+    bvec4 bitwise_and1_ = bvec4(bvec4(true).x && bvec4(false).x, bvec4(true).y && bvec4(false).y, bvec4(true).z && bvec4(false).z, bvec4(true).w && bvec4(false).w);
 }
 
 void arithmetic() {
-    ivec2 unnamed_19 = -(ivec2(1));
-    vec2 unnamed_20 = -(vec2(1.0));
-    int unnamed_21 = (2 + 1);
-    uint unnamed_22 = (2u + 1u);
-    float unnamed_23 = (2.0 + 1.0);
-    ivec2 unnamed_24 = (ivec2(2) + ivec2(1));
-    uvec3 unnamed_25 = (uvec3(2u) + uvec3(1u));
-    vec4 unnamed_26 = (vec4(2.0) + vec4(1.0));
-    int unnamed_27 = (2 - 1);
-    uint unnamed_28 = (2u - 1u);
-    float unnamed_29 = (2.0 - 1.0);
-    ivec2 unnamed_30 = (ivec2(2) - ivec2(1));
-    uvec3 unnamed_31 = (uvec3(2u) - uvec3(1u));
-    vec4 unnamed_32 = (vec4(2.0) - vec4(1.0));
-    int unnamed_33 = (2 * 1);
-    uint unnamed_34 = (2u * 1u);
-    float unnamed_35 = (2.0 * 1.0);
-    ivec2 unnamed_36 = (ivec2(2) * ivec2(1));
-    uvec3 unnamed_37 = (uvec3(2u) * uvec3(1u));
-    vec4 unnamed_38 = (vec4(2.0) * vec4(1.0));
-    int unnamed_39 = (2 / 1);
-    uint unnamed_40 = (2u / 1u);
-    float unnamed_41 = (2.0 / 1.0);
-    ivec2 unnamed_42 = (ivec2(2) / ivec2(1));
-    uvec3 unnamed_43 = (uvec3(2u) / uvec3(1u));
-    vec4 unnamed_44 = (vec4(2.0) / vec4(1.0));
-    int unnamed_45 = (2 % 1);
-    uint unnamed_46 = (2u % 1u);
-    float unnamed_47 = (2.0 - 1.0 * trunc(2.0 / 1.0));
-    ivec2 unnamed_48 = (ivec2(2) % ivec2(1));
-    uvec3 unnamed_49 = (uvec3(2u) % uvec3(1u));
-    vec4 unnamed_50 = (vec4(2.0) - vec4(1.0) * trunc(vec4(2.0) / vec4(1.0)));
-    ivec2 unnamed_51 = (ivec2(2) + ivec2(1));
-    ivec2 unnamed_52 = (ivec2(2) + ivec2(1));
-    uvec2 unnamed_53 = (uvec2(2u) + uvec2(1u));
-    uvec2 unnamed_54 = (uvec2(2u) + uvec2(1u));
-    vec2 unnamed_55 = (vec2(2.0) + vec2(1.0));
-    vec2 unnamed_56 = (vec2(2.0) + vec2(1.0));
-    ivec2 unnamed_57 = (ivec2(2) - ivec2(1));
-    ivec2 unnamed_58 = (ivec2(2) - ivec2(1));
-    uvec2 unnamed_59 = (uvec2(2u) - uvec2(1u));
-    uvec2 unnamed_60 = (uvec2(2u) - uvec2(1u));
-    vec2 unnamed_61 = (vec2(2.0) - vec2(1.0));
-    vec2 unnamed_62 = (vec2(2.0) - vec2(1.0));
-    ivec2 unnamed_63 = (ivec2(2) * 1);
-    ivec2 unnamed_64 = (2 * ivec2(1));
-    uvec2 unnamed_65 = (uvec2(2u) * 1u);
-    uvec2 unnamed_66 = (2u * uvec2(1u));
-    vec2 unnamed_67 = (vec2(2.0) * 1.0);
-    vec2 unnamed_68 = (2.0 * vec2(1.0));
-    ivec2 unnamed_69 = (ivec2(2) / ivec2(1));
-    ivec2 unnamed_70 = (ivec2(2) / ivec2(1));
-    uvec2 unnamed_71 = (uvec2(2u) / uvec2(1u));
-    uvec2 unnamed_72 = (uvec2(2u) / uvec2(1u));
-    vec2 unnamed_73 = (vec2(2.0) / vec2(1.0));
-    vec2 unnamed_74 = (vec2(2.0) / vec2(1.0));
-    ivec2 unnamed_75 = (ivec2(2) % ivec2(1));
-    ivec2 unnamed_76 = (ivec2(2) % ivec2(1));
-    uvec2 unnamed_77 = (uvec2(2u) % uvec2(1u));
-    uvec2 unnamed_78 = (uvec2(2u) % uvec2(1u));
-    vec2 unnamed_79 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0)));
-    vec2 unnamed_80 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0)));
-    mat3x3 unnamed_81 = (mat3x3(0.0) + mat3x3(0.0));
-    mat3x3 unnamed_82 = (mat3x3(0.0) - mat3x3(0.0));
-    mat3x3 unnamed_83 = (mat3x3(0.0) * 1.0);
-    mat3x3 unnamed_84 = (2.0 * mat3x3(0.0));
-    vec3 unnamed_85 = (mat4x3(0.0) * vec4(1.0));
-    vec4 unnamed_86 = (vec3(2.0) * mat4x3(0.0));
-    mat3x3 unnamed_87 = (mat4x3(0.0) * mat3x4(0.0));
+    ivec2 neg1_1 = -(ivec2(1));
+    vec2 neg2_ = -(vec2(1.0));
+    int add0_ = (2 + 1);
+    uint add1_ = (2u + 1u);
+    float add2_ = (2.0 + 1.0);
+    ivec2 add3_ = (ivec2(2) + ivec2(1));
+    uvec3 add4_ = (uvec3(2u) + uvec3(1u));
+    vec4 add5_ = (vec4(2.0) + vec4(1.0));
+    int sub0_ = (2 - 1);
+    uint sub1_ = (2u - 1u);
+    float sub2_ = (2.0 - 1.0);
+    ivec2 sub3_ = (ivec2(2) - ivec2(1));
+    uvec3 sub4_ = (uvec3(2u) - uvec3(1u));
+    vec4 sub5_ = (vec4(2.0) - vec4(1.0));
+    int mul0_ = (2 * 1);
+    uint mul1_ = (2u * 1u);
+    float mul2_ = (2.0 * 1.0);
+    ivec2 mul3_ = (ivec2(2) * ivec2(1));
+    uvec3 mul4_ = (uvec3(2u) * uvec3(1u));
+    vec4 mul5_ = (vec4(2.0) * vec4(1.0));
+    int div0_ = (2 / 1);
+    uint div1_ = (2u / 1u);
+    float div2_ = (2.0 / 1.0);
+    ivec2 div3_ = (ivec2(2) / ivec2(1));
+    uvec3 div4_ = (uvec3(2u) / uvec3(1u));
+    vec4 div5_ = (vec4(2.0) / vec4(1.0));
+    int rem0_ = (2 % 1);
+    uint rem1_ = (2u % 1u);
+    float rem2_ = (2.0 - 1.0 * trunc(2.0 / 1.0));
+    ivec2 rem3_ = (ivec2(2) % ivec2(1));
+    uvec3 rem4_ = (uvec3(2u) % uvec3(1u));
+    vec4 rem5_ = (vec4(2.0) - vec4(1.0) * trunc(vec4(2.0) / vec4(1.0)));
+    {
+        ivec2 add0_1 = (ivec2(2) + ivec2(1));
+        ivec2 add1_1 = (ivec2(2) + ivec2(1));
+        uvec2 add2_1 = (uvec2(2u) + uvec2(1u));
+        uvec2 add3_1 = (uvec2(2u) + uvec2(1u));
+        vec2 add4_1 = (vec2(2.0) + vec2(1.0));
+        vec2 add5_1 = (vec2(2.0) + vec2(1.0));
+        ivec2 sub0_1 = (ivec2(2) - ivec2(1));
+        ivec2 sub1_1 = (ivec2(2) - ivec2(1));
+        uvec2 sub2_1 = (uvec2(2u) - uvec2(1u));
+        uvec2 sub3_1 = (uvec2(2u) - uvec2(1u));
+        vec2 sub4_1 = (vec2(2.0) - vec2(1.0));
+        vec2 sub5_1 = (vec2(2.0) - vec2(1.0));
+        ivec2 mul0_1 = (ivec2(2) * 1);
+        ivec2 mul1_1 = (2 * ivec2(1));
+        uvec2 mul2_1 = (uvec2(2u) * 1u);
+        uvec2 mul3_1 = (2u * uvec2(1u));
+        vec2 mul4_1 = (vec2(2.0) * 1.0);
+        vec2 mul5_1 = (2.0 * vec2(1.0));
+        ivec2 div0_1 = (ivec2(2) / ivec2(1));
+        ivec2 div1_1 = (ivec2(2) / ivec2(1));
+        uvec2 div2_1 = (uvec2(2u) / uvec2(1u));
+        uvec2 div3_1 = (uvec2(2u) / uvec2(1u));
+        vec2 div4_1 = (vec2(2.0) / vec2(1.0));
+        vec2 div5_1 = (vec2(2.0) / vec2(1.0));
+        ivec2 rem0_1 = (ivec2(2) % ivec2(1));
+        ivec2 rem1_1 = (ivec2(2) % ivec2(1));
+        uvec2 rem2_1 = (uvec2(2u) % uvec2(1u));
+        uvec2 rem3_1 = (uvec2(2u) % uvec2(1u));
+        vec2 rem4_1 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0)));
+        vec2 rem5_1 = (vec2(2.0) - vec2(1.0) * trunc(vec2(2.0) / vec2(1.0)));
+    }
+    mat3x3 add = (mat3x3(0.0) + mat3x3(0.0));
+    mat3x3 sub = (mat3x3(0.0) - mat3x3(0.0));
+    mat3x3 mul_scalar0_ = (mat3x3(0.0) * 1.0);
+    mat3x3 mul_scalar1_ = (2.0 * mat3x3(0.0));
+    vec3 mul_vector0_ = (mat4x3(0.0) * vec4(1.0));
+    vec4 mul_vector1_ = (vec3(2.0) * mat4x3(0.0));
+    mat3x3 mul = (mat4x3(0.0) * mat3x4(0.0));
 }
 
 void bit() {
-    int unnamed_88 = ~(1);
-    uint unnamed_89 = ~(1u);
-    ivec2 unnamed_90 = ~(ivec2(1));
-    uvec3 unnamed_91 = ~(uvec3(1u));
-    int unnamed_92 = (2 | 1);
-    uint unnamed_93 = (2u | 1u);
-    ivec2 unnamed_94 = (ivec2(2) | ivec2(1));
-    uvec3 unnamed_95 = (uvec3(2u) | uvec3(1u));
-    int unnamed_96 = (2 & 1);
-    uint unnamed_97 = (2u & 1u);
-    ivec2 unnamed_98 = (ivec2(2) & ivec2(1));
-    uvec3 unnamed_99 = (uvec3(2u) & uvec3(1u));
-    int unnamed_100 = (2 ^ 1);
-    uint unnamed_101 = (2u ^ 1u);
-    ivec2 unnamed_102 = (ivec2(2) ^ ivec2(1));
-    uvec3 unnamed_103 = (uvec3(2u) ^ uvec3(1u));
-    int unnamed_104 = (2 << 1u);
-    uint unnamed_105 = (2u << 1u);
-    ivec2 unnamed_106 = (ivec2(2) << uvec2(1u));
-    uvec3 unnamed_107 = (uvec3(2u) << uvec3(1u));
-    int unnamed_108 = (2 >> 1u);
-    uint unnamed_109 = (2u >> 1u);
-    ivec2 unnamed_110 = (ivec2(2) >> uvec2(1u));
-    uvec3 unnamed_111 = (uvec3(2u) >> uvec3(1u));
+    int flip0_ = ~(1);
+    uint flip1_ = ~(1u);
+    ivec2 flip2_ = ~(ivec2(1));
+    uvec3 flip3_ = ~(uvec3(1u));
+    int or0_ = (2 | 1);
+    uint or1_ = (2u | 1u);
+    ivec2 or2_ = (ivec2(2) | ivec2(1));
+    uvec3 or3_ = (uvec3(2u) | uvec3(1u));
+    int and0_ = (2 & 1);
+    uint and1_ = (2u & 1u);
+    ivec2 and2_ = (ivec2(2) & ivec2(1));
+    uvec3 and3_ = (uvec3(2u) & uvec3(1u));
+    int xor0_ = (2 ^ 1);
+    uint xor1_ = (2u ^ 1u);
+    ivec2 xor2_ = (ivec2(2) ^ ivec2(1));
+    uvec3 xor3_ = (uvec3(2u) ^ uvec3(1u));
+    int shl0_ = (2 << 1u);
+    uint shl1_ = (2u << 1u);
+    ivec2 shl2_ = (ivec2(2) << uvec2(1u));
+    uvec3 shl3_ = (uvec3(2u) << uvec3(1u));
+    int shr0_ = (2 >> 1u);
+    uint shr1_ = (2u >> 1u);
+    ivec2 shr2_ = (ivec2(2) >> uvec2(1u));
+    uvec3 shr3_ = (uvec3(2u) >> uvec3(1u));
 }
 
 void comparison() {
-    bool unnamed_112 = (2 == 1);
-    bool unnamed_113 = (2u == 1u);
-    bool unnamed_114 = (2.0 == 1.0);
-    bvec2 unnamed_115 = equal(ivec2(2), ivec2(1));
-    bvec3 unnamed_116 = equal(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_117 = equal(vec4(2.0), vec4(1.0));
-    bool unnamed_118 = (2 != 1);
-    bool unnamed_119 = (2u != 1u);
-    bool unnamed_120 = (2.0 != 1.0);
-    bvec2 unnamed_121 = notEqual(ivec2(2), ivec2(1));
-    bvec3 unnamed_122 = notEqual(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_123 = notEqual(vec4(2.0), vec4(1.0));
-    bool unnamed_124 = (2 < 1);
-    bool unnamed_125 = (2u < 1u);
-    bool unnamed_126 = (2.0 < 1.0);
-    bvec2 unnamed_127 = lessThan(ivec2(2), ivec2(1));
-    bvec3 unnamed_128 = lessThan(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_129 = lessThan(vec4(2.0), vec4(1.0));
-    bool unnamed_130 = (2 <= 1);
-    bool unnamed_131 = (2u <= 1u);
-    bool unnamed_132 = (2.0 <= 1.0);
-    bvec2 unnamed_133 = lessThanEqual(ivec2(2), ivec2(1));
-    bvec3 unnamed_134 = lessThanEqual(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_135 = lessThanEqual(vec4(2.0), vec4(1.0));
-    bool unnamed_136 = (2 > 1);
-    bool unnamed_137 = (2u > 1u);
-    bool unnamed_138 = (2.0 > 1.0);
-    bvec2 unnamed_139 = greaterThan(ivec2(2), ivec2(1));
-    bvec3 unnamed_140 = greaterThan(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_141 = greaterThan(vec4(2.0), vec4(1.0));
-    bool unnamed_142 = (2 >= 1);
-    bool unnamed_143 = (2u >= 1u);
-    bool unnamed_144 = (2.0 >= 1.0);
-    bvec2 unnamed_145 = greaterThanEqual(ivec2(2), ivec2(1));
-    bvec3 unnamed_146 = greaterThanEqual(uvec3(2u), uvec3(1u));
-    bvec4 unnamed_147 = greaterThanEqual(vec4(2.0), vec4(1.0));
+    bool eq0_ = (2 == 1);
+    bool eq1_ = (2u == 1u);
+    bool eq2_ = (2.0 == 1.0);
+    bvec2 eq3_ = equal(ivec2(2), ivec2(1));
+    bvec3 eq4_ = equal(uvec3(2u), uvec3(1u));
+    bvec4 eq5_ = equal(vec4(2.0), vec4(1.0));
+    bool neq0_ = (2 != 1);
+    bool neq1_ = (2u != 1u);
+    bool neq2_ = (2.0 != 1.0);
+    bvec2 neq3_ = notEqual(ivec2(2), ivec2(1));
+    bvec3 neq4_ = notEqual(uvec3(2u), uvec3(1u));
+    bvec4 neq5_ = notEqual(vec4(2.0), vec4(1.0));
+    bool lt0_ = (2 < 1);
+    bool lt1_ = (2u < 1u);
+    bool lt2_ = (2.0 < 1.0);
+    bvec2 lt3_ = lessThan(ivec2(2), ivec2(1));
+    bvec3 lt4_ = lessThan(uvec3(2u), uvec3(1u));
+    bvec4 lt5_ = lessThan(vec4(2.0), vec4(1.0));
+    bool lte0_ = (2 <= 1);
+    bool lte1_ = (2u <= 1u);
+    bool lte2_ = (2.0 <= 1.0);
+    bvec2 lte3_ = lessThanEqual(ivec2(2), ivec2(1));
+    bvec3 lte4_ = lessThanEqual(uvec3(2u), uvec3(1u));
+    bvec4 lte5_ = lessThanEqual(vec4(2.0), vec4(1.0));
+    bool gt0_ = (2 > 1);
+    bool gt1_ = (2u > 1u);
+    bool gt2_ = (2.0 > 1.0);
+    bvec2 gt3_ = greaterThan(ivec2(2), ivec2(1));
+    bvec3 gt4_ = greaterThan(uvec3(2u), uvec3(1u));
+    bvec4 gt5_ = greaterThan(vec4(2.0), vec4(1.0));
+    bool gte0_ = (2 >= 1);
+    bool gte1_ = (2u >= 1u);
+    bool gte2_ = (2.0 >= 1.0);
+    bvec2 gte3_ = greaterThanEqual(ivec2(2), ivec2(1));
+    bvec3 gte4_ = greaterThanEqual(uvec3(2u), uvec3(1u));
+    bvec4 gte5_ = greaterThanEqual(vec4(2.0), vec4(1.0));
 }
 
 void assignment() {
@@ -254,13 +256,13 @@ void assignment() {
 }
 
 void negation_avoids_prefix_decrement() {
-    int unnamed_148 = -(-2);
-    int unnamed_149 = -(-3);
-    int unnamed_150 = -(-(4));
-    int unnamed_151 = -(-(-5));
-    int unnamed_152 = -(-(-(-(6))));
-    int unnamed_153 = -(-(-(-(-7))));
-    int unnamed_154 = -(-(-(-(-8))));
+    int p1_ = -(-2);
+    int p2_ = -(-3);
+    int p3_ = -(-(4));
+    int p4_ = -(-(-5));
+    int p5_ = -(-(-(-(6))));
+    int p6_ = -(-(-(-(-7))));
+    int p7_ = -(-(-(-(-8))));
 }
 
 void main() {
diff --git a/tests/out/hlsl/access.hlsl b/tests/out/hlsl/access.hlsl
index 63814754ed..2af083b721 100644
--- a/tests/out/hlsl/access.hlsl
+++ b/tests/out/hlsl/access.hlsl
@@ -126,18 +126,18 @@ void test_matrix_within_struct_accesses()
     idx = 1;
     int _expr2 = idx;
     idx = (_expr2 - 1);
-    float3x2 unnamed = GetMatmOnBaz(baz);
-    float2 unnamed_1 = GetMatmOnBaz(baz)[0];
+    float3x2 l0_ = GetMatmOnBaz(baz);
+    float2 l1_ = GetMatmOnBaz(baz)[0];
     int _expr15 = idx;
-    float2 unnamed_2 = GetMatmOnBaz(baz)[_expr15];
-    float unnamed_3 = GetMatmOnBaz(baz)[0].y;
+    float2 l2_ = GetMatmOnBaz(baz)[_expr15];
+    float l3_ = GetMatmOnBaz(baz)[0].y;
     int _expr29 = idx;
-    float unnamed_4 = GetMatmOnBaz(baz)[0][_expr29];
+    float l4_ = GetMatmOnBaz(baz)[0][_expr29];
     int _expr34 = idx;
-    float unnamed_5 = GetMatmOnBaz(baz)[_expr34].y;
+    float l5_ = GetMatmOnBaz(baz)[_expr34].y;
     int _expr41 = idx;
     int _expr43 = idx;
-    float unnamed_6 = GetMatmOnBaz(baz)[_expr41][_expr43];
+    float l6_ = GetMatmOnBaz(baz)[_expr41][_expr43];
     t = ConstructBaz(float3x2((1.0).xx, (2.0).xx, (3.0).xx));
     int _expr55 = idx;
     idx = (_expr55 + 1);
@@ -170,19 +170,19 @@ void test_matrix_within_array_within_struct_accesses()
     idx_1 = 1;
     int _expr2 = idx_1;
     idx_1 = (_expr2 - 1);
-    float4x2 unnamed_7[2] = ((float4x2[2])nested_mat_cx2_.am);
-    float4x2 unnamed_8 = ((float4x2)nested_mat_cx2_.am[0]);
-    float2 unnamed_9 = nested_mat_cx2_.am[0]._0;
+    float4x2 l0_1[2] = ((float4x2[2])nested_mat_cx2_.am);
+    float4x2 l1_1 = ((float4x2)nested_mat_cx2_.am[0]);
+    float2 l2_1 = nested_mat_cx2_.am[0]._0;
     int _expr24 = idx_1;
-    float2 unnamed_10 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr24);
-    float unnamed_11 = nested_mat_cx2_.am[0]._0.y;
+    float2 l3_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr24);
+    float l4_1 = nested_mat_cx2_.am[0]._0.y;
     int _expr42 = idx_1;
-    float unnamed_12 = nested_mat_cx2_.am[0]._0[_expr42];
+    float l5_1 = nested_mat_cx2_.am[0]._0[_expr42];
     int _expr49 = idx_1;
-    float unnamed_13 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr49).y;
+    float l6_1 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr49).y;
     int _expr58 = idx_1;
     int _expr60 = idx_1;
-    float unnamed_14 = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr58)[_expr60];
+    float l7_ = __get_col_of_mat4x2(nested_mat_cx2_.am[0], _expr58)[_expr60];
     t_1 = ConstructMatCx2InArray((float4x2[2])0);
     int _expr66 = idx_1;
     idx_1 = (_expr66 + 1);
diff --git a/tests/out/hlsl/array-in-ctor.hlsl b/tests/out/hlsl/array-in-ctor.hlsl
index edaa954737..e184339e99 100644
--- a/tests/out/hlsl/array-in-ctor.hlsl
+++ b/tests/out/hlsl/array-in-ctor.hlsl
@@ -20,5 +20,5 @@ Ah ConstructAh(float arg0[2]) {
 [numthreads(1, 1, 1)]
 void cs_main()
 {
-    Ah unnamed = ConstructAh(Constructarray2_float_(asfloat(ah.Load(0+0)), asfloat(ah.Load(0+4))));
+    Ah ah_1 = ConstructAh(Constructarray2_float_(asfloat(ah.Load(0+0)), asfloat(ah.Load(0+4))));
 }
diff --git a/tests/out/hlsl/atomicOps.hlsl b/tests/out/hlsl/atomicOps.hlsl
index f6322cd92f..a45afb1a88 100644
--- a/tests/out/hlsl/atomicOps.hlsl
+++ b/tests/out/hlsl/atomicOps.hlsl
@@ -29,14 +29,14 @@ void cs_main(uint3 id : SV_GroupThreadID, uint3 __local_invocation_id : SV_Group
     workgroup_struct.atomic_scalar = 1u;
     workgroup_struct.atomic_arr[1] = 1;
     GroupMemoryBarrierWithGroupSync();
-    uint unnamed = asuint(storage_atomic_scalar.Load(0));
-    int unnamed_1 = asint(storage_atomic_arr.Load(4));
-    uint unnamed_2 = asuint(storage_struct.Load(0));
-    int unnamed_3 = asint(storage_struct.Load(4+4));
-    uint unnamed_4 = workgroup_atomic_scalar;
-    int unnamed_5 = workgroup_atomic_arr[1];
-    uint unnamed_6 = workgroup_struct.atomic_scalar;
-    int unnamed_7 = workgroup_struct.atomic_arr[1];
+    uint l0_ = asuint(storage_atomic_scalar.Load(0));
+    int l1_ = asint(storage_atomic_arr.Load(4));
+    uint l2_ = asuint(storage_struct.Load(0));
+    int l3_ = asint(storage_struct.Load(4+4));
+    uint l4_ = workgroup_atomic_scalar;
+    int l5_ = workgroup_atomic_arr[1];
+    uint l6_ = workgroup_struct.atomic_scalar;
+    int l7_ = workgroup_struct.atomic_arr[1];
     GroupMemoryBarrierWithGroupSync();
     uint _e59; storage_atomic_scalar.InterlockedAdd(0, 1u, _e59);
     int _e64; storage_atomic_arr.InterlockedAdd(4, 1, _e64);
diff --git a/tests/out/hlsl/break-if.hlsl b/tests/out/hlsl/break-if.hlsl
index fc91096a98..5a3a453e55 100644
--- a/tests/out/hlsl/break-if.hlsl
+++ b/tests/out/hlsl/break-if.hlsl
@@ -25,8 +25,7 @@ void breakIfEmptyBody(bool a)
             bool _expr2 = b;
             c = (a != _expr2);
             bool _expr5 = c;
-            bool unnamed = (a == _expr5);
-            if (unnamed) {
+            if ((a == _expr5)) {
                 break;
             }
         }
@@ -44,8 +43,7 @@ void breakIf(bool a_1)
     while(true) {
         if (!loop_init_2) {
             bool _expr5 = e;
-            bool unnamed_1 = (a_1 == _expr5);
-            if (unnamed_1) {
+            if ((a_1 == _expr5)) {
                 break;
             }
         }
diff --git a/tests/out/hlsl/do-while.hlsl b/tests/out/hlsl/do-while.hlsl
index 17341a6cfc..9f6a1854c9 100644
--- a/tests/out/hlsl/do-while.hlsl
+++ b/tests/out/hlsl/do-while.hlsl
@@ -5,8 +5,7 @@ void fb1_(inout bool cond)
     while(true) {
         if (!loop_init) {
             bool _expr6 = cond;
-            bool unnamed = !(_expr6);
-            if (unnamed) {
+            if (!(_expr6)) {
                 break;
             }
         }
diff --git a/tests/out/hlsl/globals.hlsl b/tests/out/hlsl/globals.hlsl
index 9d7eb2e99d..b0b92f2069 100644
--- a/tests/out/hlsl/globals.hlsl
+++ b/tests/out/hlsl/globals.hlsl
@@ -89,13 +89,13 @@ void test_msl_packed_vec3_()
     int _expr17 = idx;
     alignment.Store(_expr17*4+0, asuint(3.0));
     FooStruct data = ConstructFooStruct(asfloat(alignment.Load3(0)), asfloat(alignment.Load(12)));
-    float3 unnamed = data.v3_;
-    float2 unnamed_1 = data.v3_.zx;
+    float3 l0_ = data.v3_;
+    float2 l1_ = data.v3_.zx;
     test_msl_packed_vec3_as_arg(data.v3_);
-    float3 unnamed_2 = mul((float3x3)0, data.v3_);
-    float3 unnamed_3 = mul(data.v3_, (float3x3)0);
-    float3 unnamed_4 = (data.v3_ * 2.0);
-    float3 unnamed_5 = (2.0 * data.v3_);
+    float3 mvm0_ = mul((float3x3)0, data.v3_);
+    float3 mvm1_ = mul(data.v3_, (float3x3)0);
+    float3 svm0_ = (data.v3_ * 2.0);
+    float3 svm1_ = (2.0 * data.v3_);
 }
 
 uint NagaBufferLength(ByteAddressBuffer buffer)
diff --git a/tests/out/hlsl/operators.hlsl b/tests/out/hlsl/operators.hlsl
index abfbec61ee..c2a92a967d 100644
--- a/tests/out/hlsl/operators.hlsl
+++ b/tests/out/hlsl/operators.hlsl
@@ -70,174 +70,176 @@ float constructors()
     Foo foo = (Foo)0;
 
     foo = ConstructFoo((1.0).xxxx, 1);
-    float2x2 mat2comp = float2x2(float2(1.0, 0.0), float2(0.0, 1.0));
-    float4x4 mat4comp = float4x4(float4(1.0, 0.0, 0.0, 0.0), float4(0.0, 1.0, 0.0, 0.0), float4(0.0, 0.0, 1.0, 0.0), float4(0.0, 0.0, 0.0, 1.0));
-    uint2 unnamed = (0u).xx;
-    float2x2 unnamed_1 = float2x2((0.0).xx, (0.0).xx);
-    int unnamed_2[4] = Constructarray4_int_(0, 1, 2, 3);
-    bool unnamed_3 = bool((bool)0);
-    int unnamed_4 = int((int)0);
-    uint unnamed_5 = uint((uint)0);
-    float unnamed_6 = float((float)0);
-    uint2 unnamed_7 = uint2((uint2)0);
-    float2x3 unnamed_8 = float2x3((float2x3)0);
-    uint2 unnamed_9 = asuint((uint2)0);
-    float2x3 unnamed_10 = asfloat((float2x3)0);
+    float2x2 m0_ = float2x2(float2(1.0, 0.0), float2(0.0, 1.0));
+    float4x4 m1_1 = float4x4(float4(1.0, 0.0, 0.0, 0.0), float4(0.0, 1.0, 0.0, 0.0), float4(0.0, 0.0, 1.0, 0.0), float4(0.0, 0.0, 0.0, 1.0));
+    uint2 cit0_ = (0u).xx;
+    float2x2 cit1_ = float2x2((0.0).xx, (0.0).xx);
+    int cit2_[4] = Constructarray4_int_(0, 1, 2, 3);
+    bool ic0_ = bool((bool)0);
+    int ic1_ = int((int)0);
+    uint ic2_ = uint((uint)0);
+    float ic3_ = float((float)0);
+    uint2 ic4_ = uint2((uint2)0);
+    float2x3 ic5_ = float2x3((float2x3)0);
+    uint2 ic6_ = asuint((uint2)0);
+    float2x3 ic7_ = asfloat((float2x3)0);
     float _expr71 = foo.a.x;
     return _expr71;
 }
 
 void logical()
 {
-    bool unnamed_11 = !(true);
-    bool2 unnamed_12 = !((true).xx);
-    bool unnamed_13 = (true || false);
-    bool unnamed_14 = (true && false);
-    bool unnamed_15 = (true | false);
-    bool3 unnamed_16 = ((true).xxx | (false).xxx);
-    bool unnamed_17 = (true & false);
-    bool4 unnamed_18 = ((true).xxxx & (false).xxxx);
+    bool neg0_ = !(true);
+    bool2 neg1_ = !((true).xx);
+    bool or_ = (true || false);
+    bool and_ = (true && false);
+    bool bitwise_or0_ = (true | false);
+    bool3 bitwise_or1_ = ((true).xxx | (false).xxx);
+    bool bitwise_and0_ = (true & false);
+    bool4 bitwise_and1_ = ((true).xxxx & (false).xxxx);
 }
 
 void arithmetic()
 {
-    int2 unnamed_19 = -((1).xx);
-    float2 unnamed_20 = -((1.0).xx);
-    int unnamed_21 = (2 + 1);
-    uint unnamed_22 = (2u + 1u);
-    float unnamed_23 = (2.0 + 1.0);
-    int2 unnamed_24 = ((2).xx + (1).xx);
-    uint3 unnamed_25 = ((2u).xxx + (1u).xxx);
-    float4 unnamed_26 = ((2.0).xxxx + (1.0).xxxx);
-    int unnamed_27 = (2 - 1);
-    uint unnamed_28 = (2u - 1u);
-    float unnamed_29 = (2.0 - 1.0);
-    int2 unnamed_30 = ((2).xx - (1).xx);
-    uint3 unnamed_31 = ((2u).xxx - (1u).xxx);
-    float4 unnamed_32 = ((2.0).xxxx - (1.0).xxxx);
-    int unnamed_33 = (2 * 1);
-    uint unnamed_34 = (2u * 1u);
-    float unnamed_35 = (2.0 * 1.0);
-    int2 unnamed_36 = ((2).xx * (1).xx);
-    uint3 unnamed_37 = ((2u).xxx * (1u).xxx);
-    float4 unnamed_38 = ((2.0).xxxx * (1.0).xxxx);
-    int unnamed_39 = (2 / 1);
-    uint unnamed_40 = (2u / 1u);
-    float unnamed_41 = (2.0 / 1.0);
-    int2 unnamed_42 = ((2).xx / (1).xx);
-    uint3 unnamed_43 = ((2u).xxx / (1u).xxx);
-    float4 unnamed_44 = ((2.0).xxxx / (1.0).xxxx);
-    int unnamed_45 = (2 % 1);
-    uint unnamed_46 = (2u % 1u);
-    float unnamed_47 = fmod(2.0, 1.0);
-    int2 unnamed_48 = ((2).xx % (1).xx);
-    uint3 unnamed_49 = ((2u).xxx % (1u).xxx);
-    float4 unnamed_50 = fmod((2.0).xxxx, (1.0).xxxx);
-    int2 unnamed_51 = ((2).xx + (1).xx);
-    int2 unnamed_52 = ((2).xx + (1).xx);
-    uint2 unnamed_53 = ((2u).xx + (1u).xx);
-    uint2 unnamed_54 = ((2u).xx + (1u).xx);
-    float2 unnamed_55 = ((2.0).xx + (1.0).xx);
-    float2 unnamed_56 = ((2.0).xx + (1.0).xx);
-    int2 unnamed_57 = ((2).xx - (1).xx);
-    int2 unnamed_58 = ((2).xx - (1).xx);
-    uint2 unnamed_59 = ((2u).xx - (1u).xx);
-    uint2 unnamed_60 = ((2u).xx - (1u).xx);
-    float2 unnamed_61 = ((2.0).xx - (1.0).xx);
-    float2 unnamed_62 = ((2.0).xx - (1.0).xx);
-    int2 unnamed_63 = ((2).xx * 1);
-    int2 unnamed_64 = (2 * (1).xx);
-    uint2 unnamed_65 = ((2u).xx * 1u);
-    uint2 unnamed_66 = (2u * (1u).xx);
-    float2 unnamed_67 = ((2.0).xx * 1.0);
-    float2 unnamed_68 = (2.0 * (1.0).xx);
-    int2 unnamed_69 = ((2).xx / (1).xx);
-    int2 unnamed_70 = ((2).xx / (1).xx);
-    uint2 unnamed_71 = ((2u).xx / (1u).xx);
-    uint2 unnamed_72 = ((2u).xx / (1u).xx);
-    float2 unnamed_73 = ((2.0).xx / (1.0).xx);
-    float2 unnamed_74 = ((2.0).xx / (1.0).xx);
-    int2 unnamed_75 = ((2).xx % (1).xx);
-    int2 unnamed_76 = ((2).xx % (1).xx);
-    uint2 unnamed_77 = ((2u).xx % (1u).xx);
-    uint2 unnamed_78 = ((2u).xx % (1u).xx);
-    float2 unnamed_79 = fmod((2.0).xx, (1.0).xx);
-    float2 unnamed_80 = fmod((2.0).xx, (1.0).xx);
-    float3x3 unnamed_81 = ((float3x3)0 + (float3x3)0);
-    float3x3 unnamed_82 = ((float3x3)0 - (float3x3)0);
-    float3x3 unnamed_83 = mul(1.0, (float3x3)0);
-    float3x3 unnamed_84 = mul((float3x3)0, 2.0);
-    float3 unnamed_85 = mul((1.0).xxxx, (float4x3)0);
-    float4 unnamed_86 = mul((float4x3)0, (2.0).xxx);
-    float3x3 unnamed_87 = mul((float3x4)0, (float4x3)0);
+    int2 neg1_1 = -((1).xx);
+    float2 neg2_ = -((1.0).xx);
+    int add0_ = (2 + 1);
+    uint add1_ = (2u + 1u);
+    float add2_ = (2.0 + 1.0);
+    int2 add3_ = ((2).xx + (1).xx);
+    uint3 add4_ = ((2u).xxx + (1u).xxx);
+    float4 add5_ = ((2.0).xxxx + (1.0).xxxx);
+    int sub0_ = (2 - 1);
+    uint sub1_ = (2u - 1u);
+    float sub2_ = (2.0 - 1.0);
+    int2 sub3_ = ((2).xx - (1).xx);
+    uint3 sub4_ = ((2u).xxx - (1u).xxx);
+    float4 sub5_ = ((2.0).xxxx - (1.0).xxxx);
+    int mul0_ = (2 * 1);
+    uint mul1_ = (2u * 1u);
+    float mul2_ = (2.0 * 1.0);
+    int2 mul3_ = ((2).xx * (1).xx);
+    uint3 mul4_ = ((2u).xxx * (1u).xxx);
+    float4 mul5_ = ((2.0).xxxx * (1.0).xxxx);
+    int div0_ = (2 / 1);
+    uint div1_ = (2u / 1u);
+    float div2_ = (2.0 / 1.0);
+    int2 div3_ = ((2).xx / (1).xx);
+    uint3 div4_ = ((2u).xxx / (1u).xxx);
+    float4 div5_ = ((2.0).xxxx / (1.0).xxxx);
+    int rem0_ = (2 % 1);
+    uint rem1_ = (2u % 1u);
+    float rem2_ = fmod(2.0, 1.0);
+    int2 rem3_ = ((2).xx % (1).xx);
+    uint3 rem4_ = ((2u).xxx % (1u).xxx);
+    float4 rem5_ = fmod((2.0).xxxx, (1.0).xxxx);
+    {
+        int2 add0_1 = ((2).xx + (1).xx);
+        int2 add1_1 = ((2).xx + (1).xx);
+        uint2 add2_1 = ((2u).xx + (1u).xx);
+        uint2 add3_1 = ((2u).xx + (1u).xx);
+        float2 add4_1 = ((2.0).xx + (1.0).xx);
+        float2 add5_1 = ((2.0).xx + (1.0).xx);
+        int2 sub0_1 = ((2).xx - (1).xx);
+        int2 sub1_1 = ((2).xx - (1).xx);
+        uint2 sub2_1 = ((2u).xx - (1u).xx);
+        uint2 sub3_1 = ((2u).xx - (1u).xx);
+        float2 sub4_1 = ((2.0).xx - (1.0).xx);
+        float2 sub5_1 = ((2.0).xx - (1.0).xx);
+        int2 mul0_1 = ((2).xx * 1);
+        int2 mul1_1 = (2 * (1).xx);
+        uint2 mul2_1 = ((2u).xx * 1u);
+        uint2 mul3_1 = (2u * (1u).xx);
+        float2 mul4_1 = ((2.0).xx * 1.0);
+        float2 mul5_1 = (2.0 * (1.0).xx);
+        int2 div0_1 = ((2).xx / (1).xx);
+        int2 div1_1 = ((2).xx / (1).xx);
+        uint2 div2_1 = ((2u).xx / (1u).xx);
+        uint2 div3_1 = ((2u).xx / (1u).xx);
+        float2 div4_1 = ((2.0).xx / (1.0).xx);
+        float2 div5_1 = ((2.0).xx / (1.0).xx);
+        int2 rem0_1 = ((2).xx % (1).xx);
+        int2 rem1_1 = ((2).xx % (1).xx);
+        uint2 rem2_1 = ((2u).xx % (1u).xx);
+        uint2 rem3_1 = ((2u).xx % (1u).xx);
+        float2 rem4_1 = fmod((2.0).xx, (1.0).xx);
+        float2 rem5_1 = fmod((2.0).xx, (1.0).xx);
+    }
+    float3x3 add = ((float3x3)0 + (float3x3)0);
+    float3x3 sub = ((float3x3)0 - (float3x3)0);
+    float3x3 mul_scalar0_ = mul(1.0, (float3x3)0);
+    float3x3 mul_scalar1_ = mul((float3x3)0, 2.0);
+    float3 mul_vector0_ = mul((1.0).xxxx, (float4x3)0);
+    float4 mul_vector1_ = mul((float4x3)0, (2.0).xxx);
+    float3x3 mul_ = mul((float3x4)0, (float4x3)0);
 }
 
 void bit()
 {
-    int unnamed_88 = ~(1);
-    uint unnamed_89 = ~(1u);
-    int2 unnamed_90 = ~((1).xx);
-    uint3 unnamed_91 = ~((1u).xxx);
-    int unnamed_92 = (2 | 1);
-    uint unnamed_93 = (2u | 1u);
-    int2 unnamed_94 = ((2).xx | (1).xx);
-    uint3 unnamed_95 = ((2u).xxx | (1u).xxx);
-    int unnamed_96 = (2 & 1);
-    uint unnamed_97 = (2u & 1u);
-    int2 unnamed_98 = ((2).xx & (1).xx);
-    uint3 unnamed_99 = ((2u).xxx & (1u).xxx);
-    int unnamed_100 = (2 ^ 1);
-    uint unnamed_101 = (2u ^ 1u);
-    int2 unnamed_102 = ((2).xx ^ (1).xx);
-    uint3 unnamed_103 = ((2u).xxx ^ (1u).xxx);
-    int unnamed_104 = (2 << 1u);
-    uint unnamed_105 = (2u << 1u);
-    int2 unnamed_106 = ((2).xx << (1u).xx);
-    uint3 unnamed_107 = ((2u).xxx << (1u).xxx);
-    int unnamed_108 = (2 >> 1u);
-    uint unnamed_109 = (2u >> 1u);
-    int2 unnamed_110 = ((2).xx >> (1u).xx);
-    uint3 unnamed_111 = ((2u).xxx >> (1u).xxx);
+    int flip0_ = ~(1);
+    uint flip1_ = ~(1u);
+    int2 flip2_ = ~((1).xx);
+    uint3 flip3_ = ~((1u).xxx);
+    int or0_ = (2 | 1);
+    uint or1_ = (2u | 1u);
+    int2 or2_ = ((2).xx | (1).xx);
+    uint3 or3_ = ((2u).xxx | (1u).xxx);
+    int and0_ = (2 & 1);
+    uint and1_ = (2u & 1u);
+    int2 and2_ = ((2).xx & (1).xx);
+    uint3 and3_ = ((2u).xxx & (1u).xxx);
+    int xor0_ = (2 ^ 1);
+    uint xor1_ = (2u ^ 1u);
+    int2 xor2_ = ((2).xx ^ (1).xx);
+    uint3 xor3_ = ((2u).xxx ^ (1u).xxx);
+    int shl0_ = (2 << 1u);
+    uint shl1_ = (2u << 1u);
+    int2 shl2_ = ((2).xx << (1u).xx);
+    uint3 shl3_ = ((2u).xxx << (1u).xxx);
+    int shr0_ = (2 >> 1u);
+    uint shr1_ = (2u >> 1u);
+    int2 shr2_ = ((2).xx >> (1u).xx);
+    uint3 shr3_ = ((2u).xxx >> (1u).xxx);
 }
 
 void comparison()
 {
-    bool unnamed_112 = (2 == 1);
-    bool unnamed_113 = (2u == 1u);
-    bool unnamed_114 = (2.0 == 1.0);
-    bool2 unnamed_115 = ((2).xx == (1).xx);
-    bool3 unnamed_116 = ((2u).xxx == (1u).xxx);
-    bool4 unnamed_117 = ((2.0).xxxx == (1.0).xxxx);
-    bool unnamed_118 = (2 != 1);
-    bool unnamed_119 = (2u != 1u);
-    bool unnamed_120 = (2.0 != 1.0);
-    bool2 unnamed_121 = ((2).xx != (1).xx);
-    bool3 unnamed_122 = ((2u).xxx != (1u).xxx);
-    bool4 unnamed_123 = ((2.0).xxxx != (1.0).xxxx);
-    bool unnamed_124 = (2 < 1);
-    bool unnamed_125 = (2u < 1u);
-    bool unnamed_126 = (2.0 < 1.0);
-    bool2 unnamed_127 = ((2).xx < (1).xx);
-    bool3 unnamed_128 = ((2u).xxx < (1u).xxx);
-    bool4 unnamed_129 = ((2.0).xxxx < (1.0).xxxx);
-    bool unnamed_130 = (2 <= 1);
-    bool unnamed_131 = (2u <= 1u);
-    bool unnamed_132 = (2.0 <= 1.0);
-    bool2 unnamed_133 = ((2).xx <= (1).xx);
-    bool3 unnamed_134 = ((2u).xxx <= (1u).xxx);
-    bool4 unnamed_135 = ((2.0).xxxx <= (1.0).xxxx);
-    bool unnamed_136 = (2 > 1);
-    bool unnamed_137 = (2u > 1u);
-    bool unnamed_138 = (2.0 > 1.0);
-    bool2 unnamed_139 = ((2).xx > (1).xx);
-    bool3 unnamed_140 = ((2u).xxx > (1u).xxx);
-    bool4 unnamed_141 = ((2.0).xxxx > (1.0).xxxx);
-    bool unnamed_142 = (2 >= 1);
-    bool unnamed_143 = (2u >= 1u);
-    bool unnamed_144 = (2.0 >= 1.0);
-    bool2 unnamed_145 = ((2).xx >= (1).xx);
-    bool3 unnamed_146 = ((2u).xxx >= (1u).xxx);
-    bool4 unnamed_147 = ((2.0).xxxx >= (1.0).xxxx);
+    bool eq0_ = (2 == 1);
+    bool eq1_ = (2u == 1u);
+    bool eq2_ = (2.0 == 1.0);
+    bool2 eq3_ = ((2).xx == (1).xx);
+    bool3 eq4_ = ((2u).xxx == (1u).xxx);
+    bool4 eq5_ = ((2.0).xxxx == (1.0).xxxx);
+    bool neq0_ = (2 != 1);
+    bool neq1_ = (2u != 1u);
+    bool neq2_ = (2.0 != 1.0);
+    bool2 neq3_ = ((2).xx != (1).xx);
+    bool3 neq4_ = ((2u).xxx != (1u).xxx);
+    bool4 neq5_ = ((2.0).xxxx != (1.0).xxxx);
+    bool lt0_ = (2 < 1);
+    bool lt1_ = (2u < 1u);
+    bool lt2_ = (2.0 < 1.0);
+    bool2 lt3_ = ((2).xx < (1).xx);
+    bool3 lt4_ = ((2u).xxx < (1u).xxx);
+    bool4 lt5_ = ((2.0).xxxx < (1.0).xxxx);
+    bool lte0_ = (2 <= 1);
+    bool lte1_ = (2u <= 1u);
+    bool lte2_ = (2.0 <= 1.0);
+    bool2 lte3_ = ((2).xx <= (1).xx);
+    bool3 lte4_ = ((2u).xxx <= (1u).xxx);
+    bool4 lte5_ = ((2.0).xxxx <= (1.0).xxxx);
+    bool gt0_ = (2 > 1);
+    bool gt1_ = (2u > 1u);
+    bool gt2_ = (2.0 > 1.0);
+    bool2 gt3_ = ((2).xx > (1).xx);
+    bool3 gt4_ = ((2u).xxx > (1u).xxx);
+    bool4 gt5_ = ((2.0).xxxx > (1.0).xxxx);
+    bool gte0_ = (2 >= 1);
+    bool gte1_ = (2u >= 1u);
+    bool gte2_ = (2.0 >= 1.0);
+    bool2 gte3_ = ((2).xx >= (1).xx);
+    bool3 gte4_ = ((2u).xxx >= (1u).xxx);
+    bool4 gte5_ = ((2.0).xxxx >= (1.0).xxxx);
 }
 
 void assignment()
@@ -282,13 +284,13 @@ void assignment()
 
 void negation_avoids_prefix_decrement()
 {
-    int unnamed_148 = -(-2);
-    int unnamed_149 = -(-3);
-    int unnamed_150 = -(-(4));
-    int unnamed_151 = -(-(-5));
-    int unnamed_152 = -(-(-(-(6))));
-    int unnamed_153 = -(-(-(-(-7))));
-    int unnamed_154 = -(-(-(-(-8))));
+    int p1_ = -(-2);
+    int p2_ = -(-3);
+    int p3_ = -(-(4));
+    int p4_ = -(-(-5));
+    int p5_ = -(-(-(-(6))));
+    int p6_ = -(-(-(-(-7))));
+    int p7_ = -(-(-(-(-8))));
 }
 
 [numthreads(1, 1, 1)]
diff --git a/tests/out/ir/access.ron b/tests/out/ir/access.ron
index b314d9fe12..6dda26d0dc 100644
--- a/tests/out/ir/access.ron
+++ b/tests/out/ir/access.ron
@@ -779,7 +779,15 @@
                 ),
                 Literal(F32(40.0)),
             ],
-            named_expressions: {},
+            named_expressions: {
+                8: "l0",
+                13: "l1",
+                18: "l2",
+                25: "l3",
+                32: "l4",
+                39: "l5",
+                46: "l6",
+            },
             body: [
                 Store(
                     pointer: 2,
@@ -1350,7 +1358,16 @@
                 ),
                 Literal(F32(40.0)),
             ],
-            named_expressions: {},
+            named_expressions: {
+                8: "l0",
+                13: "l1",
+                20: "l2",
+                27: "l3",
+                36: "l4",
+                45: "l5",
+                54: "l6",
+                63: "l7",
+            },
             body: [
                 Store(
                     pointer: 2,
diff --git a/tests/out/msl/access.msl b/tests/out/msl/access.msl
index 2e9dc72f0e..1e83ae7c3b 100644
--- a/tests/out/msl/access.msl
+++ b/tests/out/msl/access.msl
@@ -68,18 +68,18 @@ void test_matrix_within_struct_accesses(
     idx = 1;
     int _e2 = idx;
     idx = _e2 - 1;
-    metal::float3x2 unnamed = baz.m;
-    metal::float2 unnamed_1 = baz.m[0];
+    metal::float3x2 l0_ = baz.m;
+    metal::float2 l1_ = baz.m[0];
     int _e15 = idx;
-    metal::float2 unnamed_2 = baz.m[_e15];
-    float unnamed_3 = baz.m[0].y;
+    metal::float2 l2_ = baz.m[_e15];
+    float l3_ = baz.m[0].y;
     int _e29 = idx;
-    float unnamed_4 = baz.m[0][_e29];
+    float l4_ = baz.m[0][_e29];
     int _e34 = idx;
-    float unnamed_5 = baz.m[_e34].y;
+    float l5_ = baz.m[_e34].y;
     int _e41 = idx;
     int _e43 = idx;
-    float unnamed_6 = baz.m[_e41][_e43];
+    float l6_ = baz.m[_e41][_e43];
     t = Baz {metal::float3x2(metal::float2(1.0), metal::float2(2.0), metal::float2(3.0))};
     int _e55 = idx;
     idx = _e55 + 1;
@@ -106,19 +106,19 @@ void test_matrix_within_array_within_struct_accesses(
     idx_1 = 1;
     int _e2 = idx_1;
     idx_1 = _e2 - 1;
-    type_15 unnamed_7 = nested_mat_cx2_.am;
-    metal::float4x2 unnamed_8 = nested_mat_cx2_.am.inner[0];
-    metal::float2 unnamed_9 = nested_mat_cx2_.am.inner[0][0];
+    type_15 l0_1 = nested_mat_cx2_.am;
+    metal::float4x2 l1_1 = nested_mat_cx2_.am.inner[0];
+    metal::float2 l2_1 = nested_mat_cx2_.am.inner[0][0];
     int _e24 = idx_1;
-    metal::float2 unnamed_10 = nested_mat_cx2_.am.inner[0][_e24];
-    float unnamed_11 = nested_mat_cx2_.am.inner[0][0].y;
+    metal::float2 l3_1 = nested_mat_cx2_.am.inner[0][_e24];
+    float l4_1 = nested_mat_cx2_.am.inner[0][0].y;
     int _e42 = idx_1;
-    float unnamed_12 = nested_mat_cx2_.am.inner[0][0][_e42];
+    float l5_1 = nested_mat_cx2_.am.inner[0][0][_e42];
     int _e49 = idx_1;
-    float unnamed_13 = nested_mat_cx2_.am.inner[0][_e49].y;
+    float l6_1 = nested_mat_cx2_.am.inner[0][_e49].y;
     int _e58 = idx_1;
     int _e60 = idx_1;
-    float unnamed_14 = nested_mat_cx2_.am.inner[0][_e58][_e60];
+    float l7_ = nested_mat_cx2_.am.inner[0][_e58][_e60];
     t_1 = MatCx2InArray {type_15 {}};
     int _e66 = idx_1;
     idx_1 = _e66 + 1;
diff --git a/tests/out/msl/array-in-ctor.msl b/tests/out/msl/array-in-ctor.msl
index eab190df75..9428cb1e74 100644
--- a/tests/out/msl/array-in-ctor.msl
+++ b/tests/out/msl/array-in-ctor.msl
@@ -14,5 +14,5 @@ struct Ah {
 kernel void cs_main(
   device Ah const& ah [[user(fake0)]]
 ) {
-    Ah unnamed = ah;
+    Ah ah_1 = ah;
 }
diff --git a/tests/out/msl/atomicOps.msl b/tests/out/msl/atomicOps.msl
index feed8fb743..b7264e883d 100644
--- a/tests/out/msl/atomicOps.msl
+++ b/tests/out/msl/atomicOps.msl
@@ -43,14 +43,14 @@ kernel void cs_main(
     metal::atomic_store_explicit(&workgroup_struct.atomic_scalar, 1u, metal::memory_order_relaxed);
     metal::atomic_store_explicit(&workgroup_struct.atomic_arr.inner[1], 1, metal::memory_order_relaxed);
     metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
-    uint unnamed = metal::atomic_load_explicit(&storage_atomic_scalar, metal::memory_order_relaxed);
-    int unnamed_1 = metal::atomic_load_explicit(&storage_atomic_arr.inner[1], metal::memory_order_relaxed);
-    uint unnamed_2 = metal::atomic_load_explicit(&storage_struct.atomic_scalar, metal::memory_order_relaxed);
-    int unnamed_3 = metal::atomic_load_explicit(&storage_struct.atomic_arr.inner[1], metal::memory_order_relaxed);
-    uint unnamed_4 = metal::atomic_load_explicit(&workgroup_atomic_scalar, metal::memory_order_relaxed);
-    int unnamed_5 = metal::atomic_load_explicit(&workgroup_atomic_arr.inner[1], metal::memory_order_relaxed);
-    uint unnamed_6 = metal::atomic_load_explicit(&workgroup_struct.atomic_scalar, metal::memory_order_relaxed);
-    int unnamed_7 = metal::atomic_load_explicit(&workgroup_struct.atomic_arr.inner[1], metal::memory_order_relaxed);
+    uint l0_ = metal::atomic_load_explicit(&storage_atomic_scalar, metal::memory_order_relaxed);
+    int l1_ = metal::atomic_load_explicit(&storage_atomic_arr.inner[1], metal::memory_order_relaxed);
+    uint l2_ = metal::atomic_load_explicit(&storage_struct.atomic_scalar, metal::memory_order_relaxed);
+    int l3_ = metal::atomic_load_explicit(&storage_struct.atomic_arr.inner[1], metal::memory_order_relaxed);
+    uint l4_ = metal::atomic_load_explicit(&workgroup_atomic_scalar, metal::memory_order_relaxed);
+    int l5_ = metal::atomic_load_explicit(&workgroup_atomic_arr.inner[1], metal::memory_order_relaxed);
+    uint l6_ = metal::atomic_load_explicit(&workgroup_struct.atomic_scalar, metal::memory_order_relaxed);
+    int l7_ = metal::atomic_load_explicit(&workgroup_struct.atomic_arr.inner[1], metal::memory_order_relaxed);
     metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
     uint _e59 = metal::atomic_fetch_add_explicit(&storage_atomic_scalar, 1u, metal::memory_order_relaxed);
     int _e64 = metal::atomic_fetch_add_explicit(&storage_atomic_arr.inner[1], 1, metal::memory_order_relaxed);
diff --git a/tests/out/msl/break-if.msl b/tests/out/msl/break-if.msl
index 600cca60d8..3a6f2e9bff 100644
--- a/tests/out/msl/break-if.msl
+++ b/tests/out/msl/break-if.msl
@@ -31,7 +31,6 @@ void breakIfEmptyBody(
             bool _e2 = b;
             c = a != _e2;
             bool _e5 = c;
-            bool unnamed = a == _e5;
             if (a == c) {
                 break;
             }
@@ -50,7 +49,6 @@ void breakIf(
     while(true) {
         if (!loop_init_2) {
             bool _e5 = e;
-            bool unnamed_1 = a_1 == _e5;
             if (a_1 == e) {
                 break;
             }
diff --git a/tests/out/msl/do-while.msl b/tests/out/msl/do-while.msl
index 035965cd2e..ac2393bf7f 100644
--- a/tests/out/msl/do-while.msl
+++ b/tests/out/msl/do-while.msl
@@ -12,7 +12,6 @@ void fb1_(
     while(true) {
         if (!loop_init) {
             bool _e6 = cond;
-            bool unnamed = !(_e6);
             if (!(cond)) {
                 break;
             }
diff --git a/tests/out/msl/globals.msl b/tests/out/msl/globals.msl
index 7ebf5c9be1..786e03ea5e 100644
--- a/tests/out/msl/globals.msl
+++ b/tests/out/msl/globals.msl
@@ -50,13 +50,13 @@ void test_msl_packed_vec3_(
     int _e17 = idx;
     alignment.v3_[_e17] = 3.0;
     FooStruct data = alignment;
-    metal::float3 unnamed = data.v3_;
-    metal::float2 unnamed_1 = metal::float3(data.v3_).zx;
+    metal::float3 l0_ = data.v3_;
+    metal::float2 l1_ = metal::float3(data.v3_).zx;
     test_msl_packed_vec3_as_arg(data.v3_);
-    metal::float3 unnamed_2 = metal::float3(data.v3_) * metal::float3x3 {};
-    metal::float3 unnamed_3 = metal::float3x3 {} * metal::float3(data.v3_);
-    metal::float3 unnamed_4 = data.v3_ * 2.0;
-    metal::float3 unnamed_5 = 2.0 * data.v3_;
+    metal::float3 mvm0_ = metal::float3(data.v3_) * metal::float3x3 {};
+    metal::float3 mvm1_ = metal::float3x3 {} * metal::float3(data.v3_);
+    metal::float3 svm0_ = data.v3_ * 2.0;
+    metal::float3 svm1_ = 2.0 * data.v3_;
 }
 
 kernel void main_(
diff --git a/tests/out/msl/operators.msl b/tests/out/msl/operators.msl
index 18a3d256ca..33f13e1cb9 100644
--- a/tests/out/msl/operators.msl
+++ b/tests/out/msl/operators.msl
@@ -64,174 +64,176 @@ float constructors(
 ) {
     Foo foo = {};
     foo = Foo {metal::float4(1.0), 1};
-    metal::float2x2 mat2comp = metal::float2x2(metal::float2(1.0, 0.0), metal::float2(0.0, 1.0));
-    metal::float4x4 mat4comp = metal::float4x4(metal::float4(1.0, 0.0, 0.0, 0.0), metal::float4(0.0, 1.0, 0.0, 0.0), metal::float4(0.0, 0.0, 1.0, 0.0), metal::float4(0.0, 0.0, 0.0, 1.0));
-    metal::uint2 unnamed = metal::uint2(0u);
-    metal::float2x2 unnamed_1 = metal::float2x2(metal::float2(0.0), metal::float2(0.0));
-    type_14 unnamed_2 = type_14 {0, 1, 2, 3};
-    bool unnamed_3 = static_cast<bool>(bool {});
-    int unnamed_4 = static_cast<int>(int {});
-    uint unnamed_5 = static_cast<uint>(uint {});
-    float unnamed_6 = static_cast<float>(float {});
-    metal::uint2 unnamed_7 = static_cast<metal::uint2>(metal::uint2 {});
-    metal::float2x3 unnamed_8 = metal::float2x3(metal::float2x3 {});
-    metal::uint2 unnamed_9 = as_type<metal::uint2>(metal::uint2 {});
-    metal::float2x3 unnamed_10 = metal::float2x3(metal::float2x3 {});
+    metal::float2x2 m0_ = metal::float2x2(metal::float2(1.0, 0.0), metal::float2(0.0, 1.0));
+    metal::float4x4 m1_1 = metal::float4x4(metal::float4(1.0, 0.0, 0.0, 0.0), metal::float4(0.0, 1.0, 0.0, 0.0), metal::float4(0.0, 0.0, 1.0, 0.0), metal::float4(0.0, 0.0, 0.0, 1.0));
+    metal::uint2 cit0_ = metal::uint2(0u);
+    metal::float2x2 cit1_ = metal::float2x2(metal::float2(0.0), metal::float2(0.0));
+    type_14 cit2_ = type_14 {0, 1, 2, 3};
+    bool ic0_ = static_cast<bool>(bool {});
+    int ic1_ = static_cast<int>(int {});
+    uint ic2_ = static_cast<uint>(uint {});
+    float ic3_ = static_cast<float>(float {});
+    metal::uint2 ic4_ = static_cast<metal::uint2>(metal::uint2 {});
+    metal::float2x3 ic5_ = metal::float2x3(metal::float2x3 {});
+    metal::uint2 ic6_ = as_type<metal::uint2>(metal::uint2 {});
+    metal::float2x3 ic7_ = metal::float2x3(metal::float2x3 {});
     float _e71 = foo.a.x;
     return _e71;
 }
 
 void logical(
 ) {
-    bool unnamed_11 = !(true);
-    metal::bool2 unnamed_12 = !(metal::bool2(true));
-    bool unnamed_13 = true || false;
-    bool unnamed_14 = true && false;
-    bool unnamed_15 = true | false;
-    metal::bool3 unnamed_16 = metal::bool3(true) | metal::bool3(false);
-    bool unnamed_17 = true & false;
-    metal::bool4 unnamed_18 = metal::bool4(true) & metal::bool4(false);
+    bool neg0_ = !(true);
+    metal::bool2 neg1_ = !(metal::bool2(true));
+    bool or_ = true || false;
+    bool and_ = true && false;
+    bool bitwise_or0_ = true | false;
+    metal::bool3 bitwise_or1_ = metal::bool3(true) | metal::bool3(false);
+    bool bitwise_and0_ = true & false;
+    metal::bool4 bitwise_and1_ = metal::bool4(true) & metal::bool4(false);
 }
 
 void arithmetic(
 ) {
-    metal::int2 unnamed_19 = -(metal::int2(1));
-    metal::float2 unnamed_20 = -(metal::float2(1.0));
-    int unnamed_21 = 2 + 1;
-    uint unnamed_22 = 2u + 1u;
-    float unnamed_23 = 2.0 + 1.0;
-    metal::int2 unnamed_24 = metal::int2(2) + metal::int2(1);
-    metal::uint3 unnamed_25 = metal::uint3(2u) + metal::uint3(1u);
-    metal::float4 unnamed_26 = metal::float4(2.0) + metal::float4(1.0);
-    int unnamed_27 = 2 - 1;
-    uint unnamed_28 = 2u - 1u;
-    float unnamed_29 = 2.0 - 1.0;
-    metal::int2 unnamed_30 = metal::int2(2) - metal::int2(1);
-    metal::uint3 unnamed_31 = metal::uint3(2u) - metal::uint3(1u);
-    metal::float4 unnamed_32 = metal::float4(2.0) - metal::float4(1.0);
-    int unnamed_33 = 2 * 1;
-    uint unnamed_34 = 2u * 1u;
-    float unnamed_35 = 2.0 * 1.0;
-    metal::int2 unnamed_36 = metal::int2(2) * metal::int2(1);
-    metal::uint3 unnamed_37 = metal::uint3(2u) * metal::uint3(1u);
-    metal::float4 unnamed_38 = metal::float4(2.0) * metal::float4(1.0);
-    int unnamed_39 = 2 / 1;
-    uint unnamed_40 = 2u / 1u;
-    float unnamed_41 = 2.0 / 1.0;
-    metal::int2 unnamed_42 = metal::int2(2) / metal::int2(1);
-    metal::uint3 unnamed_43 = metal::uint3(2u) / metal::uint3(1u);
-    metal::float4 unnamed_44 = metal::float4(2.0) / metal::float4(1.0);
-    int unnamed_45 = 2 % 1;
-    uint unnamed_46 = 2u % 1u;
-    float unnamed_47 = metal::fmod(2.0, 1.0);
-    metal::int2 unnamed_48 = metal::int2(2) % metal::int2(1);
-    metal::uint3 unnamed_49 = metal::uint3(2u) % metal::uint3(1u);
-    metal::float4 unnamed_50 = metal::fmod(metal::float4(2.0), metal::float4(1.0));
-    metal::int2 unnamed_51 = metal::int2(2) + metal::int2(1);
-    metal::int2 unnamed_52 = metal::int2(2) + metal::int2(1);
-    metal::uint2 unnamed_53 = metal::uint2(2u) + metal::uint2(1u);
-    metal::uint2 unnamed_54 = metal::uint2(2u) + metal::uint2(1u);
-    metal::float2 unnamed_55 = metal::float2(2.0) + metal::float2(1.0);
-    metal::float2 unnamed_56 = metal::float2(2.0) + metal::float2(1.0);
-    metal::int2 unnamed_57 = metal::int2(2) - metal::int2(1);
-    metal::int2 unnamed_58 = metal::int2(2) - metal::int2(1);
-    metal::uint2 unnamed_59 = metal::uint2(2u) - metal::uint2(1u);
-    metal::uint2 unnamed_60 = metal::uint2(2u) - metal::uint2(1u);
-    metal::float2 unnamed_61 = metal::float2(2.0) - metal::float2(1.0);
-    metal::float2 unnamed_62 = metal::float2(2.0) - metal::float2(1.0);
-    metal::int2 unnamed_63 = metal::int2(2) * 1;
-    metal::int2 unnamed_64 = 2 * metal::int2(1);
-    metal::uint2 unnamed_65 = metal::uint2(2u) * 1u;
-    metal::uint2 unnamed_66 = 2u * metal::uint2(1u);
-    metal::float2 unnamed_67 = metal::float2(2.0) * 1.0;
-    metal::float2 unnamed_68 = 2.0 * metal::float2(1.0);
-    metal::int2 unnamed_69 = metal::int2(2) / metal::int2(1);
-    metal::int2 unnamed_70 = metal::int2(2) / metal::int2(1);
-    metal::uint2 unnamed_71 = metal::uint2(2u) / metal::uint2(1u);
-    metal::uint2 unnamed_72 = metal::uint2(2u) / metal::uint2(1u);
-    metal::float2 unnamed_73 = metal::float2(2.0) / metal::float2(1.0);
-    metal::float2 unnamed_74 = metal::float2(2.0) / metal::float2(1.0);
-    metal::int2 unnamed_75 = metal::int2(2) % metal::int2(1);
-    metal::int2 unnamed_76 = metal::int2(2) % metal::int2(1);
-    metal::uint2 unnamed_77 = metal::uint2(2u) % metal::uint2(1u);
-    metal::uint2 unnamed_78 = metal::uint2(2u) % metal::uint2(1u);
-    metal::float2 unnamed_79 = metal::fmod(metal::float2(2.0), metal::float2(1.0));
-    metal::float2 unnamed_80 = metal::fmod(metal::float2(2.0), metal::float2(1.0));
-    metal::float3x3 unnamed_81 = metal::float3x3 {} + metal::float3x3 {};
-    metal::float3x3 unnamed_82 = metal::float3x3 {} - metal::float3x3 {};
-    metal::float3x3 unnamed_83 = metal::float3x3 {} * 1.0;
-    metal::float3x3 unnamed_84 = 2.0 * metal::float3x3 {};
-    metal::float3 unnamed_85 = metal::float4x3 {} * metal::float4(1.0);
-    metal::float4 unnamed_86 = metal::float3(2.0) * metal::float4x3 {};
-    metal::float3x3 unnamed_87 = metal::float4x3 {} * metal::float3x4 {};
+    metal::int2 neg1_1 = -(metal::int2(1));
+    metal::float2 neg2_ = -(metal::float2(1.0));
+    int add0_ = 2 + 1;
+    uint add1_ = 2u + 1u;
+    float add2_ = 2.0 + 1.0;
+    metal::int2 add3_ = metal::int2(2) + metal::int2(1);
+    metal::uint3 add4_ = metal::uint3(2u) + metal::uint3(1u);
+    metal::float4 add5_ = metal::float4(2.0) + metal::float4(1.0);
+    int sub0_ = 2 - 1;
+    uint sub1_ = 2u - 1u;
+    float sub2_ = 2.0 - 1.0;
+    metal::int2 sub3_ = metal::int2(2) - metal::int2(1);
+    metal::uint3 sub4_ = metal::uint3(2u) - metal::uint3(1u);
+    metal::float4 sub5_ = metal::float4(2.0) - metal::float4(1.0);
+    int mul0_ = 2 * 1;
+    uint mul1_ = 2u * 1u;
+    float mul2_ = 2.0 * 1.0;
+    metal::int2 mul3_ = metal::int2(2) * metal::int2(1);
+    metal::uint3 mul4_ = metal::uint3(2u) * metal::uint3(1u);
+    metal::float4 mul5_ = metal::float4(2.0) * metal::float4(1.0);
+    int div0_ = 2 / 1;
+    uint div1_ = 2u / 1u;
+    float div2_ = 2.0 / 1.0;
+    metal::int2 div3_ = metal::int2(2) / metal::int2(1);
+    metal::uint3 div4_ = metal::uint3(2u) / metal::uint3(1u);
+    metal::float4 div5_ = metal::float4(2.0) / metal::float4(1.0);
+    int rem0_ = 2 % 1;
+    uint rem1_ = 2u % 1u;
+    float rem2_ = metal::fmod(2.0, 1.0);
+    metal::int2 rem3_ = metal::int2(2) % metal::int2(1);
+    metal::uint3 rem4_ = metal::uint3(2u) % metal::uint3(1u);
+    metal::float4 rem5_ = metal::fmod(metal::float4(2.0), metal::float4(1.0));
+    {
+        metal::int2 add0_1 = metal::int2(2) + metal::int2(1);
+        metal::int2 add1_1 = metal::int2(2) + metal::int2(1);
+        metal::uint2 add2_1 = metal::uint2(2u) + metal::uint2(1u);
+        metal::uint2 add3_1 = metal::uint2(2u) + metal::uint2(1u);
+        metal::float2 add4_1 = metal::float2(2.0) + metal::float2(1.0);
+        metal::float2 add5_1 = metal::float2(2.0) + metal::float2(1.0);
+        metal::int2 sub0_1 = metal::int2(2) - metal::int2(1);
+        metal::int2 sub1_1 = metal::int2(2) - metal::int2(1);
+        metal::uint2 sub2_1 = metal::uint2(2u) - metal::uint2(1u);
+        metal::uint2 sub3_1 = metal::uint2(2u) - metal::uint2(1u);
+        metal::float2 sub4_1 = metal::float2(2.0) - metal::float2(1.0);
+        metal::float2 sub5_1 = metal::float2(2.0) - metal::float2(1.0);
+        metal::int2 mul0_1 = metal::int2(2) * 1;
+        metal::int2 mul1_1 = 2 * metal::int2(1);
+        metal::uint2 mul2_1 = metal::uint2(2u) * 1u;
+        metal::uint2 mul3_1 = 2u * metal::uint2(1u);
+        metal::float2 mul4_1 = metal::float2(2.0) * 1.0;
+        metal::float2 mul5_1 = 2.0 * metal::float2(1.0);
+        metal::int2 div0_1 = metal::int2(2) / metal::int2(1);
+        metal::int2 div1_1 = metal::int2(2) / metal::int2(1);
+        metal::uint2 div2_1 = metal::uint2(2u) / metal::uint2(1u);
+        metal::uint2 div3_1 = metal::uint2(2u) / metal::uint2(1u);
+        metal::float2 div4_1 = metal::float2(2.0) / metal::float2(1.0);
+        metal::float2 div5_1 = metal::float2(2.0) / metal::float2(1.0);
+        metal::int2 rem0_1 = metal::int2(2) % metal::int2(1);
+        metal::int2 rem1_1 = metal::int2(2) % metal::int2(1);
+        metal::uint2 rem2_1 = metal::uint2(2u) % metal::uint2(1u);
+        metal::uint2 rem3_1 = metal::uint2(2u) % metal::uint2(1u);
+        metal::float2 rem4_1 = metal::fmod(metal::float2(2.0), metal::float2(1.0));
+        metal::float2 rem5_1 = metal::fmod(metal::float2(2.0), metal::float2(1.0));
+    }
+    metal::float3x3 add = metal::float3x3 {} + metal::float3x3 {};
+    metal::float3x3 sub = metal::float3x3 {} - metal::float3x3 {};
+    metal::float3x3 mul_scalar0_ = metal::float3x3 {} * 1.0;
+    metal::float3x3 mul_scalar1_ = 2.0 * metal::float3x3 {};
+    metal::float3 mul_vector0_ = metal::float4x3 {} * metal::float4(1.0);
+    metal::float4 mul_vector1_ = metal::float3(2.0) * metal::float4x3 {};
+    metal::float3x3 mul = metal::float4x3 {} * metal::float3x4 {};
 }
 
 void bit(
 ) {
-    int unnamed_88 = ~(1);
-    uint unnamed_89 = ~(1u);
-    metal::int2 unnamed_90 = ~(metal::int2(1));
-    metal::uint3 unnamed_91 = ~(metal::uint3(1u));
-    int unnamed_92 = 2 | 1;
-    uint unnamed_93 = 2u | 1u;
-    metal::int2 unnamed_94 = metal::int2(2) | metal::int2(1);
-    metal::uint3 unnamed_95 = metal::uint3(2u) | metal::uint3(1u);
-    int unnamed_96 = 2 & 1;
-    uint unnamed_97 = 2u & 1u;
-    metal::int2 unnamed_98 = metal::int2(2) & metal::int2(1);
-    metal::uint3 unnamed_99 = metal::uint3(2u) & metal::uint3(1u);
-    int unnamed_100 = 2 ^ 1;
-    uint unnamed_101 = 2u ^ 1u;
-    metal::int2 unnamed_102 = metal::int2(2) ^ metal::int2(1);
-    metal::uint3 unnamed_103 = metal::uint3(2u) ^ metal::uint3(1u);
-    int unnamed_104 = 2 << 1u;
-    uint unnamed_105 = 2u << 1u;
-    metal::int2 unnamed_106 = metal::int2(2) << metal::uint2(1u);
-    metal::uint3 unnamed_107 = metal::uint3(2u) << metal::uint3(1u);
-    int unnamed_108 = 2 >> 1u;
-    uint unnamed_109 = 2u >> 1u;
-    metal::int2 unnamed_110 = metal::int2(2) >> metal::uint2(1u);
-    metal::uint3 unnamed_111 = metal::uint3(2u) >> metal::uint3(1u);
+    int flip0_ = ~(1);
+    uint flip1_ = ~(1u);
+    metal::int2 flip2_ = ~(metal::int2(1));
+    metal::uint3 flip3_ = ~(metal::uint3(1u));
+    int or0_ = 2 | 1;
+    uint or1_ = 2u | 1u;
+    metal::int2 or2_ = metal::int2(2) | metal::int2(1);
+    metal::uint3 or3_ = metal::uint3(2u) | metal::uint3(1u);
+    int and0_ = 2 & 1;
+    uint and1_ = 2u & 1u;
+    metal::int2 and2_ = metal::int2(2) & metal::int2(1);
+    metal::uint3 and3_ = metal::uint3(2u) & metal::uint3(1u);
+    int xor0_ = 2 ^ 1;
+    uint xor1_ = 2u ^ 1u;
+    metal::int2 xor2_ = metal::int2(2) ^ metal::int2(1);
+    metal::uint3 xor3_ = metal::uint3(2u) ^ metal::uint3(1u);
+    int shl0_ = 2 << 1u;
+    uint shl1_ = 2u << 1u;
+    metal::int2 shl2_ = metal::int2(2) << metal::uint2(1u);
+    metal::uint3 shl3_ = metal::uint3(2u) << metal::uint3(1u);
+    int shr0_ = 2 >> 1u;
+    uint shr1_ = 2u >> 1u;
+    metal::int2 shr2_ = metal::int2(2) >> metal::uint2(1u);
+    metal::uint3 shr3_ = metal::uint3(2u) >> metal::uint3(1u);
 }
 
 void comparison(
 ) {
-    bool unnamed_112 = 2 == 1;
-    bool unnamed_113 = 2u == 1u;
-    bool unnamed_114 = 2.0 == 1.0;
-    metal::bool2 unnamed_115 = metal::int2(2) == metal::int2(1);
-    metal::bool3 unnamed_116 = metal::uint3(2u) == metal::uint3(1u);
-    metal::bool4 unnamed_117 = metal::float4(2.0) == metal::float4(1.0);
-    bool unnamed_118 = 2 != 1;
-    bool unnamed_119 = 2u != 1u;
-    bool unnamed_120 = 2.0 != 1.0;
-    metal::bool2 unnamed_121 = metal::int2(2) != metal::int2(1);
-    metal::bool3 unnamed_122 = metal::uint3(2u) != metal::uint3(1u);
-    metal::bool4 unnamed_123 = metal::float4(2.0) != metal::float4(1.0);
-    bool unnamed_124 = 2 < 1;
-    bool unnamed_125 = 2u < 1u;
-    bool unnamed_126 = 2.0 < 1.0;
-    metal::bool2 unnamed_127 = metal::int2(2) < metal::int2(1);
-    metal::bool3 unnamed_128 = metal::uint3(2u) < metal::uint3(1u);
-    metal::bool4 unnamed_129 = metal::float4(2.0) < metal::float4(1.0);
-    bool unnamed_130 = 2 <= 1;
-    bool unnamed_131 = 2u <= 1u;
-    bool unnamed_132 = 2.0 <= 1.0;
-    metal::bool2 unnamed_133 = metal::int2(2) <= metal::int2(1);
-    metal::bool3 unnamed_134 = metal::uint3(2u) <= metal::uint3(1u);
-    metal::bool4 unnamed_135 = metal::float4(2.0) <= metal::float4(1.0);
-    bool unnamed_136 = 2 > 1;
-    bool unnamed_137 = 2u > 1u;
-    bool unnamed_138 = 2.0 > 1.0;
-    metal::bool2 unnamed_139 = metal::int2(2) > metal::int2(1);
-    metal::bool3 unnamed_140 = metal::uint3(2u) > metal::uint3(1u);
-    metal::bool4 unnamed_141 = metal::float4(2.0) > metal::float4(1.0);
-    bool unnamed_142 = 2 >= 1;
-    bool unnamed_143 = 2u >= 1u;
-    bool unnamed_144 = 2.0 >= 1.0;
-    metal::bool2 unnamed_145 = metal::int2(2) >= metal::int2(1);
-    metal::bool3 unnamed_146 = metal::uint3(2u) >= metal::uint3(1u);
-    metal::bool4 unnamed_147 = metal::float4(2.0) >= metal::float4(1.0);
+    bool eq0_ = 2 == 1;
+    bool eq1_ = 2u == 1u;
+    bool eq2_ = 2.0 == 1.0;
+    metal::bool2 eq3_ = metal::int2(2) == metal::int2(1);
+    metal::bool3 eq4_ = metal::uint3(2u) == metal::uint3(1u);
+    metal::bool4 eq5_ = metal::float4(2.0) == metal::float4(1.0);
+    bool neq0_ = 2 != 1;
+    bool neq1_ = 2u != 1u;
+    bool neq2_ = 2.0 != 1.0;
+    metal::bool2 neq3_ = metal::int2(2) != metal::int2(1);
+    metal::bool3 neq4_ = metal::uint3(2u) != metal::uint3(1u);
+    metal::bool4 neq5_ = metal::float4(2.0) != metal::float4(1.0);
+    bool lt0_ = 2 < 1;
+    bool lt1_ = 2u < 1u;
+    bool lt2_ = 2.0 < 1.0;
+    metal::bool2 lt3_ = metal::int2(2) < metal::int2(1);
+    metal::bool3 lt4_ = metal::uint3(2u) < metal::uint3(1u);
+    metal::bool4 lt5_ = metal::float4(2.0) < metal::float4(1.0);
+    bool lte0_ = 2 <= 1;
+    bool lte1_ = 2u <= 1u;
+    bool lte2_ = 2.0 <= 1.0;
+    metal::bool2 lte3_ = metal::int2(2) <= metal::int2(1);
+    metal::bool3 lte4_ = metal::uint3(2u) <= metal::uint3(1u);
+    metal::bool4 lte5_ = metal::float4(2.0) <= metal::float4(1.0);
+    bool gt0_ = 2 > 1;
+    bool gt1_ = 2u > 1u;
+    bool gt2_ = 2.0 > 1.0;
+    metal::bool2 gt3_ = metal::int2(2) > metal::int2(1);
+    metal::bool3 gt4_ = metal::uint3(2u) > metal::uint3(1u);
+    metal::bool4 gt5_ = metal::float4(2.0) > metal::float4(1.0);
+    bool gte0_ = 2 >= 1;
+    bool gte1_ = 2u >= 1u;
+    bool gte2_ = 2.0 >= 1.0;
+    metal::bool2 gte3_ = metal::int2(2) >= metal::int2(1);
+    metal::bool3 gte4_ = metal::uint3(2u) >= metal::uint3(1u);
+    metal::bool4 gte5_ = metal::float4(2.0) >= metal::float4(1.0);
 }
 
 void assignment(
@@ -275,13 +277,13 @@ void assignment(
 
 void negation_avoids_prefix_decrement(
 ) {
-    int unnamed_148 = -(-2);
-    int unnamed_149 = -(-3);
-    int unnamed_150 = -(-(4));
-    int unnamed_151 = -(-(-5));
-    int unnamed_152 = -(-(-(-(6))));
-    int unnamed_153 = -(-(-(-(-7))));
-    int unnamed_154 = -(-(-(-(-8))));
+    int p1_ = -(-2);
+    int p2_ = -(-3);
+    int p3_ = -(-(4));
+    int p4_ = -(-(-5));
+    int p5_ = -(-(-(-(6))));
+    int p6_ = -(-(-(-(-7))));
+    int p7_ = -(-(-(-(-8))));
 }
 
 kernel void main_(
diff --git a/tests/out/spv/access.spvasm b/tests/out/spv/access.spvasm
index e3a2b75641..92e3a2fbed 100644
--- a/tests/out/spv/access.spvasm
+++ b/tests/out/spv/access.spvasm
@@ -1,16 +1,16 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 327
+; Bound: 326
 OpCapability Shader
 OpExtension "SPV_KHR_storage_buffer_storage_class"
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint Vertex %241 "foo_vert" %236 %239
-OpEntryPoint Fragment %287 "foo_frag" %286
-OpEntryPoint GLCompute %307 "assign_through_ptr" %310
-OpExecutionMode %287 OriginUpperLeft
-OpExecutionMode %307 LocalSize 1 1 1
+OpEntryPoint Vertex %239 "foo_vert" %234 %237
+OpEntryPoint Fragment %286 "foo_frag" %285
+OpEntryPoint GLCompute %306 "assign_through_ptr" %309
+OpExecutionMode %286 OriginUpperLeft
+OpExecutionMode %306 LocalSize 1 1 1
 OpSource GLSL 450
 OpMemberName %12 0 "a"
 OpMemberName %12 1 "b"
@@ -45,17 +45,17 @@ OpName %202 "foo"
 OpName %203 "read_from_private"
 OpName %208 "a"
 OpName %209 "test_arr_as_arg"
-OpName %217 "p"
-OpName %218 "assign_through_ptr_fn"
-OpName %223 "foo"
-OpName %224 "assign_array_through_ptr_fn"
-OpName %230 "foo"
-OpName %232 "c2"
-OpName %236 "vi"
-OpName %241 "foo_vert"
-OpName %287 "foo_frag"
-OpName %304 "arr"
-OpName %307 "assign_through_ptr"
+OpName %215 "p"
+OpName %216 "assign_through_ptr_fn"
+OpName %221 "foo"
+OpName %222 "assign_array_through_ptr_fn"
+OpName %228 "foo"
+OpName %230 "c2"
+OpName %234 "vi"
+OpName %239 "foo_vert"
+OpName %286 "foo_frag"
+OpName %303 "arr"
+OpName %306 "assign_through_ptr"
 OpMemberDecorate %12 0 Offset 0
 OpMemberDecorate %12 1 Offset 16
 OpMemberDecorate %12 2 Offset 28
@@ -100,10 +100,10 @@ OpDecorate %56 DescriptorSet 0
 OpDecorate %56 Binding 3
 OpDecorate %57 Block
 OpMemberDecorate %57 0 Offset 0
-OpDecorate %236 BuiltIn VertexIndex
-OpDecorate %239 BuiltIn Position
-OpDecorate %286 Location 0
-OpDecorate %310 BuiltIn LocalInvocationId
+OpDecorate %234 BuiltIn VertexIndex
+OpDecorate %237 BuiltIn Position
+OpDecorate %285 Location 0
+OpDecorate %309 BuiltIn LocalInvocationId
 %2 = OpTypeVoid
 %4 = OpTypeInt 32 0
 %3 = OpConstant  %4  0
@@ -201,41 +201,40 @@ OpDecorate %310 BuiltIn LocalInvocationId
 %181 = OpTypePointer Function %30
 %204 = OpTypeFunction %16 %33
 %210 = OpTypeFunction %16 %35
-%211 = OpConstant  %6  4
-%212 = OpConstant  %6  9
-%219 = OpTypeFunction %2 %41
-%220 = OpConstant  %4  42
-%225 = OpTypeFunction %2 %43
-%231 = OpConstantNull  %16
-%233 = OpTypePointer Function %39
-%234 = OpConstantNull  %39
-%237 = OpTypePointer Input %4
-%236 = OpVariable  %237  Input
-%240 = OpTypePointer Output %37
-%239 = OpVariable  %240  Output
-%243 = OpTypePointer StorageBuffer %29
-%246 = OpConstant  %16  0.0
-%247 = OpConstant  %4  3
-%248 = OpConstant  %6  3
-%249 = OpConstant  %6  42
-%250 = OpConstantNull  %35
-%255 = OpTypePointer StorageBuffer %14
-%258 = OpTypePointer StorageBuffer %24
-%259 = OpConstant  %4  4
-%262 = OpTypePointer StorageBuffer %15
-%263 = OpTypePointer StorageBuffer %16
-%266 = OpTypePointer StorageBuffer %25
-%269 = OpTypePointer StorageBuffer %13
-%286 = OpVariable  %240  Output
-%289 = OpConstantNull  %29
-%305 = OpConstantNull  %42
-%309 = OpConstantNull  %4
-%311 = OpTypePointer Input %11
-%310 = OpVariable  %311  Input
-%313 = OpConstantNull  %11
-%315 = OpTypeBool
-%314 = OpTypeVector %315 3
-%320 = OpConstant  %4  264
+%217 = OpTypeFunction %2 %41
+%218 = OpConstant  %4  42
+%223 = OpTypeFunction %2 %43
+%229 = OpConstantNull  %16
+%231 = OpTypePointer Function %39
+%232 = OpConstantNull  %39
+%235 = OpTypePointer Input %4
+%234 = OpVariable  %235  Input
+%238 = OpTypePointer Output %37
+%237 = OpVariable  %238  Output
+%241 = OpTypePointer StorageBuffer %29
+%244 = OpConstant  %16  0.0
+%245 = OpConstant  %4  3
+%246 = OpConstant  %6  3
+%247 = OpConstant  %6  4
+%248 = OpConstant  %6  42
+%249 = OpConstantNull  %35
+%254 = OpTypePointer StorageBuffer %14
+%257 = OpTypePointer StorageBuffer %24
+%258 = OpConstant  %4  4
+%261 = OpTypePointer StorageBuffer %15
+%262 = OpTypePointer StorageBuffer %16
+%265 = OpTypePointer StorageBuffer %25
+%268 = OpTypePointer StorageBuffer %13
+%285 = OpVariable  %238  Output
+%288 = OpConstantNull  %29
+%304 = OpConstantNull  %42
+%308 = OpConstantNull  %4
+%310 = OpTypePointer Input %11
+%309 = OpVariable  %310  Input
+%312 = OpConstantNull  %11
+%314 = OpTypeBool
+%313 = OpTypeVector %314 3
+%319 = OpConstant  %4  264
 %67 = OpFunction  %2  None %68
 %66 = OpLabel
 %60 = OpVariable  %61  Function %62
@@ -380,122 +379,122 @@ OpFunctionEnd
 %209 = OpFunction  %16  None %210
 %208 = OpFunctionParameter  %35
 %207 = OpLabel
-OpBranch %213
-%213 = OpLabel
-%214 = OpCompositeExtract  %34  %208 4
-%215 = OpCompositeExtract  %16  %214 9
-OpReturnValue %215
+OpBranch %211
+%211 = OpLabel
+%212 = OpCompositeExtract  %34  %208 4
+%213 = OpCompositeExtract  %16  %212 9
+OpReturnValue %213
 OpFunctionEnd
-%218 = OpFunction  %2  None %219
-%217 = OpFunctionParameter  %41
-%216 = OpLabel
-OpBranch %221
-%221 = OpLabel
-OpStore %217 %220
+%216 = OpFunction  %2  None %217
+%215 = OpFunctionParameter  %41
+%214 = OpLabel
+OpBranch %219
+%219 = OpLabel
+OpStore %215 %218
 OpReturn
 OpFunctionEnd
-%224 = OpFunction  %2  None %225
-%223 = OpFunctionParameter  %43
-%222 = OpLabel
-OpBranch %226
-%226 = OpLabel
-%227 = OpCompositeConstruct  %37  %71 %71 %71 %71
-%228 = OpCompositeConstruct  %37  %72 %72 %72 %72
-%229 = OpCompositeConstruct  %42  %227 %228
-OpStore %223 %229
+%222 = OpFunction  %2  None %223
+%221 = OpFunctionParameter  %43
+%220 = OpLabel
+OpBranch %224
+%224 = OpLabel
+%225 = OpCompositeConstruct  %37  %71 %71 %71 %71
+%226 = OpCompositeConstruct  %37  %72 %72 %72 %72
+%227 = OpCompositeConstruct  %42  %225 %226
+OpStore %221 %227
 OpReturn
 OpFunctionEnd
-%241 = OpFunction  %2  None %68
-%235 = OpLabel
-%230 = OpVariable  %33  Function %231
-%232 = OpVariable  %233  Function %234
-%238 = OpLoad  %4  %236
-%242 = OpAccessChain  %69  %50 %3
-%244 = OpAccessChain  %243  %53 %3
-%245 = OpAccessChain  %144  %56 %3
-OpBranch %251
-%251 = OpLabel
-OpStore %230 %246
-%252 = OpLoad  %16  %230
-OpStore %230 %71
-%253 = OpFunctionCall  %2  %67
-%254 = OpFunctionCall  %2  %143
-%256 = OpAccessChain  %255  %48 %3
-%257 = OpLoad  %14  %256
-%260 = OpAccessChain  %258  %48 %259
-%261 = OpLoad  %24  %260
-%264 = OpAccessChain  %263  %48 %3 %247 %3
-%265 = OpLoad  %16  %264
-%267 = OpArrayLength  %4  %48 5
-%268 = OpISub  %4  %267 %20
-%270 = OpAccessChain  %38  %48 %36 %268 %3
-%271 = OpLoad  %6  %270
-%272 = OpLoad  %29  %244
-%273 = OpFunctionCall  %16  %203 %230
-%274 = OpConvertFToS  %6  %265
-%275 = OpCompositeConstruct  %39  %271 %274 %248 %211 %10
-OpStore %232 %275
-%276 = OpIAdd  %4  %238 %96
-%277 = OpAccessChain  %61  %232 %276
-OpStore %277 %249
-%278 = OpAccessChain  %61  %232 %238
-%279 = OpLoad  %6  %278
-%280 = OpFunctionCall  %16  %209 %250
-%281 = OpCompositeConstruct  %40  %279 %279 %279 %279
-%282 = OpConvertSToF  %37  %281
-%283 = OpMatrixTimesVector  %15  %257 %282
-%284 = OpCompositeConstruct  %37  %283 %72
-OpStore %239 %284
+%239 = OpFunction  %2  None %68
+%233 = OpLabel
+%228 = OpVariable  %33  Function %229
+%230 = OpVariable  %231  Function %232
+%236 = OpLoad  %4  %234
+%240 = OpAccessChain  %69  %50 %3
+%242 = OpAccessChain  %241  %53 %3
+%243 = OpAccessChain  %144  %56 %3
+OpBranch %250
+%250 = OpLabel
+OpStore %228 %244
+%251 = OpLoad  %16  %228
+OpStore %228 %71
+%252 = OpFunctionCall  %2  %67
+%253 = OpFunctionCall  %2  %143
+%255 = OpAccessChain  %254  %48 %3
+%256 = OpLoad  %14  %255
+%259 = OpAccessChain  %257  %48 %258
+%260 = OpLoad  %24  %259
+%263 = OpAccessChain  %262  %48 %3 %245 %3
+%264 = OpLoad  %16  %263
+%266 = OpArrayLength  %4  %48 5
+%267 = OpISub  %4  %266 %20
+%269 = OpAccessChain  %38  %48 %36 %267 %3
+%270 = OpLoad  %6  %269
+%271 = OpLoad  %29  %242
+%272 = OpFunctionCall  %16  %203 %228
+%273 = OpConvertFToS  %6  %264
+%274 = OpCompositeConstruct  %39  %270 %273 %246 %247 %10
+OpStore %230 %274
+%275 = OpIAdd  %4  %236 %96
+%276 = OpAccessChain  %61  %230 %275
+OpStore %276 %248
+%277 = OpAccessChain  %61  %230 %236
+%278 = OpLoad  %6  %277
+%279 = OpFunctionCall  %16  %209 %249
+%280 = OpCompositeConstruct  %40  %278 %278 %278 %278
+%281 = OpConvertSToF  %37  %280
+%282 = OpMatrixTimesVector  %15  %256 %281
+%283 = OpCompositeConstruct  %37  %282 %72
+OpStore %237 %283
 OpReturn
 OpFunctionEnd
-%287 = OpFunction  %2  None %68
-%285 = OpLabel
-%288 = OpAccessChain  %243  %53 %3
-OpBranch %290
-%290 = OpLabel
-%291 = OpAccessChain  %263  %48 %3 %96 %20
-OpStore %291 %71
-%292 = OpCompositeConstruct  %15  %246 %246 %246
-%293 = OpCompositeConstruct  %15  %71 %71 %71
-%294 = OpCompositeConstruct  %15  %72 %72 %72
-%295 = OpCompositeConstruct  %15  %73 %73 %73
-%296 = OpCompositeConstruct  %14  %292 %293 %294 %295
-%297 = OpAccessChain  %255  %48 %3
-OpStore %297 %296
-%298 = OpCompositeConstruct  %23  %3 %3
-%299 = OpCompositeConstruct  %23  %96 %96
-%300 = OpCompositeConstruct  %24  %298 %299
-%301 = OpAccessChain  %258  %48 %259
-OpStore %301 %300
-%302 = OpAccessChain  %38  %48 %36 %96 %3
-OpStore %302 %9
-OpStore %288 %289
-%303 = OpCompositeConstruct  %37  %246 %246 %246 %246
-OpStore %286 %303
+%286 = OpFunction  %2  None %68
+%284 = OpLabel
+%287 = OpAccessChain  %241  %53 %3
+OpBranch %289
+%289 = OpLabel
+%290 = OpAccessChain  %262  %48 %3 %96 %20
+OpStore %290 %71
+%291 = OpCompositeConstruct  %15  %244 %244 %244
+%292 = OpCompositeConstruct  %15  %71 %71 %71
+%293 = OpCompositeConstruct  %15  %72 %72 %72
+%294 = OpCompositeConstruct  %15  %73 %73 %73
+%295 = OpCompositeConstruct  %14  %291 %292 %293 %294
+%296 = OpAccessChain  %254  %48 %3
+OpStore %296 %295
+%297 = OpCompositeConstruct  %23  %3 %3
+%298 = OpCompositeConstruct  %23  %96 %96
+%299 = OpCompositeConstruct  %24  %297 %298
+%300 = OpAccessChain  %257  %48 %258
+OpStore %300 %299
+%301 = OpAccessChain  %38  %48 %36 %96 %3
+OpStore %301 %9
+OpStore %287 %288
+%302 = OpCompositeConstruct  %37  %244 %244 %244 %244
+OpStore %285 %302
 OpReturn
 OpFunctionEnd
-%307 = OpFunction  %2  None %68
-%306 = OpLabel
-%304 = OpVariable  %43  Function %305
-OpBranch %308
-%308 = OpLabel
-%312 = OpLoad  %11  %310
-%316 = OpIEqual  %314  %312 %313
-%317 = OpAll  %315  %316
-OpSelectionMerge %318 None
-OpBranchConditional %317 %319 %318
-%319 = OpLabel
-OpStore %59 %309
-OpBranch %318
+%306 = OpFunction  %2  None %68
+%305 = OpLabel
+%303 = OpVariable  %43  Function %304
+OpBranch %307
+%307 = OpLabel
+%311 = OpLoad  %11  %309
+%315 = OpIEqual  %313  %311 %312
+%316 = OpAll  %314  %315
+OpSelectionMerge %317 None
+OpBranchConditional %316 %318 %317
 %318 = OpLabel
-OpControlBarrier %20 %20 %320
-OpBranch %321
-%321 = OpLabel
-%322 = OpCompositeConstruct  %37  %74 %74 %74 %74
-%323 = OpCompositeConstruct  %37  %149 %149 %149 %149
-%324 = OpCompositeConstruct  %42  %322 %323
-OpStore %304 %324
-%325 = OpFunctionCall  %2  %218 %59
-%326 = OpFunctionCall  %2  %224 %304
+OpStore %59 %308
+OpBranch %317
+%317 = OpLabel
+OpControlBarrier %20 %20 %319
+OpBranch %320
+%320 = OpLabel
+%321 = OpCompositeConstruct  %37  %74 %74 %74 %74
+%322 = OpCompositeConstruct  %37  %149 %149 %149 %149
+%323 = OpCompositeConstruct  %42  %321 %322
+OpStore %303 %323
+%324 = OpFunctionCall  %2  %216 %59
+%325 = OpFunctionCall  %2  %222 %303
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/binding-buffer-arrays.spvasm b/tests/out/spv/binding-buffer-arrays.spvasm
index cd20c1dd7c..b09377b6b0 100644
--- a/tests/out/spv/binding-buffer-arrays.spvasm
+++ b/tests/out/spv/binding-buffer-arrays.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 66
+; Bound: 65
 OpCapability Shader
 OpCapability ShaderNonUniform
 OpExtension "SPV_KHR_storage_buffer_storage_class"
@@ -24,7 +24,7 @@ OpMemberDecorate %16 0 Offset 0
 OpDecorate %23 Location 0
 OpDecorate %23 Flat
 OpDecorate %26 Location 0
-OpDecorate %57 NonUniform
+OpDecorate %56 NonUniform
 %2 = OpTypeVoid
 %4 = OpTypeInt 32 1
 %3 = OpConstant  %4  1
@@ -51,55 +51,54 @@ OpDecorate %57 NonUniform
 %30 = OpTypePointer Uniform %6
 %31 = OpConstant  %5  0
 %33 = OpTypePointer StorageBuffer %8
-%34 = OpConstant  %4  0
-%36 = OpTypePointer Uniform %5
-%40 = OpTypePointer StorageBuffer %7
-%41 = OpTypePointer StorageBuffer %5
-%47 = OpTypeBool
-%49 = OpConstantNull  %5
-%58 = OpConstantNull  %5
+%35 = OpTypePointer Uniform %5
+%39 = OpTypePointer StorageBuffer %7
+%40 = OpTypePointer StorageBuffer %5
+%46 = OpTypeBool
+%48 = OpConstantNull  %5
+%57 = OpConstantNull  %5
 %28 = OpFunction  %2  None %29
 %21 = OpLabel
 %18 = OpVariable  %19  Function %20
 %25 = OpLoad  %5  %23
 %22 = OpCompositeConstruct  %10  %25
 %32 = OpAccessChain  %30  %15 %31
-OpBranch %35
-%35 = OpLabel
-%37 = OpAccessChain  %36  %32 %31
-%38 = OpLoad  %5  %37
-%39 = OpCompositeExtract  %5  %22 0
+OpBranch %34
+%34 = OpLabel
+%36 = OpAccessChain  %35  %32 %31
+%37 = OpLoad  %5  %36
+%38 = OpCompositeExtract  %5  %22 0
 OpStore %18 %31
-%42 = OpAccessChain  %41  %11 %31 %31
-%43 = OpLoad  %5  %42
-%44 = OpLoad  %5  %18
-%45 = OpIAdd  %5  %44 %43
-OpStore %18 %45
-%46 = OpULessThan  %47  %38 %9
-OpSelectionMerge %50 None
-OpBranchConditional %46 %51 %50
-%51 = OpLabel
-%48 = OpAccessChain  %41  %11 %38 %31
-%52 = OpLoad  %5  %48
-OpBranch %50
+%41 = OpAccessChain  %40  %11 %31 %31
+%42 = OpLoad  %5  %41
+%43 = OpLoad  %5  %18
+%44 = OpIAdd  %5  %43 %42
+OpStore %18 %44
+%45 = OpULessThan  %46  %37 %9
+OpSelectionMerge %49 None
+OpBranchConditional %45 %50 %49
 %50 = OpLabel
-%53 = OpPhi  %5  %49 %35 %52 %51
-%54 = OpLoad  %5  %18
-%55 = OpIAdd  %5  %54 %53
-OpStore %18 %55
-%56 = OpULessThan  %47  %39 %9
-OpSelectionMerge %59 None
-OpBranchConditional %56 %60 %59
-%60 = OpLabel
-%57 = OpAccessChain  %41  %11 %39 %31
-%61 = OpLoad  %5  %57
-OpBranch %59
+%47 = OpAccessChain  %40  %11 %37 %31
+%51 = OpLoad  %5  %47
+OpBranch %49
+%49 = OpLabel
+%52 = OpPhi  %5  %48 %34 %51 %50
+%53 = OpLoad  %5  %18
+%54 = OpIAdd  %5  %53 %52
+OpStore %18 %54
+%55 = OpULessThan  %46  %38 %9
+OpSelectionMerge %58 None
+OpBranchConditional %55 %59 %58
 %59 = OpLabel
-%62 = OpPhi  %5  %58 %50 %61 %60
-%63 = OpLoad  %5  %18
-%64 = OpIAdd  %5  %63 %62
-OpStore %18 %64
-%65 = OpLoad  %5  %18
-OpStore %26 %65
+%56 = OpAccessChain  %40  %11 %38 %31
+%60 = OpLoad  %5  %56
+OpBranch %58
+%58 = OpLabel
+%61 = OpPhi  %5  %57 %49 %60 %59
+%62 = OpLoad  %5  %18
+%63 = OpIAdd  %5  %62 %61
+OpStore %18 %63
+%64 = OpLoad  %5  %18
+OpStore %26 %64
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/bounds-check-restrict.spvasm b/tests/out/spv/bounds-check-restrict.spvasm
index bc0a00135f..f6ea5dcde8 100644
--- a/tests/out/spv/bounds-check-restrict.spvasm
+++ b/tests/out/spv/bounds-check-restrict.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 167
+; Bound: 164
 OpCapability Shader
 OpCapability Linkage
 OpExtension "SPV_KHR_storage_buffer_storage_class"
@@ -49,13 +49,10 @@ OpDecorate %12 Block
 %71 = OpTypeFunction %5 %4 %4
 %80 = OpConstant  %5  100.0
 %92 = OpTypeFunction %5
-%93 = OpConstant  %4  9
-%94 = OpConstant  %4  3
-%95 = OpConstant  %4  2
-%109 = OpTypeFunction %2 %4 %5
-%133 = OpTypeFunction %2 %4 %9
-%142 = OpTypeFunction %2 %4 %4 %5
-%162 = OpTypeFunction %2 %5
+%106 = OpTypeFunction %2 %4 %5
+%130 = OpTypeFunction %2 %4 %9
+%139 = OpTypeFunction %2 %4 %4 %5
+%159 = OpTypeFunction %2 %5
 %17 = OpFunction  %5  None %18
 %16 = OpFunctionParameter  %4
 %15 = OpLabel
@@ -137,103 +134,103 @@ OpReturnValue %89
 OpFunctionEnd
 %91 = OpFunction  %5  None %92
 %90 = OpLabel
-OpBranch %96
-%96 = OpLabel
-%97 = OpAccessChain  %21  %13 %24 %22
-%98 = OpLoad  %5  %97
-%99 = OpAccessChain  %44  %13 %33 %36
+OpBranch %93
+%93 = OpLabel
+%94 = OpAccessChain  %21  %13 %24 %22
+%95 = OpLoad  %5  %94
+%96 = OpAccessChain  %44  %13 %33 %36
+%97 = OpLoad  %5  %96
+%98 = OpFAdd  %5  %95 %97
+%99 = OpAccessChain  %44  %13 %63 %63 %36
 %100 = OpLoad  %5  %99
 %101 = OpFAdd  %5  %98 %100
-%102 = OpAccessChain  %44  %13 %63 %63 %36
-%103 = OpLoad  %5  %102
-%104 = OpFAdd  %5  %101 %103
-OpReturnValue %104
+OpReturnValue %101
 OpFunctionEnd
-%108 = OpFunction  %2  None %109
-%106 = OpFunctionParameter  %4
-%107 = OpFunctionParameter  %5
-%105 = OpLabel
-OpBranch %110
+%105 = OpFunction  %2  None %106
+%103 = OpFunctionParameter  %4
+%104 = OpFunctionParameter  %5
+%102 = OpLabel
+OpBranch %107
+%107 = OpLabel
+%108 = OpExtInst  %8  %1 UMin %103 %22
+%109 = OpAccessChain  %21  %13 %24 %108
+OpStore %109 %104
+OpReturn
+OpFunctionEnd
+%113 = OpFunction  %2  None %106
+%111 = OpFunctionParameter  %4
+%112 = OpFunctionParameter  %5
 %110 = OpLabel
-%111 = OpExtInst  %8  %1 UMin %106 %22
-%112 = OpAccessChain  %21  %13 %24 %111
-OpStore %112 %107
+OpBranch %114
+%114 = OpLabel
+%115 = OpArrayLength  %8  %13 3
+%116 = OpISub  %8  %115 %33
+%117 = OpExtInst  %8  %1 UMin %111 %116
+%118 = OpAccessChain  %21  %13 %36 %117
+OpStore %118 %112
 OpReturn
 OpFunctionEnd
-%116 = OpFunction  %2  None %109
-%114 = OpFunctionParameter  %4
-%115 = OpFunctionParameter  %5
-%113 = OpLabel
-OpBranch %117
-%117 = OpLabel
-%118 = OpArrayLength  %8  %13 3
-%119 = OpISub  %8  %118 %33
-%120 = OpExtInst  %8  %1 UMin %114 %119
-%121 = OpAccessChain  %21  %13 %36 %120
-OpStore %121 %115
+%122 = OpFunction  %2  None %106
+%120 = OpFunctionParameter  %4
+%121 = OpFunctionParameter  %5
+%119 = OpLabel
+OpBranch %123
+%123 = OpLabel
+%124 = OpExtInst  %8  %1 UMin %120 %36
+%125 = OpAccessChain  %44  %13 %33 %124
+OpStore %125 %121
 OpReturn
 OpFunctionEnd
-%125 = OpFunction  %2  None %109
-%123 = OpFunctionParameter  %4
-%124 = OpFunctionParameter  %5
-%122 = OpLabel
-OpBranch %126
+%129 = OpFunction  %2  None %130
+%127 = OpFunctionParameter  %4
+%128 = OpFunctionParameter  %9
 %126 = OpLabel
-%127 = OpExtInst  %8  %1 UMin %123 %36
-%128 = OpAccessChain  %44  %13 %33 %127
-OpStore %128 %124
+OpBranch %131
+%131 = OpLabel
+%132 = OpExtInst  %8  %1 UMin %127 %63
+%133 = OpAccessChain  %62  %13 %63 %132
+OpStore %133 %128
 OpReturn
 OpFunctionEnd
-%132 = OpFunction  %2  None %133
-%130 = OpFunctionParameter  %4
-%131 = OpFunctionParameter  %9
-%129 = OpLabel
-OpBranch %134
+%138 = OpFunction  %2  None %139
+%135 = OpFunctionParameter  %4
+%136 = OpFunctionParameter  %4
+%137 = OpFunctionParameter  %5
 %134 = OpLabel
-%135 = OpExtInst  %8  %1 UMin %130 %63
-%136 = OpAccessChain  %62  %13 %63 %135
-OpStore %136 %131
-OpReturn
-OpFunctionEnd
-%141 = OpFunction  %2  None %142
-%138 = OpFunctionParameter  %4
-%139 = OpFunctionParameter  %4
-%140 = OpFunctionParameter  %5
-%137 = OpLabel
-OpBranch %143
-%143 = OpLabel
-%144 = OpExtInst  %8  %1 UMin %139 %36
-%145 = OpExtInst  %8  %1 UMin %138 %63
-%146 = OpAccessChain  %44  %13 %63 %145 %144
-OpStore %146 %140
+OpBranch %140
+%140 = OpLabel
+%141 = OpExtInst  %8  %1 UMin %136 %36
+%142 = OpExtInst  %8  %1 UMin %135 %63
+%143 = OpAccessChain  %44  %13 %63 %142 %141
+OpStore %143 %137
 OpReturn
 OpFunctionEnd
-%150 = OpFunction  %2  None %109
-%148 = OpFunctionParameter  %4
-%149 = OpFunctionParameter  %5
-%147 = OpLabel
-OpBranch %151
-%151 = OpLabel
-%152 = OpConvertSToF  %5  %148
-%153 = OpFDiv  %5  %152 %80
-%154 = OpExtInst  %5  %1 Sin %153
-%155 = OpFMul  %5  %154 %80
-%156 = OpConvertFToS  %4  %155
-%157 = OpExtInst  %8  %1 UMin %156 %22
-%158 = OpAccessChain  %21  %13 %24 %157
-OpStore %158 %149
+%147 = OpFunction  %2  None %106
+%145 = OpFunctionParameter  %4
+%146 = OpFunctionParameter  %5
+%144 = OpLabel
+OpBranch %148
+%148 = OpLabel
+%149 = OpConvertSToF  %5  %145
+%150 = OpFDiv  %5  %149 %80
+%151 = OpExtInst  %5  %1 Sin %150
+%152 = OpFMul  %5  %151 %80
+%153 = OpConvertFToS  %4  %152
+%154 = OpExtInst  %8  %1 UMin %153 %22
+%155 = OpAccessChain  %21  %13 %24 %154
+OpStore %155 %146
 OpReturn
 OpFunctionEnd
-%161 = OpFunction  %2  None %162
-%160 = OpFunctionParameter  %5
-%159 = OpLabel
-OpBranch %163
-%163 = OpLabel
-%164 = OpAccessChain  %21  %13 %24 %22
-OpStore %164 %160
-%165 = OpAccessChain  %44  %13 %33 %36
-OpStore %165 %160
-%166 = OpAccessChain  %44  %13 %63 %63 %36
-OpStore %166 %160
+%158 = OpFunction  %2  None %159
+%157 = OpFunctionParameter  %5
+%156 = OpLabel
+OpBranch %160
+%160 = OpLabel
+%161 = OpAccessChain  %21  %13 %24 %22
+OpStore %161 %157
+%162 = OpAccessChain  %44  %13 %33 %36
+OpStore %162 %157
+%163 = OpAccessChain  %44  %13 %63 %63 %36
+OpStore %163 %157
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/bounds-check-zero.spvasm b/tests/out/spv/bounds-check-zero.spvasm
index b2a82f673d..c18b02063e 100644
--- a/tests/out/spv/bounds-check-zero.spvasm
+++ b/tests/out/spv/bounds-check-zero.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 209
+; Bound: 206
 OpCapability Shader
 OpCapability Linkage
 OpExtension "SPV_KHR_storage_buffer_storage_class"
@@ -57,14 +57,11 @@ OpDecorate %12 Block
 %105 = OpConstant  %5  100.0
 %114 = OpConstantNull  %5
 %121 = OpTypeFunction %5
-%122 = OpConstant  %4  9
-%123 = OpConstant  %4  3
-%124 = OpConstant  %4  2
-%126 = OpConstant  %8  9
-%139 = OpTypeFunction %2 %4 %5
-%168 = OpTypeFunction %2 %4 %9
-%179 = OpTypeFunction %2 %4 %4 %5
-%204 = OpTypeFunction %2 %5
+%123 = OpConstant  %8  9
+%136 = OpTypeFunction %2 %4 %5
+%165 = OpTypeFunction %2 %4 %9
+%176 = OpTypeFunction %2 %4 %4 %5
+%201 = OpTypeFunction %2 %5
 %17 = OpFunction  %5  None %18
 %16 = OpFunctionParameter  %4
 %15 = OpLabel
@@ -188,133 +185,133 @@ OpReturnValue %118
 OpFunctionEnd
 %120 = OpFunction  %5  None %121
 %119 = OpLabel
-OpBranch %125
-%125 = OpLabel
-%127 = OpAccessChain  %21  %13 %24 %126
-%128 = OpLoad  %5  %127
-%129 = OpAccessChain  %50  %13 %53 %38
+OpBranch %122
+%122 = OpLabel
+%124 = OpAccessChain  %21  %13 %24 %123
+%125 = OpLoad  %5  %124
+%126 = OpAccessChain  %50  %13 %53 %38
+%127 = OpLoad  %5  %126
+%128 = OpFAdd  %5  %125 %127
+%129 = OpAccessChain  %50  %13 %80 %80 %38
 %130 = OpLoad  %5  %129
 %131 = OpFAdd  %5  %128 %130
-%132 = OpAccessChain  %50  %13 %80 %80 %38
-%133 = OpLoad  %5  %132
-%134 = OpFAdd  %5  %131 %133
-OpReturnValue %134
+OpReturnValue %131
 OpFunctionEnd
-%138 = OpFunction  %2  None %139
-%136 = OpFunctionParameter  %4
-%137 = OpFunctionParameter  %5
-%135 = OpLabel
+%135 = OpFunction  %2  None %136
+%133 = OpFunctionParameter  %4
+%134 = OpFunctionParameter  %5
+%132 = OpLabel
+OpBranch %137
+%137 = OpLabel
+%138 = OpULessThan  %23  %133 %7
+OpSelectionMerge %140 None
+OpBranchConditional %138 %141 %140
+%141 = OpLabel
+%139 = OpAccessChain  %21  %13 %24 %133
+OpStore %139 %134
 OpBranch %140
 %140 = OpLabel
-%141 = OpULessThan  %23  %136 %7
-OpSelectionMerge %143 None
-OpBranchConditional %141 %144 %143
-%144 = OpLabel
-%142 = OpAccessChain  %21  %13 %24 %136
-OpStore %142 %137
-OpBranch %143
-%143 = OpLabel
 OpReturn
 OpFunctionEnd
-%148 = OpFunction  %2  None %139
-%146 = OpFunctionParameter  %4
-%147 = OpFunctionParameter  %5
-%145 = OpLabel
-OpBranch %149
-%149 = OpLabel
-%150 = OpArrayLength  %8  %13 3
-%151 = OpULessThan  %23  %146 %150
-OpSelectionMerge %153 None
-OpBranchConditional %151 %154 %153
-%154 = OpLabel
-%152 = OpAccessChain  %21  %13 %38 %146
-OpStore %152 %147
-OpBranch %153
-%153 = OpLabel
+%145 = OpFunction  %2  None %136
+%143 = OpFunctionParameter  %4
+%144 = OpFunctionParameter  %5
+%142 = OpLabel
+OpBranch %146
+%146 = OpLabel
+%147 = OpArrayLength  %8  %13 3
+%148 = OpULessThan  %23  %143 %147
+OpSelectionMerge %150 None
+OpBranchConditional %148 %151 %150
+%151 = OpLabel
+%149 = OpAccessChain  %21  %13 %38 %143
+OpStore %149 %144
+OpBranch %150
+%150 = OpLabel
 OpReturn
 OpFunctionEnd
-%158 = OpFunction  %2  None %139
-%156 = OpFunctionParameter  %4
-%157 = OpFunctionParameter  %5
-%155 = OpLabel
+%155 = OpFunction  %2  None %136
+%153 = OpFunctionParameter  %4
+%154 = OpFunctionParameter  %5
+%152 = OpLabel
+OpBranch %156
+%156 = OpLabel
+%157 = OpULessThan  %23  %153 %51
+OpSelectionMerge %159 None
+OpBranchConditional %157 %160 %159
+%160 = OpLabel
+%158 = OpAccessChain  %50  %13 %53 %153
+OpStore %158 %154
 OpBranch %159
 %159 = OpLabel
-%160 = OpULessThan  %23  %156 %51
-OpSelectionMerge %162 None
-OpBranchConditional %160 %163 %162
-%163 = OpLabel
-%161 = OpAccessChain  %50  %13 %53 %156
-OpStore %161 %157
-OpBranch %162
-%162 = OpLabel
 OpReturn
 OpFunctionEnd
-%167 = OpFunction  %2  None %168
-%165 = OpFunctionParameter  %4
-%166 = OpFunctionParameter  %9
-%164 = OpLabel
+%164 = OpFunction  %2  None %165
+%162 = OpFunctionParameter  %4
+%163 = OpFunctionParameter  %9
+%161 = OpLabel
+OpBranch %166
+%166 = OpLabel
+%167 = OpULessThan  %23  %162 %38
+OpSelectionMerge %169 None
+OpBranchConditional %167 %170 %169
+%170 = OpLabel
+%168 = OpAccessChain  %78  %13 %80 %162
+OpStore %168 %163
 OpBranch %169
 %169 = OpLabel
-%170 = OpULessThan  %23  %165 %38
-OpSelectionMerge %172 None
-OpBranchConditional %170 %173 %172
-%173 = OpLabel
-%171 = OpAccessChain  %78  %13 %80 %165
-OpStore %171 %166
-OpBranch %172
-%172 = OpLabel
 OpReturn
 OpFunctionEnd
-%178 = OpFunction  %2  None %179
-%175 = OpFunctionParameter  %4
-%176 = OpFunctionParameter  %4
-%177 = OpFunctionParameter  %5
-%174 = OpLabel
-OpBranch %180
-%180 = OpLabel
-%181 = OpULessThan  %23  %176 %51
-%182 = OpULessThan  %23  %175 %38
-%183 = OpLogicalAnd  %23  %181 %182
-OpSelectionMerge %185 None
-OpBranchConditional %183 %186 %185
-%186 = OpLabel
-%184 = OpAccessChain  %50  %13 %80 %175 %176
-OpStore %184 %177
-OpBranch %185
-%185 = OpLabel
+%175 = OpFunction  %2  None %176
+%172 = OpFunctionParameter  %4
+%173 = OpFunctionParameter  %4
+%174 = OpFunctionParameter  %5
+%171 = OpLabel
+OpBranch %177
+%177 = OpLabel
+%178 = OpULessThan  %23  %173 %51
+%179 = OpULessThan  %23  %172 %38
+%180 = OpLogicalAnd  %23  %178 %179
+OpSelectionMerge %182 None
+OpBranchConditional %180 %183 %182
+%183 = OpLabel
+%181 = OpAccessChain  %50  %13 %80 %172 %173
+OpStore %181 %174
+OpBranch %182
+%182 = OpLabel
 OpReturn
 OpFunctionEnd
-%190 = OpFunction  %2  None %139
-%188 = OpFunctionParameter  %4
-%189 = OpFunctionParameter  %5
-%187 = OpLabel
-OpBranch %191
-%191 = OpLabel
-%192 = OpConvertSToF  %5  %188
-%193 = OpFDiv  %5  %192 %105
-%194 = OpExtInst  %5  %1 Sin %193
-%195 = OpFMul  %5  %194 %105
-%196 = OpConvertFToS  %4  %195
-%197 = OpULessThan  %23  %196 %7
-OpSelectionMerge %199 None
-OpBranchConditional %197 %200 %199
-%200 = OpLabel
-%198 = OpAccessChain  %21  %13 %24 %196
-OpStore %198 %189
-OpBranch %199
-%199 = OpLabel
+%187 = OpFunction  %2  None %136
+%185 = OpFunctionParameter  %4
+%186 = OpFunctionParameter  %5
+%184 = OpLabel
+OpBranch %188
+%188 = OpLabel
+%189 = OpConvertSToF  %5  %185
+%190 = OpFDiv  %5  %189 %105
+%191 = OpExtInst  %5  %1 Sin %190
+%192 = OpFMul  %5  %191 %105
+%193 = OpConvertFToS  %4  %192
+%194 = OpULessThan  %23  %193 %7
+OpSelectionMerge %196 None
+OpBranchConditional %194 %197 %196
+%197 = OpLabel
+%195 = OpAccessChain  %21  %13 %24 %193
+OpStore %195 %186
+OpBranch %196
+%196 = OpLabel
 OpReturn
 OpFunctionEnd
-%203 = OpFunction  %2  None %204
-%202 = OpFunctionParameter  %5
-%201 = OpLabel
-OpBranch %205
-%205 = OpLabel
-%206 = OpAccessChain  %21  %13 %24 %126
-OpStore %206 %202
-%207 = OpAccessChain  %50  %13 %53 %38
-OpStore %207 %202
-%208 = OpAccessChain  %50  %13 %80 %80 %38
-OpStore %208 %202
+%200 = OpFunction  %2  None %201
+%199 = OpFunctionParameter  %5
+%198 = OpLabel
+OpBranch %202
+%202 = OpLabel
+%203 = OpAccessChain  %21  %13 %24 %123
+OpStore %203 %199
+%204 = OpAccessChain  %50  %13 %53 %38
+OpStore %204 %199
+%205 = OpAccessChain  %50  %13 %80 %80 %38
+OpStore %205 %199
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/globals.spvasm b/tests/out/spv/globals.spvasm
index 9f5c1d4950..f50b806963 100644
--- a/tests/out/spv/globals.spvasm
+++ b/tests/out/spv/globals.spvasm
@@ -1,13 +1,13 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 186
+; Bound: 180
 OpCapability Shader
 OpExtension "SPV_KHR_storage_buffer_storage_class"
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint GLCompute %104 "main" %129
-OpExecutionMode %104 LocalSize 1 1 1
+OpEntryPoint GLCompute %103 "main" %123
+OpExecutionMode %103 LocalSize 1 1 1
 OpDecorate %11 ArrayStride 4
 OpMemberDecorate %13 0 Offset 0
 OpMemberDecorate %13 1 Offset 12
@@ -48,7 +48,7 @@ OpDecorate %50 DescriptorSet 0
 OpDecorate %50 Binding 7
 OpDecorate %51 Block
 OpMemberDecorate %51 0 Offset 0
-OpDecorate %129 BuiltIn LocalInvocationId
+OpDecorate %123 BuiltIn LocalInvocationId
 %2 = OpTypeVoid
 %4 = OpTypeBool
 %3 = OpConstantTrue  %4
@@ -108,55 +108,49 @@ OpDecorate %129 BuiltIn LocalInvocationId
 %65 = OpConstant  %6  0
 %67 = OpConstant  %10  1.0
 %68 = OpConstant  %8  1
-%69 = OpConstant  %8  0
-%70 = OpConstant  %10  2.0
-%71 = OpConstant  %10  3.0
+%69 = OpConstant  %10  2.0
+%70 = OpConstant  %10  3.0
+%71 = OpConstantNull  %27
 %72 = OpConstantNull  %27
-%73 = OpConstantNull  %27
-%75 = OpTypePointer StorageBuffer %12
-%78 = OpTypePointer StorageBuffer %10
-%98 = OpTypePointer Function %10
-%99 = OpConstantNull  %10
-%101 = OpTypePointer Function %4
-%102 = OpConstantNull  %4
-%106 = OpTypePointer StorageBuffer %15
-%108 = OpTypePointer Uniform %17
-%110 = OpTypePointer Uniform %12
-%112 = OpTypePointer Uniform %19
-%114 = OpTypePointer Uniform %23
-%116 = OpTypePointer Uniform %26
-%118 = OpConstant  %8  7
-%119 = OpConstant  %8  6
-%120 = OpConstant  %8  5
-%121 = OpConstant  %8  4
-%122 = OpConstant  %8  3
-%123 = OpConstant  %10  4.0
-%124 = OpConstantTrue  %4
-%126 = OpConstantNull  %11
-%127 = OpConstantNull  %6
-%128 = OpTypeVector %6 3
-%130 = OpTypePointer Input %128
-%129 = OpVariable  %130  Input
-%132 = OpConstantNull  %128
-%133 = OpTypeVector %4 3
-%138 = OpConstant  %6  264
-%141 = OpTypePointer Workgroup %10
-%142 = OpTypePointer Uniform %25
-%143 = OpTypePointer Uniform %24
-%146 = OpTypePointer Uniform %21
-%147 = OpTypePointer Uniform %20
-%148 = OpTypePointer Uniform %16
-%153 = OpConstant  %6  7
-%159 = OpConstant  %6  6
-%161 = OpTypePointer StorageBuffer %14
-%162 = OpConstant  %6  1
-%165 = OpConstant  %6  5
-%167 = OpTypePointer Uniform %16
-%168 = OpTypePointer Uniform %10
-%169 = OpConstant  %6  3
-%172 = OpConstant  %6  4
-%174 = OpTypePointer StorageBuffer %10
-%185 = OpConstant  %6  256
+%74 = OpTypePointer StorageBuffer %12
+%77 = OpTypePointer StorageBuffer %10
+%97 = OpTypePointer Function %10
+%98 = OpConstantNull  %10
+%100 = OpTypePointer Function %4
+%101 = OpConstantNull  %4
+%105 = OpTypePointer StorageBuffer %15
+%107 = OpTypePointer Uniform %17
+%109 = OpTypePointer Uniform %12
+%111 = OpTypePointer Uniform %19
+%113 = OpTypePointer Uniform %23
+%115 = OpTypePointer Uniform %26
+%117 = OpConstant  %10  4.0
+%118 = OpConstantTrue  %4
+%120 = OpConstantNull  %11
+%121 = OpConstantNull  %6
+%122 = OpTypeVector %6 3
+%124 = OpTypePointer Input %122
+%123 = OpVariable  %124  Input
+%126 = OpConstantNull  %122
+%127 = OpTypeVector %4 3
+%132 = OpConstant  %6  264
+%135 = OpTypePointer Workgroup %10
+%136 = OpTypePointer Uniform %25
+%137 = OpTypePointer Uniform %24
+%140 = OpTypePointer Uniform %21
+%141 = OpTypePointer Uniform %20
+%142 = OpTypePointer Uniform %16
+%147 = OpConstant  %6  7
+%153 = OpConstant  %6  6
+%155 = OpTypePointer StorageBuffer %14
+%156 = OpConstant  %6  1
+%159 = OpConstant  %6  5
+%161 = OpTypePointer Uniform %16
+%162 = OpTypePointer Uniform %10
+%163 = OpConstant  %6  3
+%166 = OpConstant  %6  4
+%168 = OpTypePointer StorageBuffer %10
+%179 = OpConstant  %6  256
 %55 = OpFunction  %2  None %56
 %54 = OpFunctionParameter  %12
 %53 = OpLabel
@@ -168,100 +162,100 @@ OpFunctionEnd
 %61 = OpLabel
 %58 = OpVariable  %59  Function %60
 %66 = OpAccessChain  %64  %32 %65
-OpBranch %74
-%74 = OpLabel
-%76 = OpCompositeConstruct  %12  %67 %67 %67
-%77 = OpAccessChain  %75  %66 %65
-OpStore %77 %76
+OpBranch %73
+%73 = OpLabel
+%75 = OpCompositeConstruct  %12  %67 %67 %67
+%76 = OpAccessChain  %74  %66 %65
+OpStore %76 %75
 OpStore %58 %68
-%79 = OpAccessChain  %78  %66 %65 %65
-OpStore %79 %67
-%80 = OpAccessChain  %78  %66 %65 %65
-OpStore %80 %70
-%81 = OpLoad  %8  %58
-%82 = OpAccessChain  %78  %66 %65 %81
-OpStore %82 %71
-%83 = OpLoad  %13  %66
-%84 = OpCompositeExtract  %12  %83 0
-%85 = OpCompositeExtract  %12  %83 0
-%86 = OpVectorShuffle  %14  %85 %85 2 0
-%87 = OpCompositeExtract  %12  %83 0
-%88 = OpFunctionCall  %2  %55 %87
-%89 = OpCompositeExtract  %12  %83 0
-%90 = OpVectorTimesMatrix  %12  %89 %72
-%91 = OpCompositeExtract  %12  %83 0
-%92 = OpMatrixTimesVector  %12  %73 %91
-%93 = OpCompositeExtract  %12  %83 0
-%94 = OpVectorTimesScalar  %12  %93 %70
-%95 = OpCompositeExtract  %12  %83 0
-%96 = OpVectorTimesScalar  %12  %95 %70
+%78 = OpAccessChain  %77  %66 %65 %65
+OpStore %78 %67
+%79 = OpAccessChain  %77  %66 %65 %65
+OpStore %79 %69
+%80 = OpLoad  %8  %58
+%81 = OpAccessChain  %77  %66 %65 %80
+OpStore %81 %70
+%82 = OpLoad  %13  %66
+%83 = OpCompositeExtract  %12  %82 0
+%84 = OpCompositeExtract  %12  %82 0
+%85 = OpVectorShuffle  %14  %84 %84 2 0
+%86 = OpCompositeExtract  %12  %82 0
+%87 = OpFunctionCall  %2  %55 %86
+%88 = OpCompositeExtract  %12  %82 0
+%89 = OpVectorTimesMatrix  %12  %88 %71
+%90 = OpCompositeExtract  %12  %82 0
+%91 = OpMatrixTimesVector  %12  %72 %90
+%92 = OpCompositeExtract  %12  %82 0
+%93 = OpVectorTimesScalar  %12  %92 %69
+%94 = OpCompositeExtract  %12  %82 0
+%95 = OpVectorTimesScalar  %12  %94 %69
 OpReturn
 OpFunctionEnd
-%104 = OpFunction  %2  None %63
-%103 = OpLabel
-%97 = OpVariable  %98  Function %99
-%100 = OpVariable  %101  Function %102
-%105 = OpAccessChain  %64  %32 %65
-%107 = OpAccessChain  %106  %35 %65
-%109 = OpAccessChain  %108  %38 %65
-%111 = OpAccessChain  %110  %41 %65
-%113 = OpAccessChain  %112  %44 %65
-%115 = OpAccessChain  %114  %47 %65
-%117 = OpAccessChain  %116  %50 %65
-OpBranch %125
-%125 = OpLabel
-%131 = OpLoad  %128  %129
-%134 = OpIEqual  %133  %131 %132
-%135 = OpAll  %4  %134
-OpSelectionMerge %136 None
-OpBranchConditional %135 %137 %136
-%137 = OpLabel
-OpStore %28 %126
-OpStore %30 %127
-OpBranch %136
-%136 = OpLabel
-OpControlBarrier %22 %22 %138
-OpBranch %139
-%139 = OpLabel
-%140 = OpFunctionCall  %2  %62
-%144 = OpAccessChain  %143  %117 %65 %65
-%145 = OpLoad  %24  %144
-%149 = OpAccessChain  %148  %115 %65 %65 %65
-%150 = OpLoad  %16  %149
-%151 = OpMatrixTimesVector  %14  %145 %150
+%103 = OpFunction  %2  None %63
+%102 = OpLabel
+%96 = OpVariable  %97  Function %98
+%99 = OpVariable  %100  Function %101
+%104 = OpAccessChain  %64  %32 %65
+%106 = OpAccessChain  %105  %35 %65
+%108 = OpAccessChain  %107  %38 %65
+%110 = OpAccessChain  %109  %41 %65
+%112 = OpAccessChain  %111  %44 %65
+%114 = OpAccessChain  %113  %47 %65
+%116 = OpAccessChain  %115  %50 %65
+OpBranch %119
+%119 = OpLabel
+%125 = OpLoad  %122  %123
+%128 = OpIEqual  %127  %125 %126
+%129 = OpAll  %4  %128
+OpSelectionMerge %130 None
+OpBranchConditional %129 %131 %130
+%131 = OpLabel
+OpStore %28 %120
+OpStore %30 %121
+OpBranch %130
+%130 = OpLabel
+OpControlBarrier %22 %22 %132
+OpBranch %133
+%133 = OpLabel
+%134 = OpFunctionCall  %2  %62
+%138 = OpAccessChain  %137  %116 %65 %65
+%139 = OpLoad  %24  %138
+%143 = OpAccessChain  %142  %114 %65 %65 %65
+%144 = OpLoad  %16  %143
+%145 = OpMatrixTimesVector  %14  %139 %144
+%146 = OpCompositeExtract  %10  %145 0
+%148 = OpAccessChain  %135  %28 %147
+OpStore %148 %146
+%149 = OpLoad  %19  %112
+%150 = OpLoad  %12  %110
+%151 = OpMatrixTimesVector  %14  %149 %150
 %152 = OpCompositeExtract  %10  %151 0
-%154 = OpAccessChain  %141  %28 %153
+%154 = OpAccessChain  %135  %28 %153
 OpStore %154 %152
-%155 = OpLoad  %19  %113
-%156 = OpLoad  %12  %111
-%157 = OpMatrixTimesVector  %14  %155 %156
-%158 = OpCompositeExtract  %10  %157 0
-%160 = OpAccessChain  %141  %28 %159
+%157 = OpAccessChain  %77  %106 %156 %156
+%158 = OpLoad  %10  %157
+%160 = OpAccessChain  %135  %28 %159
 OpStore %160 %158
-%163 = OpAccessChain  %78  %107 %162 %162
-%164 = OpLoad  %10  %163
-%166 = OpAccessChain  %141  %28 %165
-OpStore %166 %164
-%170 = OpAccessChain  %168  %109 %65 %169
-%171 = OpLoad  %10  %170
-%173 = OpAccessChain  %141  %28 %172
-OpStore %173 %171
-%175 = OpAccessChain  %174  %105 %162
-%176 = OpLoad  %10  %175
-%177 = OpAccessChain  %141  %28 %169
-OpStore %177 %176
-%178 = OpAccessChain  %78  %105 %65 %65
-%179 = OpLoad  %10  %178
-%180 = OpAccessChain  %141  %28 %22
-OpStore %180 %179
-%181 = OpAccessChain  %174  %105 %162
-OpStore %181 %123
-%182 = OpArrayLength  %6  %35 0
-%183 = OpConvertUToF  %10  %182
-%184 = OpAccessChain  %141  %28 %162
-OpStore %184 %183
-OpAtomicStore %30 %9 %185 %22
-OpStore %97 %67
-OpStore %100 %124
+%164 = OpAccessChain  %162  %108 %65 %163
+%165 = OpLoad  %10  %164
+%167 = OpAccessChain  %135  %28 %166
+OpStore %167 %165
+%169 = OpAccessChain  %168  %104 %156
+%170 = OpLoad  %10  %169
+%171 = OpAccessChain  %135  %28 %163
+OpStore %171 %170
+%172 = OpAccessChain  %77  %104 %65 %65
+%173 = OpLoad  %10  %172
+%174 = OpAccessChain  %135  %28 %22
+OpStore %174 %173
+%175 = OpAccessChain  %168  %104 %156
+OpStore %175 %117
+%176 = OpArrayLength  %6  %35 0
+%177 = OpConvertUToF  %10  %176
+%178 = OpAccessChain  %135  %28 %156
+OpStore %178 %177
+OpAtomicStore %30 %9 %179 %22
+OpStore %96 %67
+OpStore %99 %118
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/interface.compute.spvasm b/tests/out/spv/interface.compute.spvasm
index 3e2e2a348b..533a3daa5f 100644
--- a/tests/out/spv/interface.compute.spvasm
+++ b/tests/out/spv/interface.compute.spvasm
@@ -1,7 +1,7 @@
 ; SPIR-V
 ; Version: 1.0
 ; Generator: rspirv
-; Bound: 56
+; Bound: 55
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
@@ -44,14 +44,13 @@ OpDecorate %29 BuiltIn NumWorkgroups
 %27 = OpVariable  %20  Input
 %29 = OpVariable  %20  Input
 %32 = OpTypeFunction %2
-%33 = OpConstant  %4  0
-%35 = OpConstantNull  %11
-%36 = OpConstantNull  %13
-%37 = OpTypeVector %10 3
-%42 = OpConstant  %8  2
-%43 = OpConstant  %8  264
-%45 = OpTypePointer Workgroup %8
-%54 = OpConstant  %8  0
+%34 = OpConstantNull  %11
+%35 = OpConstantNull  %13
+%36 = OpTypeVector %10 3
+%41 = OpConstant  %8  2
+%42 = OpConstant  %8  264
+%44 = OpTypePointer Workgroup %8
+%53 = OpConstant  %8  0
 %31 = OpFunction  %2  None %32
 %18 = OpLabel
 %21 = OpLoad  %13  %19
@@ -59,28 +58,28 @@ OpDecorate %29 BuiltIn NumWorkgroups
 %26 = OpLoad  %8  %24
 %28 = OpLoad  %13  %27
 %30 = OpLoad  %13  %29
-OpBranch %34
-%34 = OpLabel
-%38 = OpIEqual  %37  %23 %36
-%39 = OpAll  %10  %38
-OpSelectionMerge %40 None
-OpBranchConditional %39 %41 %40
-%41 = OpLabel
-OpStore %16 %35
-OpBranch %40
+OpBranch %33
+%33 = OpLabel
+%37 = OpIEqual  %36  %23 %35
+%38 = OpAll  %10  %37
+OpSelectionMerge %39 None
+OpBranchConditional %38 %40 %39
 %40 = OpLabel
-OpControlBarrier %42 %42 %43
-OpBranch %44
-%44 = OpLabel
-%46 = OpCompositeExtract  %8  %21 0
-%47 = OpCompositeExtract  %8  %23 0
-%48 = OpIAdd  %8  %46 %47
-%49 = OpIAdd  %8  %48 %26
-%50 = OpCompositeExtract  %8  %28 0
-%51 = OpIAdd  %8  %49 %50
-%52 = OpCompositeExtract  %8  %30 0
-%53 = OpIAdd  %8  %51 %52
-%55 = OpAccessChain  %45  %16 %54
-OpStore %55 %53
+OpStore %16 %34
+OpBranch %39
+%39 = OpLabel
+OpControlBarrier %41 %41 %42
+OpBranch %43
+%43 = OpLabel
+%45 = OpCompositeExtract  %8  %21 0
+%46 = OpCompositeExtract  %8  %23 0
+%47 = OpIAdd  %8  %45 %46
+%48 = OpIAdd  %8  %47 %26
+%49 = OpCompositeExtract  %8  %28 0
+%50 = OpIAdd  %8  %48 %49
+%51 = OpCompositeExtract  %8  %30 0
+%52 = OpIAdd  %8  %50 %51
+%54 = OpAccessChain  %44  %16 %53
+OpStore %54 %52
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/spv/operators.spvasm b/tests/out/spv/operators.spvasm
index 9457752921..783b789c29 100644
--- a/tests/out/spv/operators.spvasm
+++ b/tests/out/spv/operators.spvasm
@@ -1,12 +1,12 @@
 ; SPIR-V
 ; Version: 1.1
 ; Generator: rspirv
-; Bound: 589
+; Bound: 591
 OpCapability Shader
 %1 = OpExtInstImport "GLSL.std.450"
 OpMemoryModel Logical GLSL450
-OpEntryPoint GLCompute %577 "main"
-OpExecutionMode %577 LocalSize 1 1 1
+OpEntryPoint GLCompute %579 "main"
+OpExecutionMode %579 LocalSize 1 1 1
 OpMemberDecorate %17 0 Offset 0
 OpMemberDecorate %17 1 Offset 16
 OpDecorate %22 ArrayStride 32
@@ -99,20 +99,20 @@ OpDecorate %24 ArrayStride 4
 %195 = OpConstantNull  %29
 %197 = OpTypeVector %8 2
 %208 = OpTypeVector %20 3
-%503 = OpTypePointer Function %8
-%504 = OpConstantNull  %8
-%506 = OpTypePointer Function %30
-%507 = OpConstantNull  %30
-%510 = OpConstantNull  %30
-%538 = OpTypePointer Function %8
-%549 = OpConstant  %8  -1
-%550 = OpConstant  %8  -2
-%551 = OpConstant  %8  -3
-%552 = OpConstant  %8  4
-%553 = OpConstant  %8  -5
-%554 = OpConstant  %8  6
-%555 = OpConstant  %8  -7
-%556 = OpConstant  %8  -8
+%505 = OpTypePointer Function %8
+%506 = OpConstantNull  %8
+%508 = OpTypePointer Function %30
+%509 = OpConstantNull  %30
+%512 = OpConstantNull  %30
+%540 = OpTypePointer Function %8
+%551 = OpConstant  %8  -1
+%552 = OpConstant  %8  -2
+%553 = OpConstant  %8  -3
+%554 = OpConstant  %8  4
+%555 = OpConstant  %8  -5
+%556 = OpConstant  %8  6
+%557 = OpConstant  %8  -7
+%558 = OpConstant  %8  -8
 %36 = OpFunction  %10  None %37
 %35 = OpLabel
 OpBranch %42
@@ -304,348 +304,352 @@ OpBranch %196
 %260 = OpCompositeConstruct  %10  %66 %66 %66 %66
 %261 = OpCompositeConstruct  %10  %3 %3 %3 %3
 %262 = OpFRem  %10  %260 %261
-%263 = OpCompositeConstruct  %197  %70 %70
-%264 = OpCompositeConstruct  %197  %7 %7
-%265 = OpIAdd  %197  %263 %264
+OpBranch %263
+%263 = OpLabel
+%265 = OpCompositeConstruct  %197  %70 %70
 %266 = OpCompositeConstruct  %197  %7 %7
-%267 = OpCompositeConstruct  %197  %70 %70
-%268 = OpIAdd  %197  %267 %266
-%269 = OpCompositeConstruct  %21  %184 %184
-%270 = OpCompositeConstruct  %21  %185 %185
-%271 = OpIAdd  %21  %269 %270
+%267 = OpIAdd  %197  %265 %266
+%268 = OpCompositeConstruct  %197  %7 %7
+%269 = OpCompositeConstruct  %197  %70 %70
+%270 = OpIAdd  %197  %269 %268
+%271 = OpCompositeConstruct  %21  %184 %184
 %272 = OpCompositeConstruct  %21  %185 %185
-%273 = OpCompositeConstruct  %21  %184 %184
-%274 = OpIAdd  %21  %273 %272
-%275 = OpCompositeConstruct  %14  %66 %66
-%276 = OpCompositeConstruct  %14  %3 %3
-%277 = OpFAdd  %14  %275 %276
+%273 = OpIAdd  %21  %271 %272
+%274 = OpCompositeConstruct  %21  %185 %185
+%275 = OpCompositeConstruct  %21  %184 %184
+%276 = OpIAdd  %21  %275 %274
+%277 = OpCompositeConstruct  %14  %66 %66
 %278 = OpCompositeConstruct  %14  %3 %3
-%279 = OpCompositeConstruct  %14  %66 %66
-%280 = OpFAdd  %14  %279 %278
-%281 = OpCompositeConstruct  %197  %70 %70
-%282 = OpCompositeConstruct  %197  %7 %7
-%283 = OpISub  %197  %281 %282
+%279 = OpFAdd  %14  %277 %278
+%280 = OpCompositeConstruct  %14  %3 %3
+%281 = OpCompositeConstruct  %14  %66 %66
+%282 = OpFAdd  %14  %281 %280
+%283 = OpCompositeConstruct  %197  %70 %70
 %284 = OpCompositeConstruct  %197  %7 %7
-%285 = OpCompositeConstruct  %197  %70 %70
-%286 = OpISub  %197  %285 %284
-%287 = OpCompositeConstruct  %21  %184 %184
-%288 = OpCompositeConstruct  %21  %185 %185
-%289 = OpISub  %21  %287 %288
+%285 = OpISub  %197  %283 %284
+%286 = OpCompositeConstruct  %197  %7 %7
+%287 = OpCompositeConstruct  %197  %70 %70
+%288 = OpISub  %197  %287 %286
+%289 = OpCompositeConstruct  %21  %184 %184
 %290 = OpCompositeConstruct  %21  %185 %185
-%291 = OpCompositeConstruct  %21  %184 %184
-%292 = OpISub  %21  %291 %290
-%293 = OpCompositeConstruct  %14  %66 %66
-%294 = OpCompositeConstruct  %14  %3 %3
-%295 = OpFSub  %14  %293 %294
+%291 = OpISub  %21  %289 %290
+%292 = OpCompositeConstruct  %21  %185 %185
+%293 = OpCompositeConstruct  %21  %184 %184
+%294 = OpISub  %21  %293 %292
+%295 = OpCompositeConstruct  %14  %66 %66
 %296 = OpCompositeConstruct  %14  %3 %3
-%297 = OpCompositeConstruct  %14  %66 %66
-%298 = OpFSub  %14  %297 %296
-%299 = OpCompositeConstruct  %197  %70 %70
-%301 = OpCompositeConstruct  %197  %7 %7
-%300 = OpIMul  %197  %299 %301
-%302 = OpCompositeConstruct  %197  %7 %7
-%304 = OpCompositeConstruct  %197  %70 %70
-%303 = OpIMul  %197  %302 %304
-%305 = OpCompositeConstruct  %21  %184 %184
-%307 = OpCompositeConstruct  %21  %185 %185
-%306 = OpIMul  %21  %305 %307
-%308 = OpCompositeConstruct  %21  %185 %185
-%310 = OpCompositeConstruct  %21  %184 %184
-%309 = OpIMul  %21  %308 %310
-%311 = OpCompositeConstruct  %14  %66 %66
-%312 = OpVectorTimesScalar  %14  %311 %3
-%313 = OpCompositeConstruct  %14  %3 %3
-%314 = OpVectorTimesScalar  %14  %313 %66
-%315 = OpCompositeConstruct  %197  %70 %70
-%316 = OpCompositeConstruct  %197  %7 %7
-%317 = OpSDiv  %197  %315 %316
+%297 = OpFSub  %14  %295 %296
+%298 = OpCompositeConstruct  %14  %3 %3
+%299 = OpCompositeConstruct  %14  %66 %66
+%300 = OpFSub  %14  %299 %298
+%301 = OpCompositeConstruct  %197  %70 %70
+%303 = OpCompositeConstruct  %197  %7 %7
+%302 = OpIMul  %197  %301 %303
+%304 = OpCompositeConstruct  %197  %7 %7
+%306 = OpCompositeConstruct  %197  %70 %70
+%305 = OpIMul  %197  %304 %306
+%307 = OpCompositeConstruct  %21  %184 %184
+%309 = OpCompositeConstruct  %21  %185 %185
+%308 = OpIMul  %21  %307 %309
+%310 = OpCompositeConstruct  %21  %185 %185
+%312 = OpCompositeConstruct  %21  %184 %184
+%311 = OpIMul  %21  %310 %312
+%313 = OpCompositeConstruct  %14  %66 %66
+%314 = OpVectorTimesScalar  %14  %313 %3
+%315 = OpCompositeConstruct  %14  %3 %3
+%316 = OpVectorTimesScalar  %14  %315 %66
+%317 = OpCompositeConstruct  %197  %70 %70
 %318 = OpCompositeConstruct  %197  %7 %7
-%319 = OpCompositeConstruct  %197  %70 %70
-%320 = OpSDiv  %197  %319 %318
-%321 = OpCompositeConstruct  %21  %184 %184
-%322 = OpCompositeConstruct  %21  %185 %185
-%323 = OpUDiv  %21  %321 %322
+%319 = OpSDiv  %197  %317 %318
+%320 = OpCompositeConstruct  %197  %7 %7
+%321 = OpCompositeConstruct  %197  %70 %70
+%322 = OpSDiv  %197  %321 %320
+%323 = OpCompositeConstruct  %21  %184 %184
 %324 = OpCompositeConstruct  %21  %185 %185
-%325 = OpCompositeConstruct  %21  %184 %184
-%326 = OpUDiv  %21  %325 %324
-%327 = OpCompositeConstruct  %14  %66 %66
-%328 = OpCompositeConstruct  %14  %3 %3
-%329 = OpFDiv  %14  %327 %328
+%325 = OpUDiv  %21  %323 %324
+%326 = OpCompositeConstruct  %21  %185 %185
+%327 = OpCompositeConstruct  %21  %184 %184
+%328 = OpUDiv  %21  %327 %326
+%329 = OpCompositeConstruct  %14  %66 %66
 %330 = OpCompositeConstruct  %14  %3 %3
-%331 = OpCompositeConstruct  %14  %66 %66
-%332 = OpFDiv  %14  %331 %330
-%333 = OpCompositeConstruct  %197  %70 %70
-%334 = OpCompositeConstruct  %197  %7 %7
-%335 = OpSRem  %197  %333 %334
+%331 = OpFDiv  %14  %329 %330
+%332 = OpCompositeConstruct  %14  %3 %3
+%333 = OpCompositeConstruct  %14  %66 %66
+%334 = OpFDiv  %14  %333 %332
+%335 = OpCompositeConstruct  %197  %70 %70
 %336 = OpCompositeConstruct  %197  %7 %7
-%337 = OpCompositeConstruct  %197  %70 %70
-%338 = OpSRem  %197  %337 %336
-%339 = OpCompositeConstruct  %21  %184 %184
-%340 = OpCompositeConstruct  %21  %185 %185
-%341 = OpUMod  %21  %339 %340
+%337 = OpSRem  %197  %335 %336
+%338 = OpCompositeConstruct  %197  %7 %7
+%339 = OpCompositeConstruct  %197  %70 %70
+%340 = OpSRem  %197  %339 %338
+%341 = OpCompositeConstruct  %21  %184 %184
 %342 = OpCompositeConstruct  %21  %185 %185
-%343 = OpCompositeConstruct  %21  %184 %184
-%344 = OpUMod  %21  %343 %342
-%345 = OpCompositeConstruct  %14  %66 %66
-%346 = OpCompositeConstruct  %14  %3 %3
-%347 = OpFRem  %14  %345 %346
+%343 = OpUMod  %21  %341 %342
+%344 = OpCompositeConstruct  %21  %185 %185
+%345 = OpCompositeConstruct  %21  %184 %184
+%346 = OpUMod  %21  %345 %344
+%347 = OpCompositeConstruct  %14  %66 %66
 %348 = OpCompositeConstruct  %14  %3 %3
-%349 = OpCompositeConstruct  %14  %66 %66
-%350 = OpFRem  %14  %349 %348
-%352 = OpCompositeExtract  %15  %186 0
-%353 = OpCompositeExtract  %15  %187 0
-%354 = OpFAdd  %15  %352 %353
-%355 = OpCompositeExtract  %15  %186 1
-%356 = OpCompositeExtract  %15  %187 1
-%357 = OpFAdd  %15  %355 %356
-%358 = OpCompositeExtract  %15  %186 2
-%359 = OpCompositeExtract  %15  %187 2
-%360 = OpFAdd  %15  %358 %359
-%351 = OpCompositeConstruct  %27  %354 %357 %360
-%362 = OpCompositeExtract  %15  %188 0
-%363 = OpCompositeExtract  %15  %189 0
-%364 = OpFSub  %15  %362 %363
-%365 = OpCompositeExtract  %15  %188 1
-%366 = OpCompositeExtract  %15  %189 1
-%367 = OpFSub  %15  %365 %366
-%368 = OpCompositeExtract  %15  %188 2
-%369 = OpCompositeExtract  %15  %189 2
-%370 = OpFSub  %15  %368 %369
-%361 = OpCompositeConstruct  %27  %364 %367 %370
-%371 = OpMatrixTimesScalar  %27  %190 %3
-%372 = OpMatrixTimesScalar  %27  %191 %66
-%373 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%374 = OpMatrixTimesVector  %15  %192 %373
-%375 = OpCompositeConstruct  %15  %66 %66 %66
-%376 = OpVectorTimesMatrix  %10  %375 %193
-%377 = OpMatrixTimesMatrix  %27  %194 %195
+%349 = OpFRem  %14  %347 %348
+%350 = OpCompositeConstruct  %14  %3 %3
+%351 = OpCompositeConstruct  %14  %66 %66
+%352 = OpFRem  %14  %351 %350
+OpBranch %264
+%264 = OpLabel
+%354 = OpCompositeExtract  %15  %186 0
+%355 = OpCompositeExtract  %15  %187 0
+%356 = OpFAdd  %15  %354 %355
+%357 = OpCompositeExtract  %15  %186 1
+%358 = OpCompositeExtract  %15  %187 1
+%359 = OpFAdd  %15  %357 %358
+%360 = OpCompositeExtract  %15  %186 2
+%361 = OpCompositeExtract  %15  %187 2
+%362 = OpFAdd  %15  %360 %361
+%353 = OpCompositeConstruct  %27  %356 %359 %362
+%364 = OpCompositeExtract  %15  %188 0
+%365 = OpCompositeExtract  %15  %189 0
+%366 = OpFSub  %15  %364 %365
+%367 = OpCompositeExtract  %15  %188 1
+%368 = OpCompositeExtract  %15  %189 1
+%369 = OpFSub  %15  %367 %368
+%370 = OpCompositeExtract  %15  %188 2
+%371 = OpCompositeExtract  %15  %189 2
+%372 = OpFSub  %15  %370 %371
+%363 = OpCompositeConstruct  %27  %366 %369 %372
+%373 = OpMatrixTimesScalar  %27  %190 %3
+%374 = OpMatrixTimesScalar  %27  %191 %66
+%375 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%376 = OpMatrixTimesVector  %15  %192 %375
+%377 = OpCompositeConstruct  %15  %66 %66 %66
+%378 = OpVectorTimesMatrix  %10  %377 %193
+%379 = OpMatrixTimesMatrix  %27  %194 %195
 OpReturn
 OpFunctionEnd
-%379 = OpFunction  %2  None %165
-%378 = OpLabel
-OpBranch %380
+%381 = OpFunction  %2  None %165
 %380 = OpLabel
-%381 = OpNot  %8  %7
-%382 = OpNot  %20  %185
-%383 = OpCompositeConstruct  %197  %7 %7
-%384 = OpNot  %197  %383
-%385 = OpCompositeConstruct  %208  %185 %185 %185
-%386 = OpNot  %208  %385
-%387 = OpBitwiseOr  %8  %70 %7
-%388 = OpBitwiseOr  %20  %184 %185
-%389 = OpCompositeConstruct  %197  %70 %70
-%390 = OpCompositeConstruct  %197  %7 %7
-%391 = OpBitwiseOr  %197  %389 %390
-%392 = OpCompositeConstruct  %208  %184 %184 %184
-%393 = OpCompositeConstruct  %208  %185 %185 %185
-%394 = OpBitwiseOr  %208  %392 %393
-%395 = OpBitwiseAnd  %8  %70 %7
-%396 = OpBitwiseAnd  %20  %184 %185
-%397 = OpCompositeConstruct  %197  %70 %70
-%398 = OpCompositeConstruct  %197  %7 %7
-%399 = OpBitwiseAnd  %197  %397 %398
-%400 = OpCompositeConstruct  %208  %184 %184 %184
-%401 = OpCompositeConstruct  %208  %185 %185 %185
-%402 = OpBitwiseAnd  %208  %400 %401
-%403 = OpBitwiseXor  %8  %70 %7
-%404 = OpBitwiseXor  %20  %184 %185
-%405 = OpCompositeConstruct  %197  %70 %70
-%406 = OpCompositeConstruct  %197  %7 %7
-%407 = OpBitwiseXor  %197  %405 %406
-%408 = OpCompositeConstruct  %208  %184 %184 %184
-%409 = OpCompositeConstruct  %208  %185 %185 %185
-%410 = OpBitwiseXor  %208  %408 %409
-%411 = OpShiftLeftLogical  %8  %70 %185
-%412 = OpShiftLeftLogical  %20  %184 %185
-%413 = OpCompositeConstruct  %197  %70 %70
-%414 = OpCompositeConstruct  %21  %185 %185
-%415 = OpShiftLeftLogical  %197  %413 %414
-%416 = OpCompositeConstruct  %208  %184 %184 %184
-%417 = OpCompositeConstruct  %208  %185 %185 %185
-%418 = OpShiftLeftLogical  %208  %416 %417
-%419 = OpShiftRightArithmetic  %8  %70 %185
-%420 = OpShiftRightLogical  %20  %184 %185
-%421 = OpCompositeConstruct  %197  %70 %70
-%422 = OpCompositeConstruct  %21  %185 %185
-%423 = OpShiftRightArithmetic  %197  %421 %422
-%424 = OpCompositeConstruct  %208  %184 %184 %184
-%425 = OpCompositeConstruct  %208  %185 %185 %185
-%426 = OpShiftRightLogical  %208  %424 %425
+OpBranch %382
+%382 = OpLabel
+%383 = OpNot  %8  %7
+%384 = OpNot  %20  %185
+%385 = OpCompositeConstruct  %197  %7 %7
+%386 = OpNot  %197  %385
+%387 = OpCompositeConstruct  %208  %185 %185 %185
+%388 = OpNot  %208  %387
+%389 = OpBitwiseOr  %8  %70 %7
+%390 = OpBitwiseOr  %20  %184 %185
+%391 = OpCompositeConstruct  %197  %70 %70
+%392 = OpCompositeConstruct  %197  %7 %7
+%393 = OpBitwiseOr  %197  %391 %392
+%394 = OpCompositeConstruct  %208  %184 %184 %184
+%395 = OpCompositeConstruct  %208  %185 %185 %185
+%396 = OpBitwiseOr  %208  %394 %395
+%397 = OpBitwiseAnd  %8  %70 %7
+%398 = OpBitwiseAnd  %20  %184 %185
+%399 = OpCompositeConstruct  %197  %70 %70
+%400 = OpCompositeConstruct  %197  %7 %7
+%401 = OpBitwiseAnd  %197  %399 %400
+%402 = OpCompositeConstruct  %208  %184 %184 %184
+%403 = OpCompositeConstruct  %208  %185 %185 %185
+%404 = OpBitwiseAnd  %208  %402 %403
+%405 = OpBitwiseXor  %8  %70 %7
+%406 = OpBitwiseXor  %20  %184 %185
+%407 = OpCompositeConstruct  %197  %70 %70
+%408 = OpCompositeConstruct  %197  %7 %7
+%409 = OpBitwiseXor  %197  %407 %408
+%410 = OpCompositeConstruct  %208  %184 %184 %184
+%411 = OpCompositeConstruct  %208  %185 %185 %185
+%412 = OpBitwiseXor  %208  %410 %411
+%413 = OpShiftLeftLogical  %8  %70 %185
+%414 = OpShiftLeftLogical  %20  %184 %185
+%415 = OpCompositeConstruct  %197  %70 %70
+%416 = OpCompositeConstruct  %21  %185 %185
+%417 = OpShiftLeftLogical  %197  %415 %416
+%418 = OpCompositeConstruct  %208  %184 %184 %184
+%419 = OpCompositeConstruct  %208  %185 %185 %185
+%420 = OpShiftLeftLogical  %208  %418 %419
+%421 = OpShiftRightArithmetic  %8  %70 %185
+%422 = OpShiftRightLogical  %20  %184 %185
+%423 = OpCompositeConstruct  %197  %70 %70
+%424 = OpCompositeConstruct  %21  %185 %185
+%425 = OpShiftRightArithmetic  %197  %423 %424
+%426 = OpCompositeConstruct  %208  %184 %184 %184
+%427 = OpCompositeConstruct  %208  %185 %185 %185
+%428 = OpShiftRightLogical  %208  %426 %427
 OpReturn
 OpFunctionEnd
-%428 = OpFunction  %2  None %165
-%427 = OpLabel
-OpBranch %429
+%430 = OpFunction  %2  None %165
 %429 = OpLabel
-%430 = OpIEqual  %13  %70 %7
-%431 = OpIEqual  %13  %184 %185
-%432 = OpFOrdEqual  %13  %66 %3
-%433 = OpCompositeConstruct  %197  %70 %70
-%434 = OpCompositeConstruct  %197  %7 %7
-%435 = OpIEqual  %168  %433 %434
-%436 = OpCompositeConstruct  %208  %184 %184 %184
-%437 = OpCompositeConstruct  %208  %185 %185 %185
-%438 = OpIEqual  %16  %436 %437
-%439 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%440 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%441 = OpFOrdEqual  %12  %439 %440
-%442 = OpINotEqual  %13  %70 %7
-%443 = OpINotEqual  %13  %184 %185
-%444 = OpFOrdNotEqual  %13  %66 %3
-%445 = OpCompositeConstruct  %197  %70 %70
-%446 = OpCompositeConstruct  %197  %7 %7
-%447 = OpINotEqual  %168  %445 %446
-%448 = OpCompositeConstruct  %208  %184 %184 %184
-%449 = OpCompositeConstruct  %208  %185 %185 %185
-%450 = OpINotEqual  %16  %448 %449
-%451 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%452 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%453 = OpFOrdNotEqual  %12  %451 %452
-%454 = OpSLessThan  %13  %70 %7
-%455 = OpULessThan  %13  %184 %185
-%456 = OpFOrdLessThan  %13  %66 %3
-%457 = OpCompositeConstruct  %197  %70 %70
-%458 = OpCompositeConstruct  %197  %7 %7
-%459 = OpSLessThan  %168  %457 %458
-%460 = OpCompositeConstruct  %208  %184 %184 %184
-%461 = OpCompositeConstruct  %208  %185 %185 %185
-%462 = OpULessThan  %16  %460 %461
-%463 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%464 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%465 = OpFOrdLessThan  %12  %463 %464
-%466 = OpSLessThanEqual  %13  %70 %7
-%467 = OpULessThanEqual  %13  %184 %185
-%468 = OpFOrdLessThanEqual  %13  %66 %3
-%469 = OpCompositeConstruct  %197  %70 %70
-%470 = OpCompositeConstruct  %197  %7 %7
-%471 = OpSLessThanEqual  %168  %469 %470
-%472 = OpCompositeConstruct  %208  %184 %184 %184
-%473 = OpCompositeConstruct  %208  %185 %185 %185
-%474 = OpULessThanEqual  %16  %472 %473
-%475 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%476 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%477 = OpFOrdLessThanEqual  %12  %475 %476
-%478 = OpSGreaterThan  %13  %70 %7
-%479 = OpUGreaterThan  %13  %184 %185
-%480 = OpFOrdGreaterThan  %13  %66 %3
-%481 = OpCompositeConstruct  %197  %70 %70
-%482 = OpCompositeConstruct  %197  %7 %7
-%483 = OpSGreaterThan  %168  %481 %482
-%484 = OpCompositeConstruct  %208  %184 %184 %184
-%485 = OpCompositeConstruct  %208  %185 %185 %185
-%486 = OpUGreaterThan  %16  %484 %485
-%487 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%488 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%489 = OpFOrdGreaterThan  %12  %487 %488
-%490 = OpSGreaterThanEqual  %13  %70 %7
-%491 = OpUGreaterThanEqual  %13  %184 %185
-%492 = OpFOrdGreaterThanEqual  %13  %66 %3
-%493 = OpCompositeConstruct  %197  %70 %70
-%494 = OpCompositeConstruct  %197  %7 %7
-%495 = OpSGreaterThanEqual  %168  %493 %494
-%496 = OpCompositeConstruct  %208  %184 %184 %184
-%497 = OpCompositeConstruct  %208  %185 %185 %185
-%498 = OpUGreaterThanEqual  %16  %496 %497
-%499 = OpCompositeConstruct  %10  %66 %66 %66 %66
-%500 = OpCompositeConstruct  %10  %3 %3 %3 %3
-%501 = OpFOrdGreaterThanEqual  %12  %499 %500
+OpBranch %431
+%431 = OpLabel
+%432 = OpIEqual  %13  %70 %7
+%433 = OpIEqual  %13  %184 %185
+%434 = OpFOrdEqual  %13  %66 %3
+%435 = OpCompositeConstruct  %197  %70 %70
+%436 = OpCompositeConstruct  %197  %7 %7
+%437 = OpIEqual  %168  %435 %436
+%438 = OpCompositeConstruct  %208  %184 %184 %184
+%439 = OpCompositeConstruct  %208  %185 %185 %185
+%440 = OpIEqual  %16  %438 %439
+%441 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%442 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%443 = OpFOrdEqual  %12  %441 %442
+%444 = OpINotEqual  %13  %70 %7
+%445 = OpINotEqual  %13  %184 %185
+%446 = OpFOrdNotEqual  %13  %66 %3
+%447 = OpCompositeConstruct  %197  %70 %70
+%448 = OpCompositeConstruct  %197  %7 %7
+%449 = OpINotEqual  %168  %447 %448
+%450 = OpCompositeConstruct  %208  %184 %184 %184
+%451 = OpCompositeConstruct  %208  %185 %185 %185
+%452 = OpINotEqual  %16  %450 %451
+%453 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%454 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%455 = OpFOrdNotEqual  %12  %453 %454
+%456 = OpSLessThan  %13  %70 %7
+%457 = OpULessThan  %13  %184 %185
+%458 = OpFOrdLessThan  %13  %66 %3
+%459 = OpCompositeConstruct  %197  %70 %70
+%460 = OpCompositeConstruct  %197  %7 %7
+%461 = OpSLessThan  %168  %459 %460
+%462 = OpCompositeConstruct  %208  %184 %184 %184
+%463 = OpCompositeConstruct  %208  %185 %185 %185
+%464 = OpULessThan  %16  %462 %463
+%465 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%466 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%467 = OpFOrdLessThan  %12  %465 %466
+%468 = OpSLessThanEqual  %13  %70 %7
+%469 = OpULessThanEqual  %13  %184 %185
+%470 = OpFOrdLessThanEqual  %13  %66 %3
+%471 = OpCompositeConstruct  %197  %70 %70
+%472 = OpCompositeConstruct  %197  %7 %7
+%473 = OpSLessThanEqual  %168  %471 %472
+%474 = OpCompositeConstruct  %208  %184 %184 %184
+%475 = OpCompositeConstruct  %208  %185 %185 %185
+%476 = OpULessThanEqual  %16  %474 %475
+%477 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%478 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%479 = OpFOrdLessThanEqual  %12  %477 %478
+%480 = OpSGreaterThan  %13  %70 %7
+%481 = OpUGreaterThan  %13  %184 %185
+%482 = OpFOrdGreaterThan  %13  %66 %3
+%483 = OpCompositeConstruct  %197  %70 %70
+%484 = OpCompositeConstruct  %197  %7 %7
+%485 = OpSGreaterThan  %168  %483 %484
+%486 = OpCompositeConstruct  %208  %184 %184 %184
+%487 = OpCompositeConstruct  %208  %185 %185 %185
+%488 = OpUGreaterThan  %16  %486 %487
+%489 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%490 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%491 = OpFOrdGreaterThan  %12  %489 %490
+%492 = OpSGreaterThanEqual  %13  %70 %7
+%493 = OpUGreaterThanEqual  %13  %184 %185
+%494 = OpFOrdGreaterThanEqual  %13  %66 %3
+%495 = OpCompositeConstruct  %197  %70 %70
+%496 = OpCompositeConstruct  %197  %7 %7
+%497 = OpSGreaterThanEqual  %168  %495 %496
+%498 = OpCompositeConstruct  %208  %184 %184 %184
+%499 = OpCompositeConstruct  %208  %185 %185 %185
+%500 = OpUGreaterThanEqual  %16  %498 %499
+%501 = OpCompositeConstruct  %10  %66 %66 %66 %66
+%502 = OpCompositeConstruct  %10  %3 %3 %3 %3
+%503 = OpFOrdGreaterThanEqual  %12  %501 %502
 OpReturn
 OpFunctionEnd
-%509 = OpFunction  %2  None %165
-%508 = OpLabel
-%502 = OpVariable  %503  Function %504
-%505 = OpVariable  %506  Function %507
-OpBranch %511
-%511 = OpLabel
-OpStore %502 %7
-%512 = OpLoad  %8  %502
-%513 = OpIAdd  %8  %512 %7
-OpStore %502 %513
-%514 = OpLoad  %8  %502
-%515 = OpISub  %8  %514 %7
-OpStore %502 %515
-%516 = OpLoad  %8  %502
-%517 = OpLoad  %8  %502
-%518 = OpIMul  %8  %517 %516
-OpStore %502 %518
-%519 = OpLoad  %8  %502
-%520 = OpLoad  %8  %502
-%521 = OpSDiv  %8  %520 %519
-OpStore %502 %521
-%522 = OpLoad  %8  %502
-%523 = OpSRem  %8  %522 %7
-OpStore %502 %523
-%524 = OpLoad  %8  %502
-%525 = OpBitwiseAnd  %8  %524 %39
-OpStore %502 %525
-%526 = OpLoad  %8  %502
-%527 = OpBitwiseOr  %8  %526 %39
-OpStore %502 %527
-%528 = OpLoad  %8  %502
-%529 = OpBitwiseXor  %8  %528 %39
-OpStore %502 %529
-%530 = OpLoad  %8  %502
-%531 = OpShiftLeftLogical  %8  %530 %184
-OpStore %502 %531
-%532 = OpLoad  %8  %502
-%533 = OpShiftRightArithmetic  %8  %532 %185
-OpStore %502 %533
-%534 = OpLoad  %8  %502
-%535 = OpIAdd  %8  %534 %7
-OpStore %502 %535
-%536 = OpLoad  %8  %502
-%537 = OpISub  %8  %536 %7
-OpStore %502 %537
-OpStore %505 %510
-%539 = OpAccessChain  %538  %505 %185
-%540 = OpLoad  %8  %539
-%541 = OpIAdd  %8  %540 %7
-%542 = OpAccessChain  %538  %505 %185
-OpStore %542 %541
-%543 = OpAccessChain  %538  %505 %185
-%544 = OpLoad  %8  %543
-%545 = OpISub  %8  %544 %7
-%546 = OpAccessChain  %538  %505 %185
-OpStore %546 %545
+%511 = OpFunction  %2  None %165
+%510 = OpLabel
+%504 = OpVariable  %505  Function %506
+%507 = OpVariable  %508  Function %509
+OpBranch %513
+%513 = OpLabel
+OpStore %504 %7
+%514 = OpLoad  %8  %504
+%515 = OpIAdd  %8  %514 %7
+OpStore %504 %515
+%516 = OpLoad  %8  %504
+%517 = OpISub  %8  %516 %7
+OpStore %504 %517
+%518 = OpLoad  %8  %504
+%519 = OpLoad  %8  %504
+%520 = OpIMul  %8  %519 %518
+OpStore %504 %520
+%521 = OpLoad  %8  %504
+%522 = OpLoad  %8  %504
+%523 = OpSDiv  %8  %522 %521
+OpStore %504 %523
+%524 = OpLoad  %8  %504
+%525 = OpSRem  %8  %524 %7
+OpStore %504 %525
+%526 = OpLoad  %8  %504
+%527 = OpBitwiseAnd  %8  %526 %39
+OpStore %504 %527
+%528 = OpLoad  %8  %504
+%529 = OpBitwiseOr  %8  %528 %39
+OpStore %504 %529
+%530 = OpLoad  %8  %504
+%531 = OpBitwiseXor  %8  %530 %39
+OpStore %504 %531
+%532 = OpLoad  %8  %504
+%533 = OpShiftLeftLogical  %8  %532 %184
+OpStore %504 %533
+%534 = OpLoad  %8  %504
+%535 = OpShiftRightArithmetic  %8  %534 %185
+OpStore %504 %535
+%536 = OpLoad  %8  %504
+%537 = OpIAdd  %8  %536 %7
+OpStore %504 %537
+%538 = OpLoad  %8  %504
+%539 = OpISub  %8  %538 %7
+OpStore %504 %539
+OpStore %507 %512
+%541 = OpAccessChain  %540  %507 %185
+%542 = OpLoad  %8  %541
+%543 = OpIAdd  %8  %542 %7
+%544 = OpAccessChain  %540  %507 %185
+OpStore %544 %543
+%545 = OpAccessChain  %540  %507 %185
+%546 = OpLoad  %8  %545
+%547 = OpISub  %8  %546 %7
+%548 = OpAccessChain  %540  %507 %185
+OpStore %548 %547
 OpReturn
 OpFunctionEnd
-%548 = OpFunction  %2  None %165
-%547 = OpLabel
-OpBranch %557
-%557 = OpLabel
-%558 = OpSNegate  %8  %550
-%559 = OpSNegate  %8  %551
+%550 = OpFunction  %2  None %165
+%549 = OpLabel
+OpBranch %559
+%559 = OpLabel
 %560 = OpSNegate  %8  %552
-%561 = OpSNegate  %8  %560
-%562 = OpSNegate  %8  %553
+%561 = OpSNegate  %8  %553
+%562 = OpSNegate  %8  %554
 %563 = OpSNegate  %8  %562
-%564 = OpSNegate  %8  %554
+%564 = OpSNegate  %8  %555
 %565 = OpSNegate  %8  %564
-%566 = OpSNegate  %8  %565
+%566 = OpSNegate  %8  %556
 %567 = OpSNegate  %8  %566
-%568 = OpSNegate  %8  %555
+%568 = OpSNegate  %8  %567
 %569 = OpSNegate  %8  %568
-%570 = OpSNegate  %8  %569
+%570 = OpSNegate  %8  %557
 %571 = OpSNegate  %8  %570
-%572 = OpSNegate  %8  %556
+%572 = OpSNegate  %8  %571
 %573 = OpSNegate  %8  %572
-%574 = OpSNegate  %8  %573
+%574 = OpSNegate  %8  %558
 %575 = OpSNegate  %8  %574
+%576 = OpSNegate  %8  %575
+%577 = OpSNegate  %8  %576
 OpReturn
 OpFunctionEnd
-%577 = OpFunction  %2  None %165
-%576 = OpLabel
-OpBranch %578
+%579 = OpFunction  %2  None %165
 %578 = OpLabel
-%579 = OpFunctionCall  %10  %36
-%580 = OpFunctionCall  %10  %65
-%581 = OpVectorShuffle  %15  %31 %31 0 1 2
-%582 = OpFunctionCall  %15  %105 %581
-%583 = OpFunctionCall  %4  %116
-%584 = OpFunctionCall  %2  %164
-%585 = OpFunctionCall  %2  %182
-%586 = OpFunctionCall  %2  %379
-%587 = OpFunctionCall  %2  %428
-%588 = OpFunctionCall  %2  %509
+OpBranch %580
+%580 = OpLabel
+%581 = OpFunctionCall  %10  %36
+%582 = OpFunctionCall  %10  %65
+%583 = OpVectorShuffle  %15  %31 %31 0 1 2
+%584 = OpFunctionCall  %15  %105 %583
+%585 = OpFunctionCall  %4  %116
+%586 = OpFunctionCall  %2  %164
+%587 = OpFunctionCall  %2  %182
+%588 = OpFunctionCall  %2  %381
+%589 = OpFunctionCall  %2  %430
+%590 = OpFunctionCall  %2  %511
 OpReturn
 OpFunctionEnd
\ No newline at end of file
diff --git a/tests/out/wgsl/210-bevy-2d-shader-vert.wgsl b/tests/out/wgsl/210-bevy-2d-shader-vert.wgsl
index 63e83ddb99..365fa3470e 100644
--- a/tests/out/wgsl/210-bevy-2d-shader-vert.wgsl
+++ b/tests/out/wgsl/210-bevy-2d-shader-vert.wgsl
@@ -47,8 +47,6 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
     Vertex_Position_1 = Vertex_Position;
     Vertex_Normal_1 = Vertex_Normal;
     Vertex_Uv_1 = Vertex_Uv;
-    _ = (&global.ViewProj);
-    _ = (&global_1.Model);
     main_1();
     let _e21 = v_Uv;
     let _e23 = gl_Position;
diff --git a/tests/out/wgsl/210-bevy-shader-vert.wgsl b/tests/out/wgsl/210-bevy-shader-vert.wgsl
index 5447e712c2..f7932979b5 100644
--- a/tests/out/wgsl/210-bevy-shader-vert.wgsl
+++ b/tests/out/wgsl/210-bevy-shader-vert.wgsl
@@ -48,7 +48,6 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
     Vertex_Position_1 = Vertex_Position;
     Vertex_Normal_1 = Vertex_Normal;
     Vertex_Uv_1 = Vertex_Uv;
-    _ = (&global.ViewProj);
     main_1();
     let _e23 = v_Position;
     let _e25 = v_Normal;
diff --git a/tests/out/wgsl/246-collatz-comp.wgsl b/tests/out/wgsl/246-collatz-comp.wgsl
index ffd05885ec..e92cf8127c 100644
--- a/tests/out/wgsl/246-collatz-comp.wgsl
+++ b/tests/out/wgsl/246-collatz-comp.wgsl
@@ -10,7 +10,6 @@ fn collatz_iterations(n: u32) -> u32 {
     var n_1: u32;
     var i: u32;
 
-    _ = (&global.indices);
     n_1 = n;
     i = u32(0);
     loop {
@@ -19,7 +18,6 @@ fn collatz_iterations(n: u32) -> u32 {
             break;
         }
         {
-            _ = n_1;
             let _e14 = n_1;
             let _e15 = f32(_e14);
             let _e17 = f32(2);
@@ -49,7 +47,6 @@ fn main_1() {
     index = _e3.x;
     let _e6 = index;
     let _e8 = index;
-    _ = global.indices[_e8];
     let _e11 = index;
     let _e13 = global.indices[_e11];
     let _e14 = collatz_iterations(_e13);
diff --git a/tests/out/wgsl/800-out-of-bounds-panic-vert.wgsl b/tests/out/wgsl/800-out-of-bounds-panic-vert.wgsl
index fdb5462d4d..d749d5a1f4 100644
--- a/tests/out/wgsl/800-out-of-bounds-panic-vert.wgsl
+++ b/tests/out/wgsl/800-out-of-bounds-panic-vert.wgsl
@@ -36,8 +36,6 @@ fn main_1() {
 fn main(@location(0) position: vec2<f32>, @location(1) color: vec4<f32>) -> VertexOutput {
     position_1 = position;
     color_1 = color;
-    _ = (&global.view_matrix);
-    _ = (&global_1.world_matrix);
     main_1();
     let _e15 = frag_color;
     let _e17 = gl_Position;
diff --git a/tests/out/wgsl/900-implicit-conversions-frag.wgsl b/tests/out/wgsl/900-implicit-conversions-frag.wgsl
index 97ff5a4fe5..923e387222 100644
--- a/tests/out/wgsl/900-implicit-conversions-frag.wgsl
+++ b/tests/out/wgsl/900-implicit-conversions-frag.wgsl
@@ -57,7 +57,6 @@ fn implicit_dims_3(v_6: vec4<f32>) {
 fn main_1() {
     exact_1(1);
     implicit(f32(1u));
-    _ = vec3<i32>(1);
     implicit_dims_2(vec3<f32>(vec3<i32>(1)));
     return;
 }
diff --git a/tests/out/wgsl/access.wgsl b/tests/out/wgsl/access.wgsl
index d7358b2679..c8b87516f8 100644
--- a/tests/out/wgsl/access.wgsl
+++ b/tests/out/wgsl/access.wgsl
@@ -43,18 +43,18 @@ fn test_matrix_within_struct_accesses() {
     idx = 1;
     let _e2 = idx;
     idx = (_e2 - 1);
-    _ = baz.m;
-    _ = baz.m[0];
+    let l0_ = baz.m;
+    let l1_ = baz.m[0];
     let _e15 = idx;
-    _ = baz.m[_e15];
-    _ = baz.m[0][1];
+    let l2_ = baz.m[_e15];
+    let l3_ = baz.m[0][1];
     let _e29 = idx;
-    _ = baz.m[0][_e29];
+    let l4_ = baz.m[0][_e29];
     let _e34 = idx;
-    _ = baz.m[_e34][1];
+    let l5_ = baz.m[_e34][1];
     let _e41 = idx;
     let _e43 = idx;
-    _ = baz.m[_e41][_e43];
+    let l6_ = baz.m[_e41][_e43];
     t = Baz(mat3x2<f32>(vec2<f32>(1.0), vec2<f32>(2.0), vec2<f32>(3.0)));
     let _e55 = idx;
     idx = (_e55 + 1);
@@ -80,19 +80,19 @@ fn test_matrix_within_array_within_struct_accesses() {
     idx_1 = 1;
     let _e2 = idx_1;
     idx_1 = (_e2 - 1);
-    _ = nested_mat_cx2_.am;
-    _ = nested_mat_cx2_.am[0];
-    _ = nested_mat_cx2_.am[0][0];
+    let l0_1 = nested_mat_cx2_.am;
+    let l1_1 = nested_mat_cx2_.am[0];
+    let l2_1 = nested_mat_cx2_.am[0][0];
     let _e24 = idx_1;
-    _ = nested_mat_cx2_.am[0][_e24];
-    _ = nested_mat_cx2_.am[0][0][1];
+    let l3_1 = nested_mat_cx2_.am[0][_e24];
+    let l4_1 = nested_mat_cx2_.am[0][0][1];
     let _e42 = idx_1;
-    _ = nested_mat_cx2_.am[0][0][_e42];
+    let l5_1 = nested_mat_cx2_.am[0][0][_e42];
     let _e49 = idx_1;
-    _ = nested_mat_cx2_.am[0][_e49][1];
+    let l6_1 = nested_mat_cx2_.am[0][_e49][1];
     let _e58 = idx_1;
     let _e60 = idx_1;
-    _ = nested_mat_cx2_.am[0][_e58][_e60];
+    let l7_ = nested_mat_cx2_.am[0][_e58][_e60];
     t_1 = MatCx2InArray(array<mat4x2<f32>, 2>());
     let _e66 = idx_1;
     idx_1 = (_e66 + 1);
diff --git a/tests/out/wgsl/array-in-ctor.wgsl b/tests/out/wgsl/array-in-ctor.wgsl
index 290442d6f6..8c17731f0c 100644
--- a/tests/out/wgsl/array-in-ctor.wgsl
+++ b/tests/out/wgsl/array-in-ctor.wgsl
@@ -7,5 +7,5 @@ var<storage> ah: Ah;
 
 @compute @workgroup_size(1, 1, 1) 
 fn cs_main() {
-    _ = ah;
+    let ah_1 = ah;
 }
diff --git a/tests/out/wgsl/atomicOps.wgsl b/tests/out/wgsl/atomicOps.wgsl
index 86f877666f..934a7b7952 100644
--- a/tests/out/wgsl/atomicOps.wgsl
+++ b/tests/out/wgsl/atomicOps.wgsl
@@ -24,14 +24,14 @@ fn cs_main(@builtin(local_invocation_id) id: vec3<u32>) {
     atomicStore((&workgroup_struct.atomic_scalar), 1u);
     atomicStore((&workgroup_struct.atomic_arr[1]), 1);
     workgroupBarrier();
-    _ = atomicLoad((&storage_atomic_scalar));
-    _ = atomicLoad((&storage_atomic_arr[1]));
-    _ = atomicLoad((&storage_struct.atomic_scalar));
-    _ = atomicLoad((&storage_struct.atomic_arr[1]));
-    _ = atomicLoad((&workgroup_atomic_scalar));
-    _ = atomicLoad((&workgroup_atomic_arr[1]));
-    _ = atomicLoad((&workgroup_struct.atomic_scalar));
-    _ = atomicLoad((&workgroup_struct.atomic_arr[1]));
+    let l0_ = atomicLoad((&storage_atomic_scalar));
+    let l1_ = atomicLoad((&storage_atomic_arr[1]));
+    let l2_ = atomicLoad((&storage_struct.atomic_scalar));
+    let l3_ = atomicLoad((&storage_struct.atomic_arr[1]));
+    let l4_ = atomicLoad((&workgroup_atomic_scalar));
+    let l5_ = atomicLoad((&workgroup_atomic_arr[1]));
+    let l6_ = atomicLoad((&workgroup_struct.atomic_scalar));
+    let l7_ = atomicLoad((&workgroup_struct.atomic_arr[1]));
     workgroupBarrier();
     let _e59 = atomicAdd((&storage_atomic_scalar), 1u);
     let _e64 = atomicAdd((&storage_atomic_arr[1]), 1);
diff --git a/tests/out/wgsl/bevy-pbr-frag.wgsl b/tests/out/wgsl/bevy-pbr-frag.wgsl
index 9f55e5f166..41fc6e399c 100644
--- a/tests/out/wgsl/bevy-pbr-frag.wgsl
+++ b/tests/out/wgsl/bevy-pbr-frag.wgsl
@@ -101,17 +101,6 @@ fn pow5_(x: f32) -> f32 {
     var x_1: f32;
     var x2_: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     x_1 = x;
     let _e42 = x_1;
     let _e43 = x_1;
@@ -129,17 +118,6 @@ fn getDistanceAttenuation(distanceSquare: f32, inverseRangeSquared: f32) -> f32
     var smoothFactor: f32;
     var attenuation: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     distanceSquare_1 = distanceSquare;
     inverseRangeSquared_1 = inverseRangeSquared;
     let _e44 = distanceSquare_1;
@@ -147,7 +125,6 @@ fn getDistanceAttenuation(distanceSquare: f32, inverseRangeSquared: f32) -> f32
     factor = (_e44 * _e45);
     let _e49 = factor;
     let _e50 = factor;
-    _ = (1.0 - (_e49 * _e50));
     let _e56 = factor;
     let _e57 = factor;
     smoothFactor = clamp((1.0 - (_e56 * _e57)), 0.0, 1.0);
@@ -155,7 +132,6 @@ fn getDistanceAttenuation(distanceSquare: f32, inverseRangeSquared: f32) -> f32
     let _e65 = smoothFactor;
     attenuation = (_e64 * _e65);
     let _e68 = attenuation;
-    _ = distanceSquare_1;
     let _e73 = distanceSquare_1;
     return ((_e68 * 1.0) / max(_e73, 0.001));
 }
@@ -168,17 +144,6 @@ fn D_GGX(roughness: f32, NoH: f32, h: vec3<f32>) -> f32 {
     var k: f32;
     var d: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     roughness_1 = roughness;
     NoH_1 = NoH;
     let _e46 = NoH_1;
@@ -208,17 +173,6 @@ fn V_SmithGGXCorrelated(roughness_2: f32, NoV: f32, NoL: f32) -> f32 {
     var lambdaL: f32;
     var v: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     roughness_3 = roughness_2;
     NoV_1 = NoV;
     NoL_1 = NoL;
@@ -231,7 +185,6 @@ fn V_SmithGGXCorrelated(roughness_2: f32, NoV: f32, NoL: f32) -> f32 {
     let _e53 = NoV_1;
     let _e56 = NoV_1;
     let _e58 = a2_;
-    _ = (((_e51 - (_e52 * _e53)) * _e56) + _e58);
     let _e60 = NoV_1;
     let _e61 = a2_;
     let _e62 = NoV_1;
@@ -244,7 +197,6 @@ fn V_SmithGGXCorrelated(roughness_2: f32, NoV: f32, NoL: f32) -> f32 {
     let _e75 = NoL_1;
     let _e78 = NoL_1;
     let _e80 = a2_;
-    _ = (((_e73 - (_e74 * _e75)) * _e78) + _e80);
     let _e82 = NoL_1;
     let _e83 = a2_;
     let _e84 = NoL_1;
@@ -262,22 +214,10 @@ fn F_Schlick(f0_: vec3<f32>, f90_: f32, VoH: f32) -> vec3<f32> {
     var f90_1: f32;
     var VoH_1: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     f90_1 = f90_;
     VoH_1 = VoH;
     let _e45 = f90_1;
     let _e49 = VoH_1;
-    _ = (1.0 - _e49);
     let _e52 = VoH_1;
     let _e54 = pow5_((1.0 - _e52));
     return (f0_ + ((vec3<f32>(_e45) - f0_) * _e54));
@@ -288,17 +228,6 @@ fn F_Schlick_1(f0_1: f32, f90_2: f32, VoH_2: f32) -> f32 {
     var f90_3: f32;
     var VoH_3: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     f0_2 = f0_1;
     f90_3 = f90_2;
     VoH_3 = VoH_2;
@@ -306,7 +235,6 @@ fn F_Schlick_1(f0_1: f32, f90_2: f32, VoH_2: f32) -> f32 {
     let _e47 = f90_3;
     let _e48 = f0_2;
     let _e51 = VoH_3;
-    _ = (1.0 - _e51);
     let _e54 = VoH_3;
     let _e56 = pow5_((1.0 - _e54));
     return (_e46 + ((_e47 - _e48) * _e56));
@@ -317,30 +245,11 @@ fn fresnel(f0_3: vec3<f32>, LoH: f32) -> vec3<f32> {
     var LoH_1: f32;
     var f90_4: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     f0_4 = f0_3;
     LoH_1 = LoH;
-    _ = f0_4;
-    _ = vec3<f32>((50.0 * 0.33));
     let _e49 = f0_4;
-    _ = dot(_e49, vec3<f32>((50.0 * 0.33)));
-    _ = f0_4;
-    _ = vec3<f32>((50.0 * 0.33));
     let _e62 = f0_4;
     f90_4 = clamp(dot(_e62, vec3<f32>((50.0 * 0.33))), 0.0, 1.0);
-    _ = f0_4;
-    _ = f90_4;
-    _ = LoH_1;
     let _e75 = f0_4;
     let _e76 = f90_4;
     let _e77 = LoH_1;
@@ -360,17 +269,6 @@ fn specular(f0_5: vec3<f32>, roughness_4: f32, h_1: vec3<f32>, NoV_2: f32, NoL_2
     var V: f32;
     var F: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     f0_6 = f0_5;
     roughness_5 = roughness_4;
     NoV_3 = NoV_2;
@@ -378,22 +276,15 @@ fn specular(f0_5: vec3<f32>, roughness_4: f32, h_1: vec3<f32>, NoV_2: f32, NoL_2
     NoH_3 = NoH_2;
     LoH_3 = LoH_2;
     specularIntensity_1 = specularIntensity;
-    _ = roughness_5;
-    _ = NoH_3;
     let _e57 = roughness_5;
     let _e58 = NoH_3;
     let _e59 = D_GGX(_e57, _e58, h_1);
     D = _e59;
-    _ = roughness_5;
-    _ = NoV_3;
-    _ = NoL_3;
     let _e64 = roughness_5;
     let _e65 = NoV_3;
     let _e66 = NoL_3;
     let _e67 = V_SmithGGXCorrelated(_e64, _e65, _e66);
     V = _e67;
-    _ = f0_6;
-    _ = LoH_3;
     let _e71 = f0_6;
     let _e72 = LoH_3;
     let _e73 = fresnel(_e71, _e72);
@@ -414,17 +305,6 @@ fn Fd_Burley(roughness_6: f32, NoV_4: f32, NoL_4: f32, LoH_4: f32) -> f32 {
     var lightScatter: f32;
     var viewScatter: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     roughness_7 = roughness_6;
     NoV_5 = NoV_4;
     NoL_5 = NoL_4;
@@ -433,14 +313,10 @@ fn Fd_Burley(roughness_6: f32, NoV_4: f32, NoL_4: f32, LoH_4: f32) -> f32 {
     let _e52 = LoH_5;
     let _e54 = LoH_5;
     f90_5 = (0.5 + (((2.0 * _e50) * _e52) * _e54));
-    _ = f90_5;
-    _ = NoL_5;
     let _e62 = f90_5;
     let _e63 = NoL_5;
     let _e64 = F_Schlick_1(1.0, _e62, _e63);
     lightScatter = _e64;
-    _ = f90_5;
-    _ = NoV_5;
     let _e70 = f90_5;
     let _e71 = NoV_5;
     let _e72 = F_Schlick_1(1.0, _e70, _e71);
@@ -460,17 +336,6 @@ fn EnvBRDFApprox(f0_7: vec3<f32>, perceptual_roughness: f32, NoV_6: f32) -> vec3
     var a004_: f32;
     var AB: vec2<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     f0_8 = f0_7;
     perceptual_roughness_1 = perceptual_roughness;
     NoV_7 = NoV_6;
@@ -482,15 +347,11 @@ fn EnvBRDFApprox(f0_7: vec3<f32>, perceptual_roughness: f32, NoV_6: f32) -> vec3
     r = ((vec4<f32>(_e62) * _e64) + _e66);
     let _e69 = r;
     let _e71 = r;
-    _ = (_e69.x * _e71.x);
     let _e76 = NoV_7;
-    _ = (-(9.28) * _e76);
     let _e80 = NoV_7;
-    _ = exp2((-(9.28) * _e80));
     let _e83 = r;
     let _e85 = r;
     let _e90 = NoV_7;
-    _ = (-(9.28) * _e90);
     let _e94 = NoV_7;
     let _e98 = r;
     let _e101 = r;
@@ -508,19 +369,7 @@ fn perceptualRoughnessToRoughness(perceptualRoughness: f32) -> f32 {
     var perceptualRoughness_1: f32;
     var clampedPerceptualRoughness: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     perceptualRoughness_1 = perceptualRoughness;
-    _ = perceptualRoughness_1;
     let _e45 = perceptualRoughness_1;
     clampedPerceptualRoughness = clamp(_e45, 0.089, 1.0);
     let _e50 = clampedPerceptualRoughness;
@@ -531,17 +380,6 @@ fn perceptualRoughnessToRoughness(perceptualRoughness: f32) -> f32 {
 fn reinhard(color: vec3<f32>) -> vec3<f32> {
     var color_1: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     color_1 = color;
     let _e42 = color_1;
     let _e45 = color_1;
@@ -553,17 +391,6 @@ fn reinhard_extended(color_2: vec3<f32>, max_white: f32) -> vec3<f32> {
     var max_white_1: f32;
     var numerator: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     color_3 = color_2;
     max_white_1 = max_white;
     let _e44 = color_3;
@@ -579,20 +406,7 @@ fn reinhard_extended(color_2: vec3<f32>, max_white: f32) -> vec3<f32> {
 fn luminance(v_1: vec3<f32>) -> f32 {
     var v_2: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     v_2 = v_1;
-    _ = v_2;
-    _ = vec3<f32>(0.2126, 0.7152, 0.0722);
     let _e47 = v_2;
     return dot(_e47, vec3<f32>(0.2126, 0.7152, 0.0722));
 }
@@ -602,20 +416,8 @@ fn change_luminance(c_in: vec3<f32>, l_out: f32) -> vec3<f32> {
     var l_out_1: f32;
     var l_in: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     c_in_1 = c_in;
     l_out_1 = l_out;
-    _ = c_in_1;
     let _e45 = c_in_1;
     let _e46 = luminance(_e45);
     l_in = _e46;
@@ -630,27 +432,13 @@ fn reinhard_luminance(color_4: vec3<f32>) -> vec3<f32> {
     var l_old: f32;
     var l_new: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     color_5 = color_4;
-    _ = color_5;
     let _e43 = color_5;
     let _e44 = luminance(_e43);
     l_old = _e44;
     let _e46 = l_old;
     let _e48 = l_old;
     l_new = (_e46 / (1.0 + _e48));
-    _ = color_5;
-    _ = l_new;
     let _e54 = color_5;
     let _e55 = l_new;
     let _e56 = change_luminance(_e54, _e55);
@@ -664,20 +452,8 @@ fn reinhard_extended_luminance(color_6: vec3<f32>, max_white_l: f32) -> vec3<f32
     var numerator_1: f32;
     var l_new_1: f32;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     color_7 = color_6;
     max_white_l_1 = max_white_l;
-    _ = color_7;
     let _e45 = color_7;
     let _e46 = luminance(_e45);
     l_old_1 = _e46;
@@ -689,8 +465,6 @@ fn reinhard_extended_luminance(color_6: vec3<f32>, max_white_l: f32) -> vec3<f32
     let _e58 = numerator_1;
     let _e60 = l_old_1;
     l_new_1 = (_e58 / (1.0 + _e60));
-    _ = color_7;
-    _ = l_new_1;
     let _e66 = color_7;
     let _e67 = l_new_1;
     let _e68 = change_luminance(_e66, _e67);
@@ -724,17 +498,6 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     var specular_1: vec3<f32>;
     var diffuse: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     light_1 = light;
     roughness_9 = roughness_8;
     NdotV_1 = NdotV;
@@ -746,14 +509,10 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     let _e56 = light_1;
     let _e59 = v_WorldPosition_1;
     light_to_frag = (_e56.pos.xyz - _e59.xyz);
-    _ = light_to_frag;
-    _ = light_to_frag;
     let _e65 = light_to_frag;
     let _e66 = light_to_frag;
     distance_square = dot(_e65, _e66);
-    _ = distance_square;
     let _e70 = light_1;
-    _ = _e70.lightParams.x;
     let _e73 = distance_square;
     let _e74 = light_1;
     let _e77 = getDistanceAttenuation(_e73, _e74.lightParams.x);
@@ -762,8 +521,6 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     a_1 = _e79;
     let _e81 = light_1;
     radius = _e81.lightParams.y;
-    _ = light_to_frag;
-    _ = R_1;
     let _e87 = light_to_frag;
     let _e88 = R_1;
     let _e90 = R_1;
@@ -772,34 +529,18 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     let _e95 = light_to_frag;
     let _e96 = centerToRay;
     let _e97 = radius;
-    _ = centerToRay;
-    _ = centerToRay;
     let _e100 = centerToRay;
     let _e101 = centerToRay;
-    _ = dot(_e100, _e101);
-    _ = centerToRay;
-    _ = centerToRay;
     let _e105 = centerToRay;
     let _e106 = centerToRay;
-    _ = (_e97 * inverseSqrt(dot(_e105, _e106)));
     let _e112 = radius;
-    _ = centerToRay;
-    _ = centerToRay;
     let _e115 = centerToRay;
     let _e116 = centerToRay;
-    _ = dot(_e115, _e116);
-    _ = centerToRay;
-    _ = centerToRay;
     let _e120 = centerToRay;
     let _e121 = centerToRay;
     closestPoint = (_e95 + (_e96 * clamp((_e112 * inverseSqrt(dot(_e120, _e121))), 0.0, 1.0)));
-    _ = closestPoint;
-    _ = closestPoint;
     let _e133 = closestPoint;
     let _e134 = closestPoint;
-    _ = dot(_e133, _e134);
-    _ = closestPoint;
-    _ = closestPoint;
     let _e138 = closestPoint;
     let _e139 = closestPoint;
     LspecLengthInverse = inverseSqrt(dot(_e138, _e139));
@@ -807,7 +548,6 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     let _e144 = a_1;
     let _e145 = radius;
     let _e148 = LspecLengthInverse;
-    _ = (_e144 + ((_e145 * 0.5) * _e148));
     let _e153 = a_1;
     let _e154 = radius;
     let _e157 = LspecLengthInverse;
@@ -820,48 +560,24 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     L = (_e169 * _e170);
     let _e173 = L;
     let _e174 = V_2;
-    _ = (_e173 + _e174);
     let _e176 = L;
     let _e177 = V_2;
     H = normalize((_e176 + _e177));
-    _ = N_1;
-    _ = L;
     let _e183 = N_1;
     let _e184 = L;
-    _ = dot(_e183, _e184);
-    _ = N_1;
-    _ = L;
     let _e190 = N_1;
     let _e191 = L;
     NoL_6 = clamp(dot(_e190, _e191), 0.0, 1.0);
-    _ = N_1;
-    _ = H;
     let _e199 = N_1;
     let _e200 = H;
-    _ = dot(_e199, _e200);
-    _ = N_1;
-    _ = H;
     let _e206 = N_1;
     let _e207 = H;
     NoH_4 = clamp(dot(_e206, _e207), 0.0, 1.0);
-    _ = L;
-    _ = H;
     let _e215 = L;
     let _e216 = H;
-    _ = dot(_e215, _e216);
-    _ = L;
-    _ = H;
     let _e222 = L;
     let _e223 = H;
     LoH_6 = clamp(dot(_e222, _e223), 0.0, 1.0);
-    _ = F0_1;
-    _ = roughness_9;
-    _ = H;
-    _ = NdotV_1;
-    _ = NoL_6;
-    _ = NoH_4;
-    _ = LoH_6;
-    _ = specularIntensity_2;
     let _e237 = F0_1;
     let _e238 = roughness_9;
     let _e239 = H;
@@ -872,50 +588,29 @@ fn point_light(light: PointLight, roughness_8: f32, NdotV: f32, N: vec3<f32>, V_
     let _e244 = specularIntensity_2;
     let _e245 = specular(_e237, _e238, _e239, _e240, _e241, _e242, _e243, _e244);
     specular_1 = _e245;
-    _ = light_to_frag;
     let _e248 = light_to_frag;
     L = normalize(_e248);
     let _e250 = L;
     let _e251 = V_2;
-    _ = (_e250 + _e251);
     let _e253 = L;
     let _e254 = V_2;
     H = normalize((_e253 + _e254));
-    _ = N_1;
-    _ = L;
     let _e259 = N_1;
     let _e260 = L;
-    _ = dot(_e259, _e260);
-    _ = N_1;
-    _ = L;
     let _e266 = N_1;
     let _e267 = L;
     NoL_6 = clamp(dot(_e266, _e267), 0.0, 1.0);
-    _ = N_1;
-    _ = H;
     let _e274 = N_1;
     let _e275 = H;
-    _ = dot(_e274, _e275);
-    _ = N_1;
-    _ = H;
     let _e281 = N_1;
     let _e282 = H;
     NoH_4 = clamp(dot(_e281, _e282), 0.0, 1.0);
-    _ = L;
-    _ = H;
     let _e289 = L;
     let _e290 = H;
-    _ = dot(_e289, _e290);
-    _ = L;
-    _ = H;
     let _e296 = L;
     let _e297 = H;
     LoH_6 = clamp(dot(_e296, _e297), 0.0, 1.0);
     let _e302 = diffuseColor_1;
-    _ = roughness_9;
-    _ = NdotV_1;
-    _ = NoL_6;
-    _ = LoH_6;
     let _e307 = roughness_9;
     let _e308 = NdotV_1;
     let _e309 = NoL_6;
@@ -948,17 +643,6 @@ fn dir_light(light_2: DirectionalLight, roughness_10: f32, NdotV_2: f32, normal:
     var specularIntensity_3: f32;
     var specular_2: vec3<f32>;
 
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     light_3 = light_2;
     roughness_11 = roughness_10;
     NdotV_3 = NdotV_2;
@@ -971,45 +655,25 @@ fn dir_light(light_2: DirectionalLight, roughness_10: f32, NdotV_2: f32, normal:
     incident_light = _e56.direction.xyz;
     let _e60 = incident_light;
     let _e61 = view_1;
-    _ = (_e60 + _e61);
     let _e63 = incident_light;
     let _e64 = view_1;
     half_vector = normalize((_e63 + _e64));
-    _ = normal_1;
-    _ = incident_light;
     let _e70 = normal_1;
     let _e71 = incident_light;
-    _ = dot(_e70, _e71);
-    _ = normal_1;
-    _ = incident_light;
     let _e77 = normal_1;
     let _e78 = incident_light;
     NoL_7 = clamp(dot(_e77, _e78), 0.0, 1.0);
-    _ = normal_1;
-    _ = half_vector;
     let _e86 = normal_1;
     let _e87 = half_vector;
-    _ = dot(_e86, _e87);
-    _ = normal_1;
-    _ = half_vector;
     let _e93 = normal_1;
     let _e94 = half_vector;
     NoH_5 = clamp(dot(_e93, _e94), 0.0, 1.0);
-    _ = incident_light;
-    _ = half_vector;
     let _e102 = incident_light;
     let _e103 = half_vector;
-    _ = dot(_e102, _e103);
-    _ = incident_light;
-    _ = half_vector;
     let _e109 = incident_light;
     let _e110 = half_vector;
     LoH_7 = clamp(dot(_e109, _e110), 0.0, 1.0);
     let _e116 = diffuseColor_3;
-    _ = roughness_11;
-    _ = NdotV_3;
-    _ = NoL_7;
-    _ = LoH_7;
     let _e121 = roughness_11;
     let _e122 = NdotV_3;
     let _e123 = NoL_7;
@@ -1017,14 +681,6 @@ fn dir_light(light_2: DirectionalLight, roughness_10: f32, NdotV_2: f32, normal:
     let _e125 = Fd_Burley(_e121, _e122, _e123, _e124);
     diffuse_1 = (_e116 * _e125);
     specularIntensity_3 = 1.0;
-    _ = F0_3;
-    _ = roughness_11;
-    _ = half_vector;
-    _ = NdotV_3;
-    _ = NoL_7;
-    _ = NoH_5;
-    _ = LoH_7;
-    _ = specularIntensity_3;
     let _e138 = F0_3;
     let _e139 = roughness_11;
     let _e140 = half_vector;
@@ -1068,15 +724,12 @@ fn main_1() {
     var diffuse_ambient: vec3<f32>;
     var specular_ambient: vec3<f32>;
 
-    _ = (&global.ViewProj);
     let _e40 = global_3.base_color;
     output_color = _e40;
     let _e42 = output_color;
-    _ = v_Uv_1;
     let _e44 = v_Uv_1;
     let _e45 = textureSample(StandardMaterial_base_color_texture, StandardMaterial_base_color_texture_sampler, _e44);
     output_color = (_e42 * _e45);
-    _ = v_Uv_1;
     let _e48 = v_Uv_1;
     let _e49 = textureSample(StandardMaterial_metallic_roughness_texture, StandardMaterial_metallic_roughness_texture_sampler, _e48);
     metallic_roughness = _e49;
@@ -1086,19 +739,14 @@ fn main_1() {
     let _e56 = global_4.perceptual_roughness;
     let _e57 = metallic_roughness;
     perceptual_roughness_2 = (_e56 * _e57.y);
-    _ = perceptual_roughness_2;
     let _e62 = perceptual_roughness_2;
     let _e63 = perceptualRoughnessToRoughness(_e62);
     roughness_12 = _e63;
-    _ = v_WorldNormal_1;
     let _e66 = v_WorldNormal_1;
     N_2 = normalize(_e66);
     let _e69 = v_WorldTangent_1;
-    _ = _e69.xyz;
     let _e71 = v_WorldTangent_1;
     T = normalize(_e71.xyz);
-    _ = N_2;
-    _ = T;
     let _e77 = N_2;
     let _e78 = T;
     let _e80 = v_WorldTangent_1;
@@ -1138,24 +786,18 @@ fn main_1() {
     let _e105 = N_2;
     TBN = mat3x3<f32>(vec3<f32>(_e103.x, _e103.y, _e103.z), vec3<f32>(_e104.x, _e104.y, _e104.z), vec3<f32>(_e105.x, _e105.y, _e105.z));
     let _e120 = TBN;
-    _ = v_Uv_1;
     let _e122 = v_Uv_1;
     let _e123 = textureSample(StandardMaterial_normal_map, StandardMaterial_normal_map_sampler, _e122);
-    _ = ((_e123.xyz * 2.0) - vec3<f32>(1.0));
-    _ = v_Uv_1;
     let _e131 = v_Uv_1;
     let _e132 = textureSample(StandardMaterial_normal_map, StandardMaterial_normal_map_sampler, _e131);
     N_2 = (_e120 * normalize(((_e132.xyz * 2.0) - vec3<f32>(1.0))));
-    _ = v_Uv_1;
     let _e142 = v_Uv_1;
     let _e143 = textureSample(StandardMaterial_occlusion_texture, StandardMaterial_occlusion_texture_sampler, _e142);
     occlusion = _e143.x;
     let _e146 = global_7.emissive;
     emissive = _e146;
     let _e148 = emissive;
-    _ = _e148.xyz;
     let _e150 = emissive;
-    _ = v_Uv_1;
     let _e153 = v_Uv_1;
     let _e154 = textureSample(StandardMaterial_emissive_texture, StandardMaterial_emissive_texture_sampler, _e153);
     let _e156 = (_e150.xyz * _e154.xyz);
@@ -1164,17 +806,11 @@ fn main_1() {
     emissive.z = _e156.z;
     let _e163 = global_1.CameraPos;
     let _e165 = v_WorldPosition_1;
-    _ = (_e163.xyz - _e165.xyz);
     let _e168 = global_1.CameraPos;
     let _e170 = v_WorldPosition_1;
     V_3 = normalize((_e168.xyz - _e170.xyz));
-    _ = N_2;
-    _ = V_3;
     let _e177 = N_2;
     let _e178 = V_3;
-    _ = dot(_e177, _e178);
-    _ = N_2;
-    _ = V_3;
     let _e183 = N_2;
     let _e184 = V_3;
     NdotV_4 = max(dot(_e183, _e184), 0.001);
@@ -1188,8 +824,6 @@ fn main_1() {
     let _e209 = metallic;
     diffuseColor_4 = (_e206.xyz * vec3<f32>((1.0 - _e209)));
     let _e214 = V_3;
-    _ = -(_e214);
-    _ = N_2;
     let _e217 = V_3;
     let _e219 = N_2;
     R_4 = reflect(-(_e217), _e219);
@@ -1205,14 +839,6 @@ fn main_1() {
         {
             let _e239 = light_accum;
             let _e240 = i;
-            _ = global_2.PointLights[_e240];
-            _ = roughness_12;
-            _ = NdotV_4;
-            _ = N_2;
-            _ = V_3;
-            _ = R_4;
-            _ = F0_4;
-            _ = diffuseColor_4;
             let _e250 = i;
             let _e252 = global_2.PointLights[_e250];
             let _e253 = roughness_12;
@@ -1241,14 +867,6 @@ fn main_1() {
         {
             let _e276 = light_accum;
             let _e277 = i_1;
-            _ = global_2.DirectionalLights[_e277];
-            _ = roughness_12;
-            _ = NdotV_4;
-            _ = N_2;
-            _ = V_3;
-            _ = R_4;
-            _ = F0_4;
-            _ = diffuseColor_4;
             let _e287 = i_1;
             let _e289 = global_2.DirectionalLights[_e287];
             let _e290 = roughness_12;
@@ -1266,28 +884,21 @@ fn main_1() {
             i_1 = (_e273 + 1);
         }
     }
-    _ = diffuseColor_4;
-    _ = NdotV_4;
     let _e302 = diffuseColor_4;
     let _e304 = NdotV_4;
     let _e305 = EnvBRDFApprox(_e302, 1.0, _e304);
     diffuse_ambient = _e305;
-    _ = F0_4;
-    _ = perceptual_roughness_2;
-    _ = NdotV_4;
     let _e310 = F0_4;
     let _e311 = perceptual_roughness_2;
     let _e312 = NdotV_4;
     let _e313 = EnvBRDFApprox(_e310, _e311, _e312);
     specular_ambient = _e313;
     let _e315 = output_color;
-    _ = _e315.xyz;
     let _e317 = light_accum;
     output_color.x = _e317.x;
     output_color.y = _e317.y;
     output_color.z = _e317.z;
     let _e324 = output_color;
-    _ = _e324.xyz;
     let _e326 = output_color;
     let _e328 = diffuse_ambient;
     let _e329 = specular_ambient;
@@ -1298,7 +909,6 @@ fn main_1() {
     output_color.y = _e336.y;
     output_color.z = _e336.z;
     let _e343 = output_color;
-    _ = _e343.xyz;
     let _e345 = output_color;
     let _e347 = emissive;
     let _e349 = output_color;
@@ -1307,9 +917,7 @@ fn main_1() {
     output_color.y = _e352.y;
     output_color.z = _e352.z;
     let _e359 = output_color;
-    _ = _e359.xyz;
     let _e361 = output_color;
-    _ = _e361.xyz;
     let _e363 = output_color;
     let _e365 = reinhard_luminance(_e363.xyz);
     output_color.x = _e365.x;
@@ -1327,17 +935,6 @@ fn main(@location(0) v_WorldPosition: vec3<f32>, @location(1) v_WorldNormal: vec
     v_Uv_1 = v_Uv;
     v_WorldTangent_1 = v_WorldTangent;
     gl_FrontFacing = param;
-    _ = (&global.ViewProj);
-    _ = (&global_1.CameraPos);
-    _ = (&global_2.AmbientColor);
-    _ = (&global_2.NumLights);
-    _ = (&global_2.PointLights);
-    _ = (&global_2.DirectionalLights);
-    _ = (&global_3.base_color);
-    _ = (&global_4.perceptual_roughness);
-    _ = (&global_5.metallic);
-    _ = (&global_6.reflectance);
-    _ = (&global_7.emissive);
     main_1();
     let _e72 = o_Target;
     return FragmentOutput(_e72);
diff --git a/tests/out/wgsl/bevy-pbr-vert.wgsl b/tests/out/wgsl/bevy-pbr-vert.wgsl
index dd4c17496c..ac13dcdfdc 100644
--- a/tests/out/wgsl/bevy-pbr-vert.wgsl
+++ b/tests/out/wgsl/bevy-pbr-vert.wgsl
@@ -58,7 +58,6 @@ fn main(@location(0) Vertex_Position: vec3<f32>, @location(1) Vertex_Normal: vec
     Vertex_Normal_1 = Vertex_Normal;
     Vertex_Uv_1 = Vertex_Uv;
     Vertex_Tangent_1 = Vertex_Tangent;
-    _ = (&global.ViewProj);
     main_1();
     let _e29 = v_WorldPosition;
     let _e31 = v_WorldNormal;
diff --git a/tests/out/wgsl/bits_glsl-frag.wgsl b/tests/out/wgsl/bits_glsl-frag.wgsl
index b68253a277..6e63fe662e 100644
--- a/tests/out/wgsl/bits_glsl-frag.wgsl
+++ b/tests/out/wgsl/bits_glsl-frag.wgsl
@@ -20,154 +20,96 @@ fn main_1() {
     u4_ = vec4<u32>(u32(0));
     f2_ = vec2<f32>(0.0);
     f4_ = vec4<f32>(0.0);
-    _ = f4_;
     let _e33 = f4_;
     u = pack4x8snorm(_e33);
-    _ = f4_;
     let _e36 = f4_;
     u = pack4x8unorm(_e36);
-    _ = f2_;
     let _e39 = f2_;
     u = pack2x16unorm(_e39);
-    _ = f2_;
     let _e42 = f2_;
     u = pack2x16snorm(_e42);
-    _ = f2_;
     let _e45 = f2_;
     u = pack2x16float(_e45);
-    _ = u;
     let _e48 = u;
     f4_ = unpack4x8snorm(_e48);
-    _ = u;
     let _e51 = u;
     f4_ = unpack4x8unorm(_e51);
-    _ = u;
     let _e54 = u;
     f2_ = unpack2x16snorm(_e54);
-    _ = u;
     let _e57 = u;
     f2_ = unpack2x16unorm(_e57);
-    _ = u;
     let _e60 = u;
     f2_ = unpack2x16float(_e60);
-    _ = i;
-    _ = i;
     let _e66 = i;
     let _e67 = i;
-    _ = u32(10);
     i = insertBits(_e66, _e67, u32(5), u32(10));
-    _ = i2_;
-    _ = i2_;
     let _e77 = i2_;
     let _e78 = i2_;
-    _ = u32(10);
     i2_ = insertBits(_e77, _e78, u32(5), u32(10));
-    _ = i3_;
-    _ = i3_;
     let _e88 = i3_;
     let _e89 = i3_;
-    _ = u32(10);
     i3_ = insertBits(_e88, _e89, u32(5), u32(10));
-    _ = i4_;
-    _ = i4_;
     let _e99 = i4_;
     let _e100 = i4_;
-    _ = u32(10);
     i4_ = insertBits(_e99, _e100, u32(5), u32(10));
-    _ = u;
-    _ = u;
     let _e110 = u;
     let _e111 = u;
-    _ = u32(10);
     u = insertBits(_e110, _e111, u32(5), u32(10));
-    _ = u2_;
-    _ = u2_;
     let _e121 = u2_;
     let _e122 = u2_;
-    _ = u32(10);
     u2_ = insertBits(_e121, _e122, u32(5), u32(10));
-    _ = u3_;
-    _ = u3_;
     let _e132 = u3_;
     let _e133 = u3_;
-    _ = u32(10);
     u3_ = insertBits(_e132, _e133, u32(5), u32(10));
-    _ = u4_;
-    _ = u4_;
     let _e143 = u4_;
     let _e144 = u4_;
-    _ = u32(10);
     u4_ = insertBits(_e143, _e144, u32(5), u32(10));
-    _ = i;
     let _e153 = i;
     i = extractBits(_e153, u32(5), u32(10));
-    _ = i2_;
     let _e162 = i2_;
     i2_ = extractBits(_e162, u32(5), u32(10));
-    _ = i3_;
     let _e171 = i3_;
     i3_ = extractBits(_e171, u32(5), u32(10));
-    _ = i4_;
     let _e180 = i4_;
     i4_ = extractBits(_e180, u32(5), u32(10));
-    _ = u;
     let _e189 = u;
     u = extractBits(_e189, u32(5), u32(10));
-    _ = u2_;
     let _e198 = u2_;
     u2_ = extractBits(_e198, u32(5), u32(10));
-    _ = u3_;
     let _e207 = u3_;
     u3_ = extractBits(_e207, u32(5), u32(10));
-    _ = u4_;
     let _e216 = u4_;
     u4_ = extractBits(_e216, u32(5), u32(10));
-    _ = i;
     let _e223 = i;
     i = firstTrailingBit(_e223);
-    _ = i2_;
     let _e226 = i2_;
     i2_ = firstTrailingBit(_e226);
-    _ = i3_;
     let _e229 = i3_;
     i3_ = firstTrailingBit(_e229);
-    _ = i4_;
     let _e232 = i4_;
     i4_ = firstTrailingBit(_e232);
-    _ = u;
     let _e235 = u;
     i = i32(firstTrailingBit(_e235));
-    _ = u2_;
     let _e239 = u2_;
     i2_ = vec2<i32>(firstTrailingBit(_e239));
-    _ = u3_;
     let _e243 = u3_;
     i3_ = vec3<i32>(firstTrailingBit(_e243));
-    _ = u4_;
     let _e247 = u4_;
     i4_ = vec4<i32>(firstTrailingBit(_e247));
-    _ = i;
     let _e251 = i;
     i = firstLeadingBit(_e251);
-    _ = i2_;
     let _e254 = i2_;
     i2_ = firstLeadingBit(_e254);
-    _ = i3_;
     let _e257 = i3_;
     i3_ = firstLeadingBit(_e257);
-    _ = i4_;
     let _e260 = i4_;
     i4_ = firstLeadingBit(_e260);
-    _ = u;
     let _e263 = u;
     i = i32(firstLeadingBit(_e263));
-    _ = u2_;
     let _e267 = u2_;
     i2_ = vec2<i32>(firstLeadingBit(_e267));
-    _ = u3_;
     let _e271 = u3_;
     i3_ = vec3<i32>(firstLeadingBit(_e271));
-    _ = u4_;
     let _e275 = u4_;
     i4_ = vec4<i32>(firstLeadingBit(_e275));
     return;
diff --git a/tests/out/wgsl/bool-select-frag.wgsl b/tests/out/wgsl/bool-select-frag.wgsl
index c34fc979d5..4f0e218ee2 100644
--- a/tests/out/wgsl/bool-select-frag.wgsl
+++ b/tests/out/wgsl/bool-select-frag.wgsl
@@ -21,8 +21,6 @@ fn TevPerCompGT_1(a_2: vec3<f32>, b_2: vec3<f32>) -> vec3<f32> {
 
     a_3 = a_2;
     b_3 = b_2;
-    _ = a_3;
-    _ = b_3;
     let _e7 = a_3;
     let _e8 = b_3;
     return select(vec3<f32>(0.0), vec3<f32>(1.0), (_e7 > _e8));
@@ -30,9 +28,6 @@ fn TevPerCompGT_1(a_2: vec3<f32>, b_2: vec3<f32>) -> vec3<f32> {
 
 fn main_1() {
     let _e1 = o_color;
-    _ = _e1.xyz;
-    _ = vec3<f32>(3.0);
-    _ = vec3<f32>(5.0);
     let _e11 = TevPerCompGT_1(vec3<f32>(3.0), vec3<f32>(5.0));
     o_color.x = _e11.x;
     o_color.y = _e11.y;
diff --git a/tests/out/wgsl/break-if.wgsl b/tests/out/wgsl/break-if.wgsl
index 04b232905b..6e65c52154 100644
--- a/tests/out/wgsl/break-if.wgsl
+++ b/tests/out/wgsl/break-if.wgsl
@@ -17,7 +17,6 @@ fn breakIfEmptyBody(a: bool) {
             let _e2 = b;
             c = (a != _e2);
             let _e5 = c;
-            _ = (a == _e5);
             break if (a == _e5);
         }
     }
@@ -34,7 +33,6 @@ fn breakIf(a_1: bool) {
         e = (a_1 != _e2);
         continuing {
             let _e5 = e;
-            _ = (a_1 == _e5);
             break if (a_1 == _e5);
         }
     }
diff --git a/tests/out/wgsl/buffer-frag.wgsl b/tests/out/wgsl/buffer-frag.wgsl
index 3408a69d97..4f561b4273 100644
--- a/tests/out/wgsl/buffer-frag.wgsl
+++ b/tests/out/wgsl/buffer-frag.wgsl
@@ -21,9 +21,6 @@ fn main_1() {
     var a: u32;
     var b: u32;
 
-    _ = (&testBuffer.data);
-    _ = (&testBufferWriteOnly.data);
-    _ = (&testBufferReadOnly.data);
     let _e12 = testBuffer.data[0];
     a = _e12;
     testBuffer.data[1] = u32(2);
@@ -35,8 +32,6 @@ fn main_1() {
 
 @fragment 
 fn main() {
-    _ = (&testBuffer.data);
-    _ = (&testBufferWriteOnly.data);
     main_1();
     return;
 }
diff --git a/tests/out/wgsl/clamp-splat-vert.wgsl b/tests/out/wgsl/clamp-splat-vert.wgsl
index 777b562b38..deeea02ef1 100644
--- a/tests/out/wgsl/clamp-splat-vert.wgsl
+++ b/tests/out/wgsl/clamp-splat-vert.wgsl
@@ -6,7 +6,6 @@ var<private> a_pos_1: vec2<f32>;
 var<private> gl_Position: vec4<f32>;
 
 fn main_1() {
-    _ = a_pos_1;
     let _e5 = a_pos_1;
     let _e10 = clamp(_e5, vec2<f32>(0.0), vec2<f32>(1.0));
     gl_Position = vec4<f32>(_e10.x, _e10.y, 0.0, 1.0);
diff --git a/tests/out/wgsl/declarations-frag.wgsl b/tests/out/wgsl/declarations-frag.wgsl
index a004823b6c..bdcca29e0f 100644
--- a/tests/out/wgsl/declarations-frag.wgsl
+++ b/tests/out/wgsl/declarations-frag.wgsl
@@ -34,10 +34,6 @@ fn main_1() {
     var a_1: f32;
     var b: f32;
 
-    _ = (&vert.position);
-    _ = (&vert.a);
-    _ = (&frag.position);
-    _ = (&frag.a);
     positions = array<vec3<f32>, 2>(vec3<f32>(-(1.0), 1.0, 0.0), vec3<f32>(-(1.0), -(1.0), 0.0));
     strct = TestStruct(f32(1), f32(2));
     let _e35 = in_array_2[1];
@@ -56,10 +52,6 @@ fn main(@location(0) position: vec2<f32>, @location(1) a: vec2<f32>, @location(2
     vert.a = a;
     in_array_2[0] = in_array;
     in_array_2[1] = in_array_1;
-    _ = (&vert.position);
-    _ = (&vert.a);
-    _ = (&frag.position);
-    _ = (&frag.a);
     main_1();
     let _e30 = frag.position;
     let _e32 = frag.a;
diff --git a/tests/out/wgsl/do-while.wgsl b/tests/out/wgsl/do-while.wgsl
index d444169e41..2940016da1 100644
--- a/tests/out/wgsl/do-while.wgsl
+++ b/tests/out/wgsl/do-while.wgsl
@@ -3,7 +3,6 @@ fn fb1_(cond: ptr<function, bool>) {
         continue;
         continuing {
             let _e6 = (*cond);
-            _ = !(_e6);
             break if !(_e6);
         }
     }
diff --git a/tests/out/wgsl/expressions-frag.wgsl b/tests/out/wgsl/expressions-frag.wgsl
index d32860d55f..fc821ca8e4 100644
--- a/tests/out/wgsl/expressions-frag.wgsl
+++ b/tests/out/wgsl/expressions-frag.wgsl
@@ -394,9 +394,7 @@ fn testConstantLength(a_24: array<f32, 4>) {
     var a_25: array<f32, 4>;
     var len_1: i32;
 
-    _ = (&global_1.a);
     a_25 = a_24;
-    _ = a_25;
     len_1 = i32(4u);
     return;
 }
@@ -406,7 +404,6 @@ fn indexConstantNonConstantIndex(i: i32) {
     var local_5: TestStruct = TestStruct(array<vec4<u32>, 2>(vec4<u32>(0u, 0u, 0u, 0u), vec4<u32>(1u, 1u, 1u, 1u)));
     var a_26: vec4<u32>;
 
-    _ = (&global_1.a);
     i_1 = i;
     let _e6 = i_1;
     let _e10 = local_5.array_[_e6];
@@ -417,16 +414,12 @@ fn indexConstantNonConstantIndex(i: i32) {
 fn testSwizzleWrites(a_27: vec3<f32>) {
     var a_28: vec3<f32>;
 
-    _ = (&global_1.a);
     a_28 = a_27;
     let _e6 = a_28;
-    _ = _e6.zxy;
-    _ = _e6.zx;
     let _e11 = vec2<f32>(3.0, 4.0);
     a_28.z = _e11.x;
     a_28.x = _e11.y;
     let _e16 = a_28;
-    _ = _e16.xy;
     let _e18 = a_28;
     let _e21 = (_e18.xy * 5.0);
     a_28.x = _e21.x;
@@ -441,15 +434,12 @@ fn testSwizzleWrites(a_27: vec3<f32>) {
 fn main_1() {
     var local_6: f32;
 
-    _ = (&global_1.a);
-    _ = global;
     let _e6 = global;
     local_6 = _e6;
     privatePointer((&local_6));
     let _e8 = local_6;
     global = _e8;
     let _e9 = o_color;
-    _ = _e9.xyzw;
     let _e12 = vec4<f32>(1.0);
     o_color.x = _e12.x;
     o_color.y = _e12.y;
@@ -460,8 +450,6 @@ fn main_1() {
 
 @fragment 
 fn main() -> FragmentOutput {
-    _ = (&global_1.a);
-    _ = TestStruct(array<vec4<u32>, 2>(vec4<u32>(u32(0)), vec4<u32>(u32(1))));
     main_1();
     let _e17 = o_color;
     return FragmentOutput(_e17);
diff --git a/tests/out/wgsl/fma-frag.wgsl b/tests/out/wgsl/fma-frag.wgsl
index 08ec9ddd8b..d7c74c2247 100644
--- a/tests/out/wgsl/fma-frag.wgsl
+++ b/tests/out/wgsl/fma-frag.wgsl
@@ -33,7 +33,6 @@ fn Fma(d: ptr<function, Mat4x3_>, m: Mat4x3_, s: f32) {
 
 fn main_1() {
     let _e1 = o_color;
-    _ = _e1.xyzw;
     let _e4 = vec4<f32>(1.0);
     o_color.x = _e4.x;
     o_color.y = _e4.y;
diff --git a/tests/out/wgsl/functions_call-frag.wgsl b/tests/out/wgsl/functions_call-frag.wgsl
index 25615db22e..62aaeb2033 100644
--- a/tests/out/wgsl/functions_call-frag.wgsl
+++ b/tests/out/wgsl/functions_call-frag.wgsl
@@ -8,7 +8,6 @@ fn swizzleCaller(a_1: vec3<f32>) {
 
     a_2 = a_1;
     let _e2 = a_2;
-    _ = _e2.xz;
     let _e4 = a_2;
     local = _e4.xz;
     swizzleCallee((&local));
@@ -28,8 +27,6 @@ fn outImplicitCastCaller(a_4: f32) {
     var local_1: u32;
 
     a_5 = a_4;
-    _ = a_5;
-    _ = a_5;
     outImplicitCastCallee((&local_1));
     let _e5 = local_1;
     a_5 = f32(_e5);
@@ -46,9 +43,7 @@ fn swizzleImplicitCastCaller(a_7: vec3<f32>) {
 
     a_8 = a_7;
     let _e2 = a_8;
-    _ = _e2.xz;
     let _e4 = a_8;
-    _ = _e4.xz;
     swizzleImplicitCastCallee((&local_2));
     let _e11 = local_2.x;
     a_8.x = f32(_e11);
diff --git a/tests/out/wgsl/global-constant-array-frag.wgsl b/tests/out/wgsl/global-constant-array-frag.wgsl
index 85b871c2a5..a82ad9483f 100644
--- a/tests/out/wgsl/global-constant-array-frag.wgsl
+++ b/tests/out/wgsl/global-constant-array-frag.wgsl
@@ -9,7 +9,6 @@ fn main_1() {
 
 @fragment 
 fn main() {
-    _ = array<f32, 2>(1.0, 2.0);
     main_1();
     return;
 }
diff --git a/tests/out/wgsl/globals.wgsl b/tests/out/wgsl/globals.wgsl
index 7acdbfec78..b83b43806d 100644
--- a/tests/out/wgsl/globals.wgsl
+++ b/tests/out/wgsl/globals.wgsl
@@ -36,13 +36,13 @@ fn test_msl_packed_vec3_() {
     let _e17 = idx;
     alignment.v3_[_e17] = 3.0;
     let data = alignment;
-    _ = data.v3_;
-    _ = data.v3_.zx;
+    let l0_ = data.v3_;
+    let l1_ = data.v3_.zx;
     test_msl_packed_vec3_as_arg(data.v3_);
-    _ = (data.v3_ * mat3x3<f32>());
-    _ = (mat3x3<f32>() * data.v3_);
-    _ = (data.v3_ * 2.0);
-    _ = (2.0 * data.v3_);
+    let mvm0_ = (data.v3_ * mat3x3<f32>());
+    let mvm1_ = (mat3x3<f32>() * data.v3_);
+    let svm0_ = (data.v3_ * 2.0);
+    let svm1_ = (2.0 * data.v3_);
 }
 
 @compute @workgroup_size(1, 1, 1) 
diff --git a/tests/out/wgsl/images-frag.wgsl b/tests/out/wgsl/images-frag.wgsl
index e5c68dccc5..2a0f5e749e 100644
--- a/tests/out/wgsl/images-frag.wgsl
+++ b/tests/out/wgsl/images-frag.wgsl
@@ -23,11 +23,8 @@ fn testImg1D(coord: i32) {
     coord_1 = coord;
     let _e10 = textureDimensions(img1D);
     size = i32(_e10);
-    _ = coord_1;
-    _ = vec4<f32>(f32(2));
     let _e17 = coord_1;
     textureStore(img1D, _e17, vec4<f32>(f32(2)));
-    _ = coord_1;
     let _e22 = coord_1;
     let _e23 = textureLoad(img1D, _e22);
     c = _e23;
@@ -43,12 +40,9 @@ fn testImg1DArray(coord_2: vec2<i32>) {
     let _e10 = textureDimensions(img1DArray);
     let _e11 = textureNumLayers(img1DArray);
     size_1 = vec2<f32>(vec2<i32>(vec2<u32>(_e10, _e11)));
-    _ = coord_3;
     let _e17 = coord_3;
     let _e20 = textureLoad(img1DArray, _e17.x, _e17.y);
     c_1 = _e20;
-    _ = coord_3;
-    _ = vec4<f32>(f32(2));
     let _e26 = coord_3;
     textureStore(img1DArray, _e26.x, _e26.y, vec4<f32>(f32(2)));
     return;
@@ -62,12 +56,9 @@ fn testImg2D(coord_4: vec2<i32>) {
     coord_5 = coord_4;
     let _e10 = textureDimensions(img2D);
     size_2 = vec2<f32>(vec2<i32>(_e10));
-    _ = coord_5;
     let _e15 = coord_5;
     let _e16 = textureLoad(img2D, _e15);
     c_2 = _e16;
-    _ = coord_5;
-    _ = vec4<f32>(f32(2));
     let _e22 = coord_5;
     textureStore(img2D, _e22, vec4<f32>(f32(2)));
     return;
@@ -82,12 +73,9 @@ fn testImg2DArray(coord_6: vec3<i32>) {
     let _e10 = textureDimensions(img2DArray);
     let _e13 = textureNumLayers(img2DArray);
     size_3 = vec3<f32>(vec3<i32>(vec3<u32>(_e10.x, _e10.y, _e13)));
-    _ = coord_7;
     let _e19 = coord_7;
     let _e22 = textureLoad(img2DArray, _e19.xy, _e19.z);
     c_3 = _e22;
-    _ = coord_7;
-    _ = vec4<f32>(f32(2));
     let _e28 = coord_7;
     textureStore(img2DArray, _e28.xy, _e28.z, vec4<f32>(f32(2)));
     return;
@@ -101,12 +89,9 @@ fn testImg3D(coord_8: vec3<i32>) {
     coord_9 = coord_8;
     let _e10 = textureDimensions(img3D);
     size_4 = vec3<f32>(vec3<i32>(_e10));
-    _ = coord_9;
     let _e15 = coord_9;
     let _e16 = textureLoad(img3D, _e15);
     c_4 = _e16;
-    _ = coord_9;
-    _ = vec4<f32>(f32(2));
     let _e22 = coord_9;
     textureStore(img3D, _e22, vec4<f32>(f32(2)));
     return;
@@ -120,7 +105,6 @@ fn testImgReadOnly(coord_10: vec2<i32>) {
     coord_11 = coord_10;
     let _e10 = textureDimensions(img2D);
     size_5 = vec2<f32>(vec2<i32>(_e10));
-    _ = coord_11;
     let _e15 = coord_11;
     let _e16 = textureLoad(imgReadOnly, _e15);
     c_5 = _e16;
@@ -134,8 +118,6 @@ fn testImgWriteOnly(coord_12: vec2<i32>) {
     coord_13 = coord_12;
     let _e10 = textureDimensions(img2D);
     size_6 = vec2<f32>(vec2<i32>(_e10));
-    _ = coord_13;
-    _ = vec4<f32>(f32(2));
     let _e18 = coord_13;
     textureStore(imgWriteOnly, _e18, vec4<f32>(f32(2)));
     return;
diff --git a/tests/out/wgsl/math-functions-frag.wgsl b/tests/out/wgsl/math-functions-frag.wgsl
index b9049ef23d..0b59570389 100644
--- a/tests/out/wgsl/math-functions-frag.wgsl
+++ b/tests/out/wgsl/math-functions-frag.wgsl
@@ -56,165 +56,109 @@ fn main_1() {
     let _e9 = b;
     m = mat4x4<f32>(vec4<f32>(_e6.x, _e6.y, _e6.z, _e6.w), vec4<f32>(_e7.x, _e7.y, _e7.z, _e7.w), vec4<f32>(_e8.x, _e8.y, _e8.z, _e8.w), vec4<f32>(_e9.x, _e9.y, _e9.z, _e9.w));
     i = 5;
-    _ = a;
     let _e35 = a;
     ceilOut = ceil(_e35);
-    _ = a;
     let _e39 = a;
     roundOut = round(_e39);
-    _ = a;
     let _e43 = a;
     floorOut = floor(_e43);
-    _ = a;
     let _e47 = a;
     fractOut = fract(_e47);
-    _ = a;
     let _e51 = a;
     truncOut = trunc(_e51);
-    _ = a;
     let _e55 = a;
     sinOut = sin(_e55);
-    _ = a;
     let _e59 = a;
     absOut = abs(_e59);
-    _ = a;
     let _e63 = a;
     sqrtOut = sqrt(_e63);
-    _ = a;
     let _e67 = a;
     inversesqrtOut = inverseSqrt(_e67);
-    _ = a;
     let _e71 = a;
     expOut = exp(_e71);
-    _ = a;
     let _e75 = a;
     exp2Out = exp2(_e75);
-    _ = a;
     let _e79 = a;
     signOut = sign(_e79);
-    _ = m;
     let _e83 = m;
     transposeOut = transpose(_e83);
-    _ = a;
     let _e87 = a;
     normalizeOut = normalize(_e87);
-    _ = a;
     let _e91 = a;
     sinhOut = sinh(_e91);
-    _ = a;
     let _e95 = a;
     cosOut = cos(_e95);
-    _ = a;
     let _e99 = a;
     coshOut = cosh(_e99);
-    _ = a;
     let _e103 = a;
     tanOut = tan(_e103);
-    _ = a;
     let _e107 = a;
     tanhOut = tanh(_e107);
-    _ = a;
     let _e111 = a;
     acosOut = acos(_e111);
-    _ = a;
     let _e115 = a;
     asinOut = asin(_e115);
-    _ = a;
     let _e119 = a;
     logOut = log(_e119);
-    _ = a;
     let _e123 = a;
     log2Out = log2(_e123);
-    _ = a;
     let _e127 = a;
     lengthOut = length(_e127);
-    _ = m;
     let _e131 = m;
     determinantOut = determinant(_e131);
-    _ = i;
     let _e135 = i;
     bitCountOut = countOneBits(_e135);
-    _ = i;
     let _e139 = i;
     bitfieldReverseOut = reverseBits(_e139);
     let _e142 = a;
-    _ = _e142.x;
     let _e144 = a;
     atanOut = atan(_e144.x);
     let _e148 = a;
-    _ = _e148.x;
     let _e150 = a;
-    _ = _e150.y;
     let _e152 = a;
     let _e154 = a;
     atan2Out = atan2(_e152.x, _e154.y);
     let _e158 = a;
-    _ = _e158.x;
     let _e160 = b;
-    _ = _e160.x;
     let _e162 = a;
     let _e164 = b;
     modOut = (_e162.x - (floor((_e162.x / _e164.x)) * _e164.x));
-    _ = a;
-    _ = b;
     let _e173 = a;
     let _e174 = b;
     powOut = pow(_e173, _e174);
-    _ = a;
-    _ = b;
     let _e179 = a;
     let _e180 = b;
     dotOut = dot(_e179, _e180);
-    _ = a;
-    _ = b;
     let _e185 = a;
     let _e186 = b;
     maxOut = max(_e185, _e186);
-    _ = a;
-    _ = b;
     let _e191 = a;
     let _e192 = b;
     minOut = min(_e191, _e192);
-    _ = a;
-    _ = b;
     let _e197 = a;
     let _e198 = b;
     reflectOut = reflect(_e197, _e198);
     let _e201 = a;
-    _ = _e201.xyz;
     let _e203 = b;
-    _ = _e203.xyz;
     let _e205 = a;
     let _e207 = b;
     crossOut = cross(_e205.xyz, _e207.xyz);
-    _ = a;
-    _ = b;
     let _e213 = a;
     let _e214 = b;
     outerProductOut = outerProduct(_e213, _e214);
-    _ = a;
-    _ = b;
     let _e219 = a;
     let _e220 = b;
     distanceOut = distance(_e219, _e220);
-    _ = a;
-    _ = b;
     let _e225 = a;
     let _e226 = b;
     stepOut = step(_e225, _e226);
-    _ = a;
     let _e230 = a;
     rad = radians(_e230);
     let _e233 = a;
-    _ = _e233.x;
     let _e235 = a;
     deg = degrees(_e235.x);
     smoothStepScalar = smoothstep(0.0, 1.0, 0.5);
-    _ = vec4<f32>(0.0);
-    _ = vec4<f32>(1.0);
-    _ = vec4<f32>(0.5);
     smoothStepVector = smoothstep(vec4<f32>(0.0), vec4<f32>(1.0), vec4<f32>(0.5));
-    _ = vec4<f32>(0.5);
     smoothStepMixed = smoothstep(vec4<f32>(0.0), vec4<f32>(1.0), vec4<f32>(0.5));
     return;
 }
diff --git a/tests/out/wgsl/operators.wgsl b/tests/out/wgsl/operators.wgsl
index a5aba2064f..fc72040452 100644
--- a/tests/out/wgsl/operators.wgsl
+++ b/tests/out/wgsl/operators.wgsl
@@ -48,170 +48,172 @@ fn constructors() -> f32 {
     var foo: Foo;
 
     foo = Foo(vec4<f32>(1.0), 1);
-    let mat2comp = mat2x2<f32>(vec2<f32>(1.0, 0.0), vec2<f32>(0.0, 1.0));
-    let mat4comp = mat4x4<f32>(vec4<f32>(1.0, 0.0, 0.0, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0), vec4<f32>(0.0, 0.0, 1.0, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
-    _ = vec2<u32>(0u);
-    _ = mat2x2<f32>(vec2<f32>(0.0), vec2<f32>(0.0));
-    _ = array<i32, 4>(0, 1, 2, 3);
-    _ = bool(bool());
-    _ = i32(i32());
-    _ = u32(u32());
-    _ = f32(f32());
-    _ = vec2<u32>(vec2<u32>());
-    _ = mat2x3<f32>(mat2x3<f32>());
-    _ = bitcast<vec2<u32>>(vec2<u32>());
-    _ = mat2x3<f32>(mat2x3<f32>());
+    let m0_ = mat2x2<f32>(vec2<f32>(1.0, 0.0), vec2<f32>(0.0, 1.0));
+    let m1_1 = mat4x4<f32>(vec4<f32>(1.0, 0.0, 0.0, 0.0), vec4<f32>(0.0, 1.0, 0.0, 0.0), vec4<f32>(0.0, 0.0, 1.0, 0.0), vec4<f32>(0.0, 0.0, 0.0, 1.0));
+    let cit0_ = vec2<u32>(0u);
+    let cit1_ = mat2x2<f32>(vec2<f32>(0.0), vec2<f32>(0.0));
+    let cit2_ = array<i32, 4>(0, 1, 2, 3);
+    let ic0_ = bool(bool());
+    let ic1_ = i32(i32());
+    let ic2_ = u32(u32());
+    let ic3_ = f32(f32());
+    let ic4_ = vec2<u32>(vec2<u32>());
+    let ic5_ = mat2x3<f32>(mat2x3<f32>());
+    let ic6_ = bitcast<vec2<u32>>(vec2<u32>());
+    let ic7_ = mat2x3<f32>(mat2x3<f32>());
     let _e71 = foo.a.x;
     return _e71;
 }
 
 fn logical() {
-    _ = !(true);
-    _ = !(vec2<bool>(true));
-    _ = (true || false);
-    _ = (true && false);
-    _ = (true | false);
-    _ = (vec3<bool>(true) | vec3<bool>(false));
-    _ = (true & false);
-    _ = (vec4<bool>(true) & vec4<bool>(false));
+    let neg0_ = !(true);
+    let neg1_ = !(vec2<bool>(true));
+    let or = (true || false);
+    let and = (true && false);
+    let bitwise_or0_ = (true | false);
+    let bitwise_or1_ = (vec3<bool>(true) | vec3<bool>(false));
+    let bitwise_and0_ = (true & false);
+    let bitwise_and1_ = (vec4<bool>(true) & vec4<bool>(false));
 }
 
 fn arithmetic() {
-    _ = -(vec2<i32>(1));
-    _ = -(vec2<f32>(1.0));
-    _ = (2 + 1);
-    _ = (2u + 1u);
-    _ = (2.0 + 1.0);
-    _ = (vec2<i32>(2) + vec2<i32>(1));
-    _ = (vec3<u32>(2u) + vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) + vec4<f32>(1.0));
-    _ = (2 - 1);
-    _ = (2u - 1u);
-    _ = (2.0 - 1.0);
-    _ = (vec2<i32>(2) - vec2<i32>(1));
-    _ = (vec3<u32>(2u) - vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) - vec4<f32>(1.0));
-    _ = (2 * 1);
-    _ = (2u * 1u);
-    _ = (2.0 * 1.0);
-    _ = (vec2<i32>(2) * vec2<i32>(1));
-    _ = (vec3<u32>(2u) * vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) * vec4<f32>(1.0));
-    _ = (2 / 1);
-    _ = (2u / 1u);
-    _ = (2.0 / 1.0);
-    _ = (vec2<i32>(2) / vec2<i32>(1));
-    _ = (vec3<u32>(2u) / vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) / vec4<f32>(1.0));
-    _ = (2 % 1);
-    _ = (2u % 1u);
-    _ = (2.0 % 1.0);
-    _ = (vec2<i32>(2) % vec2<i32>(1));
-    _ = (vec3<u32>(2u) % vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) % vec4<f32>(1.0));
-    _ = (vec2<i32>(2) + vec2<i32>(1));
-    _ = (vec2<i32>(2) + vec2<i32>(1));
-    _ = (vec2<u32>(2u) + vec2<u32>(1u));
-    _ = (vec2<u32>(2u) + vec2<u32>(1u));
-    _ = (vec2<f32>(2.0) + vec2<f32>(1.0));
-    _ = (vec2<f32>(2.0) + vec2<f32>(1.0));
-    _ = (vec2<i32>(2) - vec2<i32>(1));
-    _ = (vec2<i32>(2) - vec2<i32>(1));
-    _ = (vec2<u32>(2u) - vec2<u32>(1u));
-    _ = (vec2<u32>(2u) - vec2<u32>(1u));
-    _ = (vec2<f32>(2.0) - vec2<f32>(1.0));
-    _ = (vec2<f32>(2.0) - vec2<f32>(1.0));
-    _ = (vec2<i32>(2) * 1);
-    _ = (2 * vec2<i32>(1));
-    _ = (vec2<u32>(2u) * 1u);
-    _ = (2u * vec2<u32>(1u));
-    _ = (vec2<f32>(2.0) * 1.0);
-    _ = (2.0 * vec2<f32>(1.0));
-    _ = (vec2<i32>(2) / vec2<i32>(1));
-    _ = (vec2<i32>(2) / vec2<i32>(1));
-    _ = (vec2<u32>(2u) / vec2<u32>(1u));
-    _ = (vec2<u32>(2u) / vec2<u32>(1u));
-    _ = (vec2<f32>(2.0) / vec2<f32>(1.0));
-    _ = (vec2<f32>(2.0) / vec2<f32>(1.0));
-    _ = (vec2<i32>(2) % vec2<i32>(1));
-    _ = (vec2<i32>(2) % vec2<i32>(1));
-    _ = (vec2<u32>(2u) % vec2<u32>(1u));
-    _ = (vec2<u32>(2u) % vec2<u32>(1u));
-    _ = (vec2<f32>(2.0) % vec2<f32>(1.0));
-    _ = (vec2<f32>(2.0) % vec2<f32>(1.0));
-    _ = (mat3x3<f32>() + mat3x3<f32>());
-    _ = (mat3x3<f32>() - mat3x3<f32>());
-    _ = (mat3x3<f32>() * 1.0);
-    _ = (2.0 * mat3x3<f32>());
-    _ = (mat4x3<f32>() * vec4<f32>(1.0));
-    _ = (vec3<f32>(2.0) * mat4x3<f32>());
-    _ = (mat4x3<f32>() * mat3x4<f32>());
+    let neg1_1 = -(vec2<i32>(1));
+    let neg2_ = -(vec2<f32>(1.0));
+    let add0_ = (2 + 1);
+    let add1_ = (2u + 1u);
+    let add2_ = (2.0 + 1.0);
+    let add3_ = (vec2<i32>(2) + vec2<i32>(1));
+    let add4_ = (vec3<u32>(2u) + vec3<u32>(1u));
+    let add5_ = (vec4<f32>(2.0) + vec4<f32>(1.0));
+    let sub0_ = (2 - 1);
+    let sub1_ = (2u - 1u);
+    let sub2_ = (2.0 - 1.0);
+    let sub3_ = (vec2<i32>(2) - vec2<i32>(1));
+    let sub4_ = (vec3<u32>(2u) - vec3<u32>(1u));
+    let sub5_ = (vec4<f32>(2.0) - vec4<f32>(1.0));
+    let mul0_ = (2 * 1);
+    let mul1_ = (2u * 1u);
+    let mul2_ = (2.0 * 1.0);
+    let mul3_ = (vec2<i32>(2) * vec2<i32>(1));
+    let mul4_ = (vec3<u32>(2u) * vec3<u32>(1u));
+    let mul5_ = (vec4<f32>(2.0) * vec4<f32>(1.0));
+    let div0_ = (2 / 1);
+    let div1_ = (2u / 1u);
+    let div2_ = (2.0 / 1.0);
+    let div3_ = (vec2<i32>(2) / vec2<i32>(1));
+    let div4_ = (vec3<u32>(2u) / vec3<u32>(1u));
+    let div5_ = (vec4<f32>(2.0) / vec4<f32>(1.0));
+    let rem0_ = (2 % 1);
+    let rem1_ = (2u % 1u);
+    let rem2_ = (2.0 % 1.0);
+    let rem3_ = (vec2<i32>(2) % vec2<i32>(1));
+    let rem4_ = (vec3<u32>(2u) % vec3<u32>(1u));
+    let rem5_ = (vec4<f32>(2.0) % vec4<f32>(1.0));
+    {
+        let add0_1 = (vec2<i32>(2) + vec2<i32>(1));
+        let add1_1 = (vec2<i32>(2) + vec2<i32>(1));
+        let add2_1 = (vec2<u32>(2u) + vec2<u32>(1u));
+        let add3_1 = (vec2<u32>(2u) + vec2<u32>(1u));
+        let add4_1 = (vec2<f32>(2.0) + vec2<f32>(1.0));
+        let add5_1 = (vec2<f32>(2.0) + vec2<f32>(1.0));
+        let sub0_1 = (vec2<i32>(2) - vec2<i32>(1));
+        let sub1_1 = (vec2<i32>(2) - vec2<i32>(1));
+        let sub2_1 = (vec2<u32>(2u) - vec2<u32>(1u));
+        let sub3_1 = (vec2<u32>(2u) - vec2<u32>(1u));
+        let sub4_1 = (vec2<f32>(2.0) - vec2<f32>(1.0));
+        let sub5_1 = (vec2<f32>(2.0) - vec2<f32>(1.0));
+        let mul0_1 = (vec2<i32>(2) * 1);
+        let mul1_1 = (2 * vec2<i32>(1));
+        let mul2_1 = (vec2<u32>(2u) * 1u);
+        let mul3_1 = (2u * vec2<u32>(1u));
+        let mul4_1 = (vec2<f32>(2.0) * 1.0);
+        let mul5_1 = (2.0 * vec2<f32>(1.0));
+        let div0_1 = (vec2<i32>(2) / vec2<i32>(1));
+        let div1_1 = (vec2<i32>(2) / vec2<i32>(1));
+        let div2_1 = (vec2<u32>(2u) / vec2<u32>(1u));
+        let div3_1 = (vec2<u32>(2u) / vec2<u32>(1u));
+        let div4_1 = (vec2<f32>(2.0) / vec2<f32>(1.0));
+        let div5_1 = (vec2<f32>(2.0) / vec2<f32>(1.0));
+        let rem0_1 = (vec2<i32>(2) % vec2<i32>(1));
+        let rem1_1 = (vec2<i32>(2) % vec2<i32>(1));
+        let rem2_1 = (vec2<u32>(2u) % vec2<u32>(1u));
+        let rem3_1 = (vec2<u32>(2u) % vec2<u32>(1u));
+        let rem4_1 = (vec2<f32>(2.0) % vec2<f32>(1.0));
+        let rem5_1 = (vec2<f32>(2.0) % vec2<f32>(1.0));
+    }
+    let add = (mat3x3<f32>() + mat3x3<f32>());
+    let sub = (mat3x3<f32>() - mat3x3<f32>());
+    let mul_scalar0_ = (mat3x3<f32>() * 1.0);
+    let mul_scalar1_ = (2.0 * mat3x3<f32>());
+    let mul_vector0_ = (mat4x3<f32>() * vec4<f32>(1.0));
+    let mul_vector1_ = (vec3<f32>(2.0) * mat4x3<f32>());
+    let mul = (mat4x3<f32>() * mat3x4<f32>());
 }
 
 fn bit() {
-    _ = ~(1);
-    _ = ~(1u);
-    _ = !(vec2<i32>(1));
-    _ = !(vec3<u32>(1u));
-    _ = (2 | 1);
-    _ = (2u | 1u);
-    _ = (vec2<i32>(2) | vec2<i32>(1));
-    _ = (vec3<u32>(2u) | vec3<u32>(1u));
-    _ = (2 & 1);
-    _ = (2u & 1u);
-    _ = (vec2<i32>(2) & vec2<i32>(1));
-    _ = (vec3<u32>(2u) & vec3<u32>(1u));
-    _ = (2 ^ 1);
-    _ = (2u ^ 1u);
-    _ = (vec2<i32>(2) ^ vec2<i32>(1));
-    _ = (vec3<u32>(2u) ^ vec3<u32>(1u));
-    _ = (2 << 1u);
-    _ = (2u << 1u);
-    _ = (vec2<i32>(2) << vec2<u32>(1u));
-    _ = (vec3<u32>(2u) << vec3<u32>(1u));
-    _ = (2 >> 1u);
-    _ = (2u >> 1u);
-    _ = (vec2<i32>(2) >> vec2<u32>(1u));
-    _ = (vec3<u32>(2u) >> vec3<u32>(1u));
+    let flip0_ = ~(1);
+    let flip1_ = ~(1u);
+    let flip2_ = !(vec2<i32>(1));
+    let flip3_ = !(vec3<u32>(1u));
+    let or0_ = (2 | 1);
+    let or1_ = (2u | 1u);
+    let or2_ = (vec2<i32>(2) | vec2<i32>(1));
+    let or3_ = (vec3<u32>(2u) | vec3<u32>(1u));
+    let and0_ = (2 & 1);
+    let and1_ = (2u & 1u);
+    let and2_ = (vec2<i32>(2) & vec2<i32>(1));
+    let and3_ = (vec3<u32>(2u) & vec3<u32>(1u));
+    let xor0_ = (2 ^ 1);
+    let xor1_ = (2u ^ 1u);
+    let xor2_ = (vec2<i32>(2) ^ vec2<i32>(1));
+    let xor3_ = (vec3<u32>(2u) ^ vec3<u32>(1u));
+    let shl0_ = (2 << 1u);
+    let shl1_ = (2u << 1u);
+    let shl2_ = (vec2<i32>(2) << vec2<u32>(1u));
+    let shl3_ = (vec3<u32>(2u) << vec3<u32>(1u));
+    let shr0_ = (2 >> 1u);
+    let shr1_ = (2u >> 1u);
+    let shr2_ = (vec2<i32>(2) >> vec2<u32>(1u));
+    let shr3_ = (vec3<u32>(2u) >> vec3<u32>(1u));
 }
 
 fn comparison() {
-    _ = (2 == 1);
-    _ = (2u == 1u);
-    _ = (2.0 == 1.0);
-    _ = (vec2<i32>(2) == vec2<i32>(1));
-    _ = (vec3<u32>(2u) == vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) == vec4<f32>(1.0));
-    _ = (2 != 1);
-    _ = (2u != 1u);
-    _ = (2.0 != 1.0);
-    _ = (vec2<i32>(2) != vec2<i32>(1));
-    _ = (vec3<u32>(2u) != vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) != vec4<f32>(1.0));
-    _ = (2 < 1);
-    _ = (2u < 1u);
-    _ = (2.0 < 1.0);
-    _ = (vec2<i32>(2) < vec2<i32>(1));
-    _ = (vec3<u32>(2u) < vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) < vec4<f32>(1.0));
-    _ = (2 <= 1);
-    _ = (2u <= 1u);
-    _ = (2.0 <= 1.0);
-    _ = (vec2<i32>(2) <= vec2<i32>(1));
-    _ = (vec3<u32>(2u) <= vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) <= vec4<f32>(1.0));
-    _ = (2 > 1);
-    _ = (2u > 1u);
-    _ = (2.0 > 1.0);
-    _ = (vec2<i32>(2) > vec2<i32>(1));
-    _ = (vec3<u32>(2u) > vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) > vec4<f32>(1.0));
-    _ = (2 >= 1);
-    _ = (2u >= 1u);
-    _ = (2.0 >= 1.0);
-    _ = (vec2<i32>(2) >= vec2<i32>(1));
-    _ = (vec3<u32>(2u) >= vec3<u32>(1u));
-    _ = (vec4<f32>(2.0) >= vec4<f32>(1.0));
+    let eq0_ = (2 == 1);
+    let eq1_ = (2u == 1u);
+    let eq2_ = (2.0 == 1.0);
+    let eq3_ = (vec2<i32>(2) == vec2<i32>(1));
+    let eq4_ = (vec3<u32>(2u) == vec3<u32>(1u));
+    let eq5_ = (vec4<f32>(2.0) == vec4<f32>(1.0));
+    let neq0_ = (2 != 1);
+    let neq1_ = (2u != 1u);
+    let neq2_ = (2.0 != 1.0);
+    let neq3_ = (vec2<i32>(2) != vec2<i32>(1));
+    let neq4_ = (vec3<u32>(2u) != vec3<u32>(1u));
+    let neq5_ = (vec4<f32>(2.0) != vec4<f32>(1.0));
+    let lt0_ = (2 < 1);
+    let lt1_ = (2u < 1u);
+    let lt2_ = (2.0 < 1.0);
+    let lt3_ = (vec2<i32>(2) < vec2<i32>(1));
+    let lt4_ = (vec3<u32>(2u) < vec3<u32>(1u));
+    let lt5_ = (vec4<f32>(2.0) < vec4<f32>(1.0));
+    let lte0_ = (2 <= 1);
+    let lte1_ = (2u <= 1u);
+    let lte2_ = (2.0 <= 1.0);
+    let lte3_ = (vec2<i32>(2) <= vec2<i32>(1));
+    let lte4_ = (vec3<u32>(2u) <= vec3<u32>(1u));
+    let lte5_ = (vec4<f32>(2.0) <= vec4<f32>(1.0));
+    let gt0_ = (2 > 1);
+    let gt1_ = (2u > 1u);
+    let gt2_ = (2.0 > 1.0);
+    let gt3_ = (vec2<i32>(2) > vec2<i32>(1));
+    let gt4_ = (vec3<u32>(2u) > vec3<u32>(1u));
+    let gt5_ = (vec4<f32>(2.0) > vec4<f32>(1.0));
+    let gte0_ = (2 >= 1);
+    let gte1_ = (2u >= 1u);
+    let gte2_ = (2.0 >= 1.0);
+    let gte3_ = (vec2<i32>(2) >= vec2<i32>(1));
+    let gte4_ = (vec3<u32>(2u) >= vec3<u32>(1u));
+    let gte5_ = (vec4<f32>(2.0) >= vec4<f32>(1.0));
 }
 
 fn assignment() {
@@ -254,13 +256,13 @@ fn assignment() {
 }
 
 fn negation_avoids_prefix_decrement() {
-    _ = -(-2);
-    _ = -(-3);
-    _ = -(-(4));
-    _ = -(-(-5));
-    _ = -(-(-(-(6))));
-    _ = -(-(-(-(-7))));
-    _ = -(-(-(-(-8))));
+    let p1_ = -(-2);
+    let p2_ = -(-3);
+    let p3_ = -(-(4));
+    let p4_ = -(-(-5));
+    let p5_ = -(-(-(-(6))));
+    let p6_ = -(-(-(-(-7))));
+    let p7_ = -(-(-(-(-8))));
 }
 
 @compute @workgroup_size(1, 1, 1) 
diff --git a/tests/out/wgsl/sampler-functions-frag.wgsl b/tests/out/wgsl/sampler-functions-frag.wgsl
index 805dc8f7f1..89a5c35dc4 100644
--- a/tests/out/wgsl/sampler-functions-frag.wgsl
+++ b/tests/out/wgsl/sampler-functions-frag.wgsl
@@ -6,7 +6,6 @@ fn CalcShadowPCF1_(T_P_t_TextureDepth: texture_depth_2d, S_P_t_TextureDepth: sam
     t_Res = 0.0;
     let _e6 = t_Res;
     let _e7 = t_ProjCoord_1;
-    _ = _e7.xyz;
     let _e9 = t_ProjCoord_1;
     let _e10 = _e9.xyz;
     let _e13 = textureSampleCompare(T_P_t_TextureDepth, S_P_t_TextureDepth, _e10.xy, _e10.z);
@@ -25,7 +24,6 @@ fn CalcShadowPCF(T_P_t_TextureDepth_1: texture_depth_2d, S_P_t_TextureDepth_1: s
     let _e9 = t_Bias_1;
     t_ProjCoord_3.z = (_e7.z + _e9);
     let _e11 = t_ProjCoord_3;
-    _ = _e11.xyz;
     let _e13 = t_ProjCoord_3;
     let _e15 = CalcShadowPCF1_(T_P_t_TextureDepth_1, S_P_t_TextureDepth_1, _e13.xyz);
     return _e15;
diff --git a/tests/out/wgsl/samplers-frag.wgsl b/tests/out/wgsl/samplers-frag.wgsl
index e9c111659f..56d4489d85 100644
--- a/tests/out/wgsl/samplers-frag.wgsl
+++ b/tests/out/wgsl/samplers-frag.wgsl
@@ -39,141 +39,115 @@ fn testTex1D(coord: f32) {
     coord_1 = coord;
     let _e20 = textureDimensions(tex1D, 0);
     size1D = i32(_e20);
-    _ = coord_1;
     let _e25 = coord_1;
     let _e26 = textureSample(tex1D, samp, _e25);
     c = _e26;
-    _ = coord_1;
     let _e29 = coord_1;
     let _e31 = textureSampleBias(tex1D, samp, _e29, 2.0);
     c = _e31;
-    _ = coord_1;
     let _e35 = coord_1;
     let _e38 = textureSampleGrad(tex1D, samp, _e35, 4.0, 4.0);
     c = _e38;
-    _ = coord_1;
     let _e43 = coord_1;
     let _e47 = textureSampleGrad(tex1D, samp, _e43, 4.0, 4.0, 5);
     c = _e47;
-    _ = coord_1;
     let _e50 = coord_1;
     let _e52 = textureSampleLevel(tex1D, samp, _e50, 3.0);
     c = _e52;
-    _ = coord_1;
     let _e56 = coord_1;
     let _e59 = textureSampleLevel(tex1D, samp, _e56, 3.0, 5);
     c = _e59;
-    _ = coord_1;
     let _e62 = coord_1;
     let _e64 = textureSample(tex1D, samp, _e62, 5);
     c = _e64;
-    _ = coord_1;
     let _e68 = coord_1;
     let _e71 = textureSampleBias(tex1D, samp, _e68, 2.0, 5);
     c = _e71;
     let _e72 = coord_1;
-    _ = vec2<f32>(_e72, 6.0);
     let _e75 = coord_1;
     let _e77 = vec2<f32>(_e75, 6.0);
     let _e81 = textureSample(tex1D, samp, (_e77.x / _e77.y));
     c = _e81;
     let _e82 = coord_1;
-    _ = vec4<f32>(_e82, 0.0, 0.0, 6.0);
     let _e87 = coord_1;
     let _e91 = vec4<f32>(_e87, 0.0, 0.0, 6.0);
     let _e97 = textureSample(tex1D, samp, (_e91.xyz / vec3<f32>(_e91.w)).x);
     c = _e97;
     let _e98 = coord_1;
-    _ = vec2<f32>(_e98, 6.0);
     let _e102 = coord_1;
     let _e104 = vec2<f32>(_e102, 6.0);
     let _e109 = textureSampleBias(tex1D, samp, (_e104.x / _e104.y), 2.0);
     c = _e109;
     let _e110 = coord_1;
-    _ = vec4<f32>(_e110, 0.0, 0.0, 6.0);
     let _e116 = coord_1;
     let _e120 = vec4<f32>(_e116, 0.0, 0.0, 6.0);
     let _e127 = textureSampleBias(tex1D, samp, (_e120.xyz / vec3<f32>(_e120.w)).x, 2.0);
     c = _e127;
     let _e128 = coord_1;
-    _ = vec2<f32>(_e128, 6.0);
     let _e133 = coord_1;
     let _e135 = vec2<f32>(_e133, 6.0);
     let _e141 = textureSampleGrad(tex1D, samp, (_e135.x / _e135.y), 4.0, 4.0);
     c = _e141;
     let _e142 = coord_1;
-    _ = vec4<f32>(_e142, 0.0, 0.0, 6.0);
     let _e149 = coord_1;
     let _e153 = vec4<f32>(_e149, 0.0, 0.0, 6.0);
     let _e161 = textureSampleGrad(tex1D, samp, (_e153.xyz / vec3<f32>(_e153.w)).x, 4.0, 4.0);
     c = _e161;
     let _e162 = coord_1;
-    _ = vec2<f32>(_e162, 6.0);
     let _e168 = coord_1;
     let _e170 = vec2<f32>(_e168, 6.0);
     let _e177 = textureSampleGrad(tex1D, samp, (_e170.x / _e170.y), 4.0, 4.0, 5);
     c = _e177;
     let _e178 = coord_1;
-    _ = vec4<f32>(_e178, 0.0, 0.0, 6.0);
     let _e186 = coord_1;
     let _e190 = vec4<f32>(_e186, 0.0, 0.0, 6.0);
     let _e199 = textureSampleGrad(tex1D, samp, (_e190.xyz / vec3<f32>(_e190.w)).x, 4.0, 4.0, 5);
     c = _e199;
     let _e200 = coord_1;
-    _ = vec2<f32>(_e200, 6.0);
     let _e204 = coord_1;
     let _e206 = vec2<f32>(_e204, 6.0);
     let _e211 = textureSampleLevel(tex1D, samp, (_e206.x / _e206.y), 3.0);
     c = _e211;
     let _e212 = coord_1;
-    _ = vec4<f32>(_e212, 0.0, 0.0, 6.0);
     let _e218 = coord_1;
     let _e222 = vec4<f32>(_e218, 0.0, 0.0, 6.0);
     let _e229 = textureSampleLevel(tex1D, samp, (_e222.xyz / vec3<f32>(_e222.w)).x, 3.0);
     c = _e229;
     let _e230 = coord_1;
-    _ = vec2<f32>(_e230, 6.0);
     let _e235 = coord_1;
     let _e237 = vec2<f32>(_e235, 6.0);
     let _e243 = textureSampleLevel(tex1D, samp, (_e237.x / _e237.y), 3.0, 5);
     c = _e243;
     let _e244 = coord_1;
-    _ = vec4<f32>(_e244, 0.0, 0.0, 6.0);
     let _e251 = coord_1;
     let _e255 = vec4<f32>(_e251, 0.0, 0.0, 6.0);
     let _e263 = textureSampleLevel(tex1D, samp, (_e255.xyz / vec3<f32>(_e255.w)).x, 3.0, 5);
     c = _e263;
     let _e264 = coord_1;
-    _ = vec2<f32>(_e264, 6.0);
     let _e268 = coord_1;
     let _e270 = vec2<f32>(_e268, 6.0);
     let _e275 = textureSample(tex1D, samp, (_e270.x / _e270.y), 5);
     c = _e275;
     let _e276 = coord_1;
-    _ = vec4<f32>(_e276, 0.0, 0.0, 6.0);
     let _e282 = coord_1;
     let _e286 = vec4<f32>(_e282, 0.0, 0.0, 6.0);
     let _e293 = textureSample(tex1D, samp, (_e286.xyz / vec3<f32>(_e286.w)).x, 5);
     c = _e293;
     let _e294 = coord_1;
-    _ = vec2<f32>(_e294, 6.0);
     let _e299 = coord_1;
     let _e301 = vec2<f32>(_e299, 6.0);
     let _e307 = textureSampleBias(tex1D, samp, (_e301.x / _e301.y), 2.0, 5);
     c = _e307;
     let _e308 = coord_1;
-    _ = vec4<f32>(_e308, 0.0, 0.0, 6.0);
     let _e315 = coord_1;
     let _e319 = vec4<f32>(_e315, 0.0, 0.0, 6.0);
     let _e327 = textureSampleBias(tex1D, samp, (_e319.xyz / vec3<f32>(_e319.w)).x, 2.0, 5);
     c = _e327;
     let _e328 = coord_1;
-    _ = i32(_e328);
     let _e331 = coord_1;
     let _e334 = textureLoad(tex1D, i32(_e331), 3);
     c = _e334;
     let _e335 = coord_1;
-    _ = i32(_e335);
     let _e339 = coord_1;
     let _e343 = textureLoad(tex1D, i32(_e339), 3);
     c = _e343;
@@ -189,46 +163,36 @@ fn testTex1DArray(coord_2: vec2<f32>) {
     let _e20 = textureDimensions(tex1DArray, 0);
     let _e21 = textureNumLayers(tex1DArray);
     size1DArray = vec2<i32>(vec2<u32>(_e20, _e21));
-    _ = coord_3;
     let _e27 = coord_3;
     let _e31 = textureSample(tex1DArray, samp, _e27.x, i32(_e27.y));
     c_1 = _e31;
-    _ = coord_3;
     let _e34 = coord_3;
     let _e39 = textureSampleBias(tex1DArray, samp, _e34.x, i32(_e34.y), 2.0);
     c_1 = _e39;
-    _ = coord_3;
     let _e43 = coord_3;
     let _e49 = textureSampleGrad(tex1DArray, samp, _e43.x, i32(_e43.y), 4.0, 4.0);
     c_1 = _e49;
-    _ = coord_3;
     let _e54 = coord_3;
     let _e61 = textureSampleGrad(tex1DArray, samp, _e54.x, i32(_e54.y), 4.0, 4.0, 5);
     c_1 = _e61;
-    _ = coord_3;
     let _e64 = coord_3;
     let _e69 = textureSampleLevel(tex1DArray, samp, _e64.x, i32(_e64.y), 3.0);
     c_1 = _e69;
-    _ = coord_3;
     let _e73 = coord_3;
     let _e79 = textureSampleLevel(tex1DArray, samp, _e73.x, i32(_e73.y), 3.0, 5);
     c_1 = _e79;
-    _ = coord_3;
     let _e82 = coord_3;
     let _e87 = textureSample(tex1DArray, samp, _e82.x, i32(_e82.y), 5);
     c_1 = _e87;
-    _ = coord_3;
     let _e91 = coord_3;
     let _e97 = textureSampleBias(tex1DArray, samp, _e91.x, i32(_e91.y), 2.0, 5);
     c_1 = _e97;
     let _e98 = coord_3;
-    _ = vec2<i32>(_e98);
     let _e101 = coord_3;
     let _e102 = vec2<i32>(_e101);
     let _e106 = textureLoad(tex1DArray, _e102.x, _e102.y, 3);
     c_1 = _e106;
     let _e107 = coord_3;
-    _ = vec2<i32>(_e107);
     let _e111 = coord_3;
     let _e112 = vec2<i32>(_e111);
     let _e117 = textureLoad(tex1DArray, _e112.x, _e112.y, 3);
@@ -244,180 +208,116 @@ fn testTex2D(coord_4: vec2<f32>) {
     coord_5 = coord_4;
     let _e20 = textureDimensions(tex2D, 0);
     size2D = vec2<i32>(_e20);
-    _ = coord_5;
     let _e25 = coord_5;
     let _e26 = textureSample(tex2D, samp, _e25);
     c_2 = _e26;
-    _ = coord_5;
     let _e29 = coord_5;
     let _e31 = textureSampleBias(tex2D, samp, _e29, 2.0);
     c_2 = _e31;
-    _ = coord_5;
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e37 = coord_5;
     let _e42 = textureSampleGrad(tex2D, samp, _e37, vec2<f32>(4.0), vec2<f32>(4.0));
     c_2 = _e42;
-    _ = coord_5;
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e50 = coord_5;
-    _ = vec2<i32>(5);
     let _e57 = textureSampleGrad(tex2D, samp, _e50, vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
     c_2 = _e57;
-    _ = coord_5;
     let _e60 = coord_5;
     let _e62 = textureSampleLevel(tex2D, samp, _e60, 3.0);
     c_2 = _e62;
-    _ = coord_5;
-    _ = vec2<i32>(5);
     let _e67 = coord_5;
-    _ = vec2<i32>(5);
     let _e71 = textureSampleLevel(tex2D, samp, _e67, 3.0, vec2<i32>(5, 5));
     c_2 = _e71;
-    _ = coord_5;
-    _ = vec2<i32>(5);
     let _e75 = coord_5;
-    _ = vec2<i32>(5);
     let _e78 = textureSample(tex2D, samp, _e75, vec2<i32>(5, 5));
     c_2 = _e78;
-    _ = coord_5;
-    _ = vec2<i32>(5);
     let _e83 = coord_5;
-    _ = vec2<i32>(5);
     let _e87 = textureSampleBias(tex2D, samp, _e83, 2.0, vec2<i32>(5, 5));
     c_2 = _e87;
     let _e88 = coord_5;
-    _ = vec3<f32>(_e88.x, _e88.y, 6.0);
     let _e93 = coord_5;
     let _e97 = vec3<f32>(_e93.x, _e93.y, 6.0);
     let _e102 = textureSample(tex2D, samp, (_e97.xy / vec2<f32>(_e97.z)));
     c_2 = _e102;
     let _e103 = coord_5;
-    _ = vec4<f32>(_e103.x, _e103.y, 0.0, 6.0);
     let _e109 = coord_5;
     let _e114 = vec4<f32>(_e109.x, _e109.y, 0.0, 6.0);
     let _e120 = textureSample(tex2D, samp, (_e114.xyz / vec3<f32>(_e114.w)).xy);
     c_2 = _e120;
     let _e121 = coord_5;
-    _ = vec3<f32>(_e121.x, _e121.y, 6.0);
     let _e127 = coord_5;
     let _e131 = vec3<f32>(_e127.x, _e127.y, 6.0);
     let _e137 = textureSampleBias(tex2D, samp, (_e131.xy / vec2<f32>(_e131.z)), 2.0);
     c_2 = _e137;
     let _e138 = coord_5;
-    _ = vec4<f32>(_e138.x, _e138.y, 0.0, 6.0);
     let _e145 = coord_5;
     let _e150 = vec4<f32>(_e145.x, _e145.y, 0.0, 6.0);
     let _e157 = textureSampleBias(tex2D, samp, (_e150.xyz / vec3<f32>(_e150.w)).xy, 2.0);
     c_2 = _e157;
     let _e158 = coord_5;
-    _ = vec3<f32>(_e158.x, _e158.y, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e167 = coord_5;
     let _e171 = vec3<f32>(_e167.x, _e167.y, 6.0);
     let _e180 = textureSampleGrad(tex2D, samp, (_e171.xy / vec2<f32>(_e171.z)), vec2<f32>(4.0), vec2<f32>(4.0));
     c_2 = _e180;
     let _e181 = coord_5;
-    _ = vec4<f32>(_e181.x, _e181.y, 0.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e191 = coord_5;
     let _e196 = vec4<f32>(_e191.x, _e191.y, 0.0, 6.0);
     let _e206 = textureSampleGrad(tex2D, samp, (_e196.xyz / vec3<f32>(_e196.w)).xy, vec2<f32>(4.0), vec2<f32>(4.0));
     c_2 = _e206;
     let _e207 = coord_5;
-    _ = vec3<f32>(_e207.x, _e207.y, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e218 = coord_5;
     let _e222 = vec3<f32>(_e218.x, _e218.y, 6.0);
-    _ = vec2<i32>(5);
     let _e233 = textureSampleGrad(tex2D, samp, (_e222.xy / vec2<f32>(_e222.z)), vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
     c_2 = _e233;
     let _e234 = coord_5;
-    _ = vec4<f32>(_e234.x, _e234.y, 0.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e246 = coord_5;
     let _e251 = vec4<f32>(_e246.x, _e246.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e263 = textureSampleGrad(tex2D, samp, (_e251.xyz / vec3<f32>(_e251.w)).xy, vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
     c_2 = _e263;
     let _e264 = coord_5;
-    _ = vec3<f32>(_e264.x, _e264.y, 6.0);
     let _e270 = coord_5;
     let _e274 = vec3<f32>(_e270.x, _e270.y, 6.0);
     let _e280 = textureSampleLevel(tex2D, samp, (_e274.xy / vec2<f32>(_e274.z)), 3.0);
     c_2 = _e280;
     let _e281 = coord_5;
-    _ = vec4<f32>(_e281.x, _e281.y, 0.0, 6.0);
     let _e288 = coord_5;
     let _e293 = vec4<f32>(_e288.x, _e288.y, 0.0, 6.0);
     let _e300 = textureSampleLevel(tex2D, samp, (_e293.xyz / vec3<f32>(_e293.w)).xy, 3.0);
     c_2 = _e300;
     let _e301 = coord_5;
-    _ = vec3<f32>(_e301.x, _e301.y, 6.0);
-    _ = vec2<i32>(5);
     let _e309 = coord_5;
     let _e313 = vec3<f32>(_e309.x, _e309.y, 6.0);
-    _ = vec2<i32>(5);
     let _e321 = textureSampleLevel(tex2D, samp, (_e313.xy / vec2<f32>(_e313.z)), 3.0, vec2<i32>(5, 5));
     c_2 = _e321;
     let _e322 = coord_5;
-    _ = vec4<f32>(_e322.x, _e322.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e331 = coord_5;
     let _e336 = vec4<f32>(_e331.x, _e331.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e345 = textureSampleLevel(tex2D, samp, (_e336.xyz / vec3<f32>(_e336.w)).xy, 3.0, vec2<i32>(5, 5));
     c_2 = _e345;
     let _e346 = coord_5;
-    _ = vec3<f32>(_e346.x, _e346.y, 6.0);
-    _ = vec2<i32>(5);
     let _e353 = coord_5;
     let _e357 = vec3<f32>(_e353.x, _e353.y, 6.0);
-    _ = vec2<i32>(5);
     let _e364 = textureSample(tex2D, samp, (_e357.xy / vec2<f32>(_e357.z)), vec2<i32>(5, 5));
     c_2 = _e364;
     let _e365 = coord_5;
-    _ = vec4<f32>(_e365.x, _e365.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e373 = coord_5;
     let _e378 = vec4<f32>(_e373.x, _e373.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e386 = textureSample(tex2D, samp, (_e378.xyz / vec3<f32>(_e378.w)).xy, vec2<i32>(5, 5));
     c_2 = _e386;
     let _e387 = coord_5;
-    _ = vec3<f32>(_e387.x, _e387.y, 6.0);
-    _ = vec2<i32>(5);
     let _e395 = coord_5;
     let _e399 = vec3<f32>(_e395.x, _e395.y, 6.0);
-    _ = vec2<i32>(5);
     let _e407 = textureSampleBias(tex2D, samp, (_e399.xy / vec2<f32>(_e399.z)), 2.0, vec2<i32>(5, 5));
     c_2 = _e407;
     let _e408 = coord_5;
-    _ = vec4<f32>(_e408.x, _e408.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e417 = coord_5;
     let _e422 = vec4<f32>(_e417.x, _e417.y, 0.0, 6.0);
-    _ = vec2<i32>(5);
     let _e431 = textureSampleBias(tex2D, samp, (_e422.xyz / vec3<f32>(_e422.w)).xy, 2.0, vec2<i32>(5, 5));
     c_2 = _e431;
     let _e432 = coord_5;
-    _ = vec2<i32>(_e432);
     let _e435 = coord_5;
     let _e438 = textureLoad(tex2D, vec2<i32>(_e435), 3);
     c_2 = _e438;
     let _e439 = coord_5;
-    _ = vec2<i32>(_e439);
-    _ = vec2<i32>(5);
     let _e444 = coord_5;
-    _ = vec2<i32>(5);
     let _e449 = textureLoad(tex2D, vec2<i32>(_e444), 3);
     c_2 = _e449;
     return;
@@ -432,108 +332,68 @@ fn testTex2DShadow(coord_6: vec2<f32>) {
     let _e20 = textureDimensions(tex2DShadow, 0);
     size2DShadow = vec2<i32>(_e20);
     let _e24 = coord_7;
-    _ = vec3<f32>(_e24.x, _e24.y, 1.0);
     let _e29 = coord_7;
     let _e33 = vec3<f32>(_e29.x, _e29.y, 1.0);
     let _e36 = textureSampleCompare(tex2DShadow, sampShadow, _e33.xy, _e33.z);
     d = _e36;
     let _e37 = coord_7;
-    _ = vec3<f32>(_e37.x, _e37.y, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e46 = coord_7;
     let _e50 = vec3<f32>(_e46.x, _e46.y, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e57 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e50.xy, _e50.z);
     d = _e57;
     let _e58 = coord_7;
-    _ = vec3<f32>(_e58.x, _e58.y, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e69 = coord_7;
     let _e73 = vec3<f32>(_e69.x, _e69.y, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e82 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e73.xy, _e73.z, vec2<i32>(5, 5));
     d = _e82;
     let _e83 = coord_7;
-    _ = vec3<f32>(_e83.x, _e83.y, 1.0);
     let _e89 = coord_7;
     let _e93 = vec3<f32>(_e89.x, _e89.y, 1.0);
     let _e97 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e93.xy, _e93.z);
     d = _e97;
     let _e98 = coord_7;
-    _ = vec3<f32>(_e98.x, _e98.y, 1.0);
-    _ = vec2<i32>(5);
     let _e106 = coord_7;
     let _e110 = vec3<f32>(_e106.x, _e106.y, 1.0);
-    _ = vec2<i32>(5);
     let _e116 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e110.xy, _e110.z, vec2<i32>(5, 5));
     d = _e116;
     let _e117 = coord_7;
-    _ = vec3<f32>(_e117.x, _e117.y, 1.0);
-    _ = vec2<i32>(5);
     let _e124 = coord_7;
     let _e128 = vec3<f32>(_e124.x, _e124.y, 1.0);
-    _ = vec2<i32>(5);
     let _e133 = textureSampleCompare(tex2DShadow, sampShadow, _e128.xy, _e128.z, vec2<i32>(5, 5));
     d = _e133;
     let _e134 = coord_7;
-    _ = vec4<f32>(_e134.x, _e134.y, 1.0, 6.0);
     let _e140 = coord_7;
     let _e145 = vec4<f32>(_e140.x, _e140.y, 1.0, 6.0);
     let _e149 = (_e145.xyz / vec3<f32>(_e145.w));
     let _e152 = textureSampleCompare(tex2DShadow, sampShadow, _e149.xy, _e149.z);
     d = _e152;
     let _e153 = coord_7;
-    _ = vec4<f32>(_e153.x, _e153.y, 1.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e163 = coord_7;
     let _e168 = vec4<f32>(_e163.x, _e163.y, 1.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e176 = (_e168.xyz / vec3<f32>(_e168.w));
     let _e179 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e176.xy, _e176.z);
     d = _e179;
     let _e180 = coord_7;
-    _ = vec4<f32>(_e180.x, _e180.y, 1.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e192 = coord_7;
     let _e197 = vec4<f32>(_e192.x, _e192.y, 1.0, 6.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e207 = (_e197.xyz / vec3<f32>(_e197.w));
     let _e210 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e207.xy, _e207.z, vec2<i32>(5, 5));
     d = _e210;
     let _e211 = coord_7;
-    _ = vec4<f32>(_e211.x, _e211.y, 1.0, 6.0);
     let _e218 = coord_7;
     let _e223 = vec4<f32>(_e218.x, _e218.y, 1.0, 6.0);
     let _e228 = (_e223.xyz / vec3<f32>(_e223.w));
     let _e231 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e228.xy, _e228.z);
     d = _e231;
     let _e232 = coord_7;
-    _ = vec4<f32>(_e232.x, _e232.y, 1.0, 6.0);
-    _ = vec2<i32>(5);
     let _e241 = coord_7;
     let _e246 = vec4<f32>(_e241.x, _e241.y, 1.0, 6.0);
-    _ = vec2<i32>(5);
     let _e253 = (_e246.xyz / vec3<f32>(_e246.w));
     let _e256 = textureSampleCompareLevel(tex2DShadow, sampShadow, _e253.xy, _e253.z, vec2<i32>(5, 5));
     d = _e256;
     let _e257 = coord_7;
-    _ = vec4<f32>(_e257.x, _e257.y, 1.0, 6.0);
-    _ = vec2<i32>(5);
     let _e265 = coord_7;
     let _e270 = vec4<f32>(_e265.x, _e265.y, 1.0, 6.0);
-    _ = vec2<i32>(5);
     let _e276 = (_e270.xyz / vec3<f32>(_e270.w));
     let _e279 = textureSampleCompare(tex2DShadow, sampShadow, _e276.xy, _e276.z, vec2<i32>(5, 5));
     d = _e279;
@@ -549,62 +409,38 @@ fn testTex2DArray(coord_8: vec3<f32>) {
     let _e20 = textureDimensions(tex2DArray, 0);
     let _e23 = textureNumLayers(tex2DArray);
     size2DArray = vec3<i32>(vec3<u32>(_e20.x, _e20.y, _e23));
-    _ = coord_9;
     let _e29 = coord_9;
     let _e33 = textureSample(tex2DArray, samp, _e29.xy, i32(_e29.z));
     c_3 = _e33;
-    _ = coord_9;
     let _e36 = coord_9;
     let _e41 = textureSampleBias(tex2DArray, samp, _e36.xy, i32(_e36.z), 2.0);
     c_3 = _e41;
-    _ = coord_9;
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e47 = coord_9;
     let _e55 = textureSampleGrad(tex2DArray, samp, _e47.xy, i32(_e47.z), vec2<f32>(4.0), vec2<f32>(4.0));
     c_3 = _e55;
-    _ = coord_9;
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e63 = coord_9;
-    _ = vec2<i32>(5);
     let _e73 = textureSampleGrad(tex2DArray, samp, _e63.xy, i32(_e63.z), vec2<f32>(4.0), vec2<f32>(4.0), vec2<i32>(5, 5));
     c_3 = _e73;
-    _ = coord_9;
     let _e76 = coord_9;
     let _e81 = textureSampleLevel(tex2DArray, samp, _e76.xy, i32(_e76.z), 3.0);
     c_3 = _e81;
-    _ = coord_9;
-    _ = vec2<i32>(5);
     let _e86 = coord_9;
-    _ = vec2<i32>(5);
     let _e93 = textureSampleLevel(tex2DArray, samp, _e86.xy, i32(_e86.z), 3.0, vec2<i32>(5, 5));
     c_3 = _e93;
-    _ = coord_9;
-    _ = vec2<i32>(5);
     let _e97 = coord_9;
-    _ = vec2<i32>(5);
     let _e103 = textureSample(tex2DArray, samp, _e97.xy, i32(_e97.z), vec2<i32>(5, 5));
     c_3 = _e103;
-    _ = coord_9;
-    _ = vec2<i32>(5);
     let _e108 = coord_9;
-    _ = vec2<i32>(5);
     let _e115 = textureSampleBias(tex2DArray, samp, _e108.xy, i32(_e108.z), 2.0, vec2<i32>(5, 5));
     c_3 = _e115;
     let _e116 = coord_9;
-    _ = vec3<i32>(_e116);
     let _e119 = coord_9;
     let _e120 = vec3<i32>(_e119);
     let _e124 = textureLoad(tex2DArray, _e120.xy, _e120.z, 3);
     c_3 = _e124;
     let _e125 = coord_9;
-    _ = vec3<i32>(_e125);
-    _ = vec2<i32>(5);
     let _e130 = coord_9;
     let _e131 = vec3<i32>(_e130);
-    _ = vec2<i32>(5);
     let _e137 = textureLoad(tex2DArray, _e131.xy, _e131.z, 3);
     c_3 = _e137;
     return;
@@ -620,39 +456,23 @@ fn testTex2DArrayShadow(coord_10: vec3<f32>) {
     let _e23 = textureNumLayers(tex2DArrayShadow);
     size2DArrayShadow = vec3<i32>(vec3<u32>(_e20.x, _e20.y, _e23));
     let _e28 = coord_11;
-    _ = vec4<f32>(_e28.x, _e28.y, _e28.z, 1.0);
     let _e34 = coord_11;
     let _e39 = vec4<f32>(_e34.x, _e34.y, _e34.z, 1.0);
     let _e44 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e39.xy, i32(_e39.z), _e39.w);
     d_1 = _e44;
     let _e45 = coord_11;
-    _ = vec4<f32>(_e45.x, _e45.y, _e45.z, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e55 = coord_11;
     let _e60 = vec4<f32>(_e55.x, _e55.y, _e55.z, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
     let _e69 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e60.xy, i32(_e60.z), _e60.w);
     d_1 = _e69;
     let _e70 = coord_11;
-    _ = vec4<f32>(_e70.x, _e70.y, _e70.z, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e82 = coord_11;
     let _e87 = vec4<f32>(_e82.x, _e82.y, _e82.z, 1.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<f32>(4.0);
-    _ = vec2<i32>(5);
     let _e98 = textureSampleCompareLevel(tex2DArrayShadow, sampShadow, _e87.xy, i32(_e87.z), _e87.w, vec2<i32>(5, 5));
     d_1 = _e98;
     let _e99 = coord_11;
-    _ = vec4<f32>(_e99.x, _e99.y, _e99.z, 1.0);
-    _ = vec2<i32>(5);
     let _e107 = coord_11;
     let _e112 = vec4<f32>(_e107.x, _e107.y, _e107.z, 1.0);
-    _ = vec2<i32>(5);
     let _e119 = textureSampleCompare(tex2DArrayShadow, sampShadow, _e112.xy, i32(_e112.z), _e112.w, vec2<i32>(5, 5));
     d_1 = _e119;
     return;
@@ -666,21 +486,15 @@ fn testTexCube(coord_12: vec3<f32>) {
     coord_13 = coord_12;
     let _e20 = textureDimensions(texCube, 0);
     sizeCube = vec2<i32>(_e20);
-    _ = coord_13;
     let _e25 = coord_13;
     let _e26 = textureSample(texCube, samp, _e25);
     c_4 = _e26;
-    _ = coord_13;
     let _e29 = coord_13;
     let _e31 = textureSampleBias(texCube, samp, _e29, 2.0);
     c_4 = _e31;
-    _ = coord_13;
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e37 = coord_13;
     let _e42 = textureSampleGrad(texCube, samp, _e37, vec3<f32>(4.0), vec3<f32>(4.0));
     c_4 = _e42;
-    _ = coord_13;
     let _e45 = coord_13;
     let _e47 = textureSampleLevel(texCube, samp, _e45, 3.0);
     c_4 = _e47;
@@ -696,19 +510,13 @@ fn testTexCubeShadow(coord_14: vec3<f32>) {
     let _e20 = textureDimensions(texCubeShadow, 0);
     sizeCubeShadow = vec2<i32>(_e20);
     let _e24 = coord_15;
-    _ = vec4<f32>(_e24.x, _e24.y, _e24.z, 1.0);
     let _e30 = coord_15;
     let _e35 = vec4<f32>(_e30.x, _e30.y, _e30.z, 1.0);
     let _e38 = textureSampleCompare(texCubeShadow, sampShadow, _e35.xyz, _e35.w);
     d_2 = _e38;
     let _e39 = coord_15;
-    _ = vec4<f32>(_e39.x, _e39.y, _e39.z, 1.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e49 = coord_15;
     let _e54 = vec4<f32>(_e49.x, _e49.y, _e49.z, 1.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e61 = textureSampleCompareLevel(texCubeShadow, sampShadow, _e54.xyz, _e54.w);
     d_2 = _e61;
     return;
@@ -723,21 +531,15 @@ fn testTexCubeArray(coord_16: vec4<f32>) {
     let _e20 = textureDimensions(texCubeArray, 0);
     let _e23 = textureNumLayers(texCubeArray);
     sizeCubeArray = vec3<i32>(vec3<u32>(_e20.x, _e20.y, _e23));
-    _ = coord_17;
     let _e29 = coord_17;
     let _e33 = textureSample(texCubeArray, samp, _e29.xyz, i32(_e29.w));
     c_5 = _e33;
-    _ = coord_17;
     let _e36 = coord_17;
     let _e41 = textureSampleBias(texCubeArray, samp, _e36.xyz, i32(_e36.w), 2.0);
     c_5 = _e41;
-    _ = coord_17;
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e47 = coord_17;
     let _e55 = textureSampleGrad(texCubeArray, samp, _e47.xyz, i32(_e47.w), vec3<f32>(4.0), vec3<f32>(4.0));
     c_5 = _e55;
-    _ = coord_17;
     let _e58 = coord_17;
     let _e63 = textureSampleLevel(texCubeArray, samp, _e58.xyz, i32(_e58.w), 3.0);
     c_5 = _e63;
@@ -753,7 +555,6 @@ fn testTexCubeArrayShadow(coord_18: vec4<f32>) {
     let _e20 = textureDimensions(texCubeArrayShadow, 0);
     let _e23 = textureNumLayers(texCubeArrayShadow);
     sizeCubeArrayShadow = vec3<i32>(vec3<u32>(_e20.x, _e20.y, _e23));
-    _ = coord_19;
     let _e30 = coord_19;
     let _e35 = textureSampleCompare(texCubeArrayShadow, sampShadow, _e30.xyz, i32(_e30.w), 1.0);
     d_3 = _e35;
@@ -768,120 +569,76 @@ fn testTex3D(coord_20: vec3<f32>) {
     coord_21 = coord_20;
     let _e20 = textureDimensions(tex3D, 0);
     size3D = vec3<i32>(_e20);
-    _ = coord_21;
     let _e25 = coord_21;
     let _e26 = textureSample(tex3D, samp, _e25);
     c_6 = _e26;
-    _ = coord_21;
     let _e29 = coord_21;
     let _e31 = textureSampleBias(tex3D, samp, _e29, 2.0);
     c_6 = _e31;
     let _e32 = coord_21;
-    _ = vec4<f32>(_e32.x, _e32.y, _e32.z, 6.0);
     let _e38 = coord_21;
     let _e43 = vec4<f32>(_e38.x, _e38.y, _e38.z, 6.0);
     let _e48 = textureSample(tex3D, samp, (_e43.xyz / vec3<f32>(_e43.w)));
     c_6 = _e48;
     let _e49 = coord_21;
-    _ = vec4<f32>(_e49.x, _e49.y, _e49.z, 6.0);
     let _e56 = coord_21;
     let _e61 = vec4<f32>(_e56.x, _e56.y, _e56.z, 6.0);
     let _e67 = textureSampleBias(tex3D, samp, (_e61.xyz / vec3<f32>(_e61.w)), 2.0);
     c_6 = _e67;
     let _e68 = coord_21;
-    _ = vec4<f32>(_e68.x, _e68.y, _e68.z, 6.0);
-    _ = vec3<i32>(5);
     let _e76 = coord_21;
     let _e81 = vec4<f32>(_e76.x, _e76.y, _e76.z, 6.0);
-    _ = vec3<i32>(5);
     let _e88 = textureSample(tex3D, samp, (_e81.xyz / vec3<f32>(_e81.w)), vec3<i32>(5, 5, 5));
     c_6 = _e88;
     let _e89 = coord_21;
-    _ = vec4<f32>(_e89.x, _e89.y, _e89.z, 6.0);
-    _ = vec3<i32>(5);
     let _e98 = coord_21;
     let _e103 = vec4<f32>(_e98.x, _e98.y, _e98.z, 6.0);
-    _ = vec3<i32>(5);
     let _e111 = textureSampleBias(tex3D, samp, (_e103.xyz / vec3<f32>(_e103.w)), 2.0, vec3<i32>(5, 5, 5));
     c_6 = _e111;
     let _e112 = coord_21;
-    _ = vec4<f32>(_e112.x, _e112.y, _e112.z, 6.0);
     let _e119 = coord_21;
     let _e124 = vec4<f32>(_e119.x, _e119.y, _e119.z, 6.0);
     let _e130 = textureSampleLevel(tex3D, samp, (_e124.xyz / vec3<f32>(_e124.w)), 3.0);
     c_6 = _e130;
     let _e131 = coord_21;
-    _ = vec4<f32>(_e131.x, _e131.y, _e131.z, 6.0);
-    _ = vec3<i32>(5);
     let _e140 = coord_21;
     let _e145 = vec4<f32>(_e140.x, _e140.y, _e140.z, 6.0);
-    _ = vec3<i32>(5);
     let _e153 = textureSampleLevel(tex3D, samp, (_e145.xyz / vec3<f32>(_e145.w)), 3.0, vec3<i32>(5, 5, 5));
     c_6 = _e153;
     let _e154 = coord_21;
-    _ = vec4<f32>(_e154.x, _e154.y, _e154.z, 6.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e164 = coord_21;
     let _e169 = vec4<f32>(_e164.x, _e164.y, _e164.z, 6.0);
     let _e178 = textureSampleGrad(tex3D, samp, (_e169.xyz / vec3<f32>(_e169.w)), vec3<f32>(4.0), vec3<f32>(4.0));
     c_6 = _e178;
     let _e179 = coord_21;
-    _ = vec4<f32>(_e179.x, _e179.y, _e179.z, 6.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<i32>(5);
     let _e191 = coord_21;
     let _e196 = vec4<f32>(_e191.x, _e191.y, _e191.z, 6.0);
-    _ = vec3<i32>(5);
     let _e207 = textureSampleGrad(tex3D, samp, (_e196.xyz / vec3<f32>(_e196.w)), vec3<f32>(4.0), vec3<f32>(4.0), vec3<i32>(5, 5, 5));
     c_6 = _e207;
-    _ = coord_21;
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
     let _e213 = coord_21;
     let _e218 = textureSampleGrad(tex3D, samp, _e213, vec3<f32>(4.0), vec3<f32>(4.0));
     c_6 = _e218;
-    _ = coord_21;
-    _ = vec3<f32>(4.0);
-    _ = vec3<f32>(4.0);
-    _ = vec3<i32>(5);
     let _e226 = coord_21;
-    _ = vec3<i32>(5);
     let _e233 = textureSampleGrad(tex3D, samp, _e226, vec3<f32>(4.0), vec3<f32>(4.0), vec3<i32>(5, 5, 5));
     c_6 = _e233;
-    _ = coord_21;
     let _e236 = coord_21;
     let _e238 = textureSampleLevel(tex3D, samp, _e236, 3.0);
     c_6 = _e238;
-    _ = coord_21;
-    _ = vec3<i32>(5);
     let _e243 = coord_21;
-    _ = vec3<i32>(5);
     let _e247 = textureSampleLevel(tex3D, samp, _e243, 3.0, vec3<i32>(5, 5, 5));
     c_6 = _e247;
-    _ = coord_21;
-    _ = vec3<i32>(5);
     let _e251 = coord_21;
-    _ = vec3<i32>(5);
     let _e254 = textureSample(tex3D, samp, _e251, vec3<i32>(5, 5, 5));
     c_6 = _e254;
-    _ = coord_21;
-    _ = vec3<i32>(5);
     let _e259 = coord_21;
-    _ = vec3<i32>(5);
     let _e263 = textureSampleBias(tex3D, samp, _e259, 2.0, vec3<i32>(5, 5, 5));
     c_6 = _e263;
     let _e264 = coord_21;
-    _ = vec3<i32>(_e264);
     let _e267 = coord_21;
     let _e270 = textureLoad(tex3D, vec3<i32>(_e267), 3);
     c_6 = _e270;
     let _e271 = coord_21;
-    _ = vec3<i32>(_e271);
-    _ = vec3<i32>(5);
     let _e276 = coord_21;
-    _ = vec3<i32>(5);
     let _e281 = textureLoad(tex3D, vec3<i32>(_e276), 3);
     c_6 = _e281;
     return;
@@ -896,7 +653,6 @@ fn testTex2DMS(coord_22: vec2<f32>) {
     let _e18 = textureDimensions(tex2DMS);
     size2DMS = vec2<i32>(_e18);
     let _e22 = coord_23;
-    _ = vec2<i32>(_e22);
     let _e25 = coord_23;
     let _e28 = textureLoad(tex2DMS, vec2<i32>(_e25), 3);
     c_7 = _e28;
@@ -913,7 +669,6 @@ fn testTex2DMSArray(coord_24: vec3<f32>) {
     let _e21 = textureNumLayers(tex2DMSArray);
     size2DMSArray = vec3<i32>(vec3<u32>(_e18.x, _e18.y, _e21));
     let _e26 = coord_25;
-    _ = vec3<i32>(_e26);
     let _e29 = coord_25;
     let _e30 = vec3<i32>(_e29);
     let _e34 = textureLoad(tex2DMSArray, _e30.xy, _e30.z, 3);
diff --git a/tests/out/wgsl/vector-functions-frag.wgsl b/tests/out/wgsl/vector-functions-frag.wgsl
index f7dfdd15cb..90b35f3837 100644
--- a/tests/out/wgsl/vector-functions-frag.wgsl
+++ b/tests/out/wgsl/vector-functions-frag.wgsl
@@ -10,33 +10,21 @@ fn ftest(a: vec4<f32>, b: vec4<f32>) {
 
     a_1 = a;
     b_1 = b;
-    _ = a_1;
-    _ = b_1;
     let _e6 = a_1;
     let _e7 = b_1;
     c = (_e6 < _e7);
-    _ = a_1;
-    _ = b_1;
     let _e12 = a_1;
     let _e13 = b_1;
     d = (_e12 <= _e13);
-    _ = a_1;
-    _ = b_1;
     let _e18 = a_1;
     let _e19 = b_1;
     e = (_e18 > _e19);
-    _ = a_1;
-    _ = b_1;
     let _e24 = a_1;
     let _e25 = b_1;
     f = (_e24 >= _e25);
-    _ = a_1;
-    _ = b_1;
     let _e30 = a_1;
     let _e31 = b_1;
     g = (_e30 == _e31);
-    _ = a_1;
-    _ = b_1;
     let _e36 = a_1;
     let _e37 = b_1;
     h = (_e36 != _e37);
@@ -55,33 +43,21 @@ fn dtest(a_2: vec4<f64>, b_2: vec4<f64>) {
 
     a_3 = a_2;
     b_3 = b_2;
-    _ = a_3;
-    _ = b_3;
     let _e6 = a_3;
     let _e7 = b_3;
     c_1 = (_e6 < _e7);
-    _ = a_3;
-    _ = b_3;
     let _e12 = a_3;
     let _e13 = b_3;
     d_1 = (_e12 <= _e13);
-    _ = a_3;
-    _ = b_3;
     let _e18 = a_3;
     let _e19 = b_3;
     e_1 = (_e18 > _e19);
-    _ = a_3;
-    _ = b_3;
     let _e24 = a_3;
     let _e25 = b_3;
     f_1 = (_e24 >= _e25);
-    _ = a_3;
-    _ = b_3;
     let _e30 = a_3;
     let _e31 = b_3;
     g_1 = (_e30 == _e31);
-    _ = a_3;
-    _ = b_3;
     let _e36 = a_3;
     let _e37 = b_3;
     h_1 = (_e36 != _e37);
@@ -100,33 +76,21 @@ fn itest(a_4: vec4<i32>, b_4: vec4<i32>) {
 
     a_5 = a_4;
     b_5 = b_4;
-    _ = a_5;
-    _ = b_5;
     let _e6 = a_5;
     let _e7 = b_5;
     c_2 = (_e6 < _e7);
-    _ = a_5;
-    _ = b_5;
     let _e12 = a_5;
     let _e13 = b_5;
     d_2 = (_e12 <= _e13);
-    _ = a_5;
-    _ = b_5;
     let _e18 = a_5;
     let _e19 = b_5;
     e_2 = (_e18 > _e19);
-    _ = a_5;
-    _ = b_5;
     let _e24 = a_5;
     let _e25 = b_5;
     f_2 = (_e24 >= _e25);
-    _ = a_5;
-    _ = b_5;
     let _e30 = a_5;
     let _e31 = b_5;
     g_2 = (_e30 == _e31);
-    _ = a_5;
-    _ = b_5;
     let _e36 = a_5;
     let _e37 = b_5;
     h_2 = (_e36 != _e37);
@@ -145,33 +109,21 @@ fn utest(a_6: vec4<u32>, b_6: vec4<u32>) {
 
     a_7 = a_6;
     b_7 = b_6;
-    _ = a_7;
-    _ = b_7;
     let _e6 = a_7;
     let _e7 = b_7;
     c_3 = (_e6 < _e7);
-    _ = a_7;
-    _ = b_7;
     let _e12 = a_7;
     let _e13 = b_7;
     d_3 = (_e12 <= _e13);
-    _ = a_7;
-    _ = b_7;
     let _e18 = a_7;
     let _e19 = b_7;
     e_3 = (_e18 > _e19);
-    _ = a_7;
-    _ = b_7;
     let _e24 = a_7;
     let _e25 = b_7;
     f_3 = (_e24 >= _e25);
-    _ = a_7;
-    _ = b_7;
     let _e30 = a_7;
     let _e31 = b_7;
     g_3 = (_e30 == _e31);
-    _ = a_7;
-    _ = b_7;
     let _e36 = a_7;
     let _e37 = b_7;
     h_3 = (_e36 != _e37);
@@ -189,23 +141,16 @@ fn btest(a_8: vec4<bool>, b_8: vec4<bool>) {
 
     a_9 = a_8;
     b_9 = b_8;
-    _ = a_9;
-    _ = b_9;
     let _e6 = a_9;
     let _e7 = b_9;
     c_4 = (_e6 == _e7);
-    _ = a_9;
-    _ = b_9;
     let _e12 = a_9;
     let _e13 = b_9;
     d_4 = (_e12 != _e13);
-    _ = a_9;
     let _e17 = a_9;
     e_4 = any(_e17);
-    _ = a_9;
     let _e21 = a_9;
     f_4 = all(_e21);
-    _ = a_9;
     let _e25 = a_9;
     g_4 = !(_e25);
     return;