[glsl] Run PreservePadding before DirectVariableAccess

The PreservePadding transform generates functions that take storage
buffer pointer parameters, which need to be transformed by
DirectVariableAccess.

Bug: 42251044
Change-Id: If0d1d15b5370fb08e03cc34df0fa884c77168da0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/210514
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/glsl/writer/access_test.cc b/src/tint/lang/glsl/writer/access_test.cc
index 1c38c6d..fd5d660 100644
--- a/src/tint/lang/glsl/writer/access_test.cc
+++ b/src/tint/lang/glsl/writer/access_test.cc
@@ -1755,7 +1755,7 @@
 buffer v_block_1_ssbo {
   vec3 inner[5];
 } v_1;
-void tint_store_and_preserve_padding(inout vec3 target[5], vec3 value_param[5]) {
+void tint_store_and_preserve_padding(vec3 value_param[5]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -1764,7 +1764,7 @@
       if ((v_3 >= 5u)) {
         break;
       }
-      target[v_3] = value_param[v_3];
+      v_1.inner[v_3] = value_param[v_3];
       {
         v_2 = (v_3 + 1u);
       }
@@ -1774,7 +1774,7 @@
 }
 void main() {
   vec3 ary[5] = vec3[5](vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
-  tint_store_and_preserve_padding(v_1.inner, ary);
+  tint_store_and_preserve_padding(ary);
 }
 )");
 }
@@ -1974,21 +1974,21 @@
 buffer v_block_1_ssbo {
   SB inner;
 } v_1;
-void tint_store_and_preserve_padding_2(inout Inner target, Inner value_param) {
-  target.s = value_param.s;
-  target.t = value_param.t;
+void tint_store_and_preserve_padding_2(Inner value_param) {
+  v_1.inner.b.y.s = value_param.s;
+  v_1.inner.b.y.t = value_param.t;
 }
-void tint_store_and_preserve_padding_1(inout Outer target, Outer value_param) {
-  target.x = value_param.x;
-  tint_store_and_preserve_padding_2(target.y, value_param.y);
+void tint_store_and_preserve_padding_1(Outer value_param) {
+  v_1.inner.b.x = value_param.x;
+  tint_store_and_preserve_padding_2(value_param.y);
 }
-void tint_store_and_preserve_padding(inout SB target, SB value_param) {
-  target.a = value_param.a;
-  tint_store_and_preserve_padding_1(target.b, value_param.b);
+void tint_store_and_preserve_padding(SB value_param) {
+  v_1.inner.a = value_param.a;
+  tint_store_and_preserve_padding_1(value_param.b);
 }
 void main() {
   SB s = SB(0, 0u, 0u, 0u, Outer(0.0f, 0u, 0u, 0u, Inner(0.0f, 0u, 0u, 0u, vec3(0.0f), 0u)));
-  tint_store_and_preserve_padding(v_1.inner, s);
+  tint_store_and_preserve_padding(s);
 }
 )");
 }
@@ -2050,7 +2050,7 @@
 buffer v_block_1_ssbo {
   SB inner;
 } v_1;
-void tint_store_and_preserve_padding_4(inout vec3 target[5], vec3 value_param[5]) {
+void tint_store_and_preserve_padding_4(vec3 value_param[5]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -2059,7 +2059,7 @@
       if ((v_3 >= 5u)) {
         break;
       }
-      target[v_3] = value_param[v_3];
+      v_1.inner.b.y.t[v_3] = value_param[v_3];
       {
         v_2 = (v_3 + 1u);
       }
@@ -2067,26 +2067,26 @@
     }
   }
 }
-void tint_store_and_preserve_padding_3(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_3(mat3 value_param) {
+  v_1.inner.b.y.s[0u] = value_param[0u];
+  v_1.inner.b.y.s[1u] = value_param[1u];
+  v_1.inner.b.y.s[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_2(inout Inner target, Inner value_param) {
-  tint_store_and_preserve_padding_3(target.s, value_param.s);
-  tint_store_and_preserve_padding_4(target.t, value_param.t);
+void tint_store_and_preserve_padding_2(Inner value_param) {
+  tint_store_and_preserve_padding_3(value_param.s);
+  tint_store_and_preserve_padding_4(value_param.t);
 }
-void tint_store_and_preserve_padding_1(inout Outer target, Outer value_param) {
-  target.x = value_param.x;
-  tint_store_and_preserve_padding_2(target.y, value_param.y);
+void tint_store_and_preserve_padding_1(Outer value_param) {
+  v_1.inner.b.x = value_param.x;
+  tint_store_and_preserve_padding_2(value_param.y);
 }
-void tint_store_and_preserve_padding(inout SB target, SB value_param) {
-  target.a = value_param.a;
-  tint_store_and_preserve_padding_1(target.b, value_param.b);
+void tint_store_and_preserve_padding(SB value_param) {
+  v_1.inner.a = value_param.a;
+  tint_store_and_preserve_padding_1(value_param.b);
 }
 void main() {
   SB s = SB(0, 0u, 0u, 0u, Outer(0.0f, 0u, 0u, 0u, Inner(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)), vec3[5](vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)))));
-  tint_store_and_preserve_padding(v_1.inner, s);
+  tint_store_and_preserve_padding(s);
 }
 )");
 }
diff --git a/src/tint/lang/glsl/writer/raise/raise.cc b/src/tint/lang/glsl/writer/raise/raise.cc
index d851f83..5badc90 100644
--- a/src/tint/lang/glsl/writer/raise/raise.cc
+++ b/src/tint/lang/glsl/writer/raise/raise.cc
@@ -150,11 +150,13 @@
 
     RUN_TRANSFORM(core::ir::transform::BlockDecoratedStructs, module);
 
-    // TODO(dsinclair): CombineSamplers
+    // `PreservePadding` must run before `DirectVariableAccess`.
+    RUN_TRANSFORM(core::ir::transform::PreservePadding, module);
 
     {
         // This must come after `MultiplanarExternalTexture` as it will insert functions with
-        // texture parameters
+        // texture parameters, and also after `PreservePadding` which inserts functions with storage
+        // buffer parameters.
         core::ir::transform::DirectVariableAccessOptions dva_config{};
         dva_config.transform_handle = true;
         RUN_TRANSFORM(core::ir::transform::DirectVariableAccess, module, dva_config);
@@ -183,7 +185,6 @@
     // Must come after BuiltinPolyfill as builtins can add bitcasts
     RUN_TRANSFORM(raise::BitcastPolyfill, module);
 
-    RUN_TRANSFORM(core::ir::transform::PreservePadding, module);
     RUN_TRANSFORM(core::ir::transform::VectorizeScalarMatrixConstructors, module);
     RUN_TRANSFORM(core::ir::transform::RemoveContinueInSwitch, module);
 
diff --git a/test/tint/array/strides.spvasm.expected.ir.glsl b/test/tint/array/strides.spvasm.expected.ir.glsl
index 2de042f..b963686 100644
--- a/test/tint/array/strides.spvasm.expected.ir.glsl
+++ b/test/tint/array/strides.spvasm.expected.ir.glsl
@@ -38,10 +38,10 @@
 buffer s_block_1_ssbo {
   S inner;
 } v;
-void tint_store_and_preserve_padding_4(inout strided_arr target, strided_arr value_param) {
-  target.el = value_param.el;
+void tint_store_and_preserve_padding_4(uint target_indices[3], strided_arr value_param) {
+  v.inner.a[target_indices[0u]].el[target_indices[1u]][target_indices[2u]].el = value_param.el;
 }
-void tint_store_and_preserve_padding_3(inout strided_arr target[2], strided_arr value_param[2]) {
+void tint_store_and_preserve_padding_3(uint target_indices[2], strided_arr value_param[2]) {
   {
     uint v_1 = 0u;
     v_1 = 0u;
@@ -50,7 +50,7 @@
       if ((v_2 >= 2u)) {
         break;
       }
-      tint_store_and_preserve_padding_4(target[v_2], value_param[v_2]);
+      tint_store_and_preserve_padding_4(uint[3](target_indices[0u], target_indices[1u], v_2), value_param[v_2]);
       {
         v_1 = (v_2 + 1u);
       }
@@ -58,7 +58,7 @@
     }
   }
 }
-void tint_store_and_preserve_padding_2(inout strided_arr target[3][2], strided_arr value_param[3][2]) {
+void tint_store_and_preserve_padding_2(uint target_indices[1], strided_arr value_param[3][2]) {
   {
     uint v_3 = 0u;
     v_3 = 0u;
@@ -67,7 +67,7 @@
       if ((v_4 >= 3u)) {
         break;
       }
-      tint_store_and_preserve_padding_3(target[v_4], value_param[v_4]);
+      tint_store_and_preserve_padding_3(uint[2](target_indices[0u], v_4), value_param[v_4]);
       {
         v_3 = (v_4 + 1u);
       }
@@ -75,10 +75,10 @@
     }
   }
 }
-void tint_store_and_preserve_padding_1(inout strided_arr_1 target, strided_arr_1 value_param) {
-  tint_store_and_preserve_padding_2(target.el, value_param.el);
+void tint_store_and_preserve_padding_1(uint target_indices[1], strided_arr_1 value_param) {
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.el);
 }
-void tint_store_and_preserve_padding(inout strided_arr_1 target[4], strided_arr_1 value_param[4]) {
+void tint_store_and_preserve_padding(strided_arr_1 value_param[4]) {
   {
     uint v_5 = 0u;
     v_5 = 0u;
@@ -87,7 +87,7 @@
       if ((v_6 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_6], value_param[v_6]);
+      tint_store_and_preserve_padding_1(uint[1](v_6), value_param[v_6]);
       {
         v_5 = (v_6 + 1u);
       }
@@ -100,7 +100,7 @@
   strided_arr x_24[3][2] = v.inner.a[3].el;
   strided_arr x_28[2] = v.inner.a[3].el[2];
   float x_32 = v.inner.a[3].el[2][1].el;
-  tint_store_and_preserve_padding(v.inner.a, strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u)));
+  tint_store_and_preserve_padding(strided_arr_1[4](strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u), strided_arr_1(strided_arr[3][2](strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u)), strided_arr[2](strided_arr(0.0f, 0u), strided_arr(0.0f, 0u))), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u)));
   v.inner.a[3].el[2][1].el = 5.0f;
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.glsl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.glsl
index 7d4bac2..78b72f9 100644
--- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.glsl
@@ -38,7 +38,7 @@
 buffer S_1_ssbo {
   Inner arr[];
 } sb;
-void tint_store_and_preserve_padding_3(inout vec3 target[2], vec3 value_param[2]) {
+void tint_store_and_preserve_padding_3(uint target_indices[1], vec3 value_param[2]) {
   {
     uint v = 0u;
     v = 0u;
@@ -47,7 +47,7 @@
       if ((v_1 >= 2u)) {
         break;
       }
-      target[v_1] = value_param[v_1];
+      sb.arr[target_indices[0u]].arr2_vec3_f32[v_1] = value_param[v_1];
       {
         v = (v_1 + 1u);
       }
@@ -55,20 +55,20 @@
     }
   }
 }
-void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat4x3 value_param) {
+  sb.arr[target_indices[0u]].mat4x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat4x3_f32[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat4x3_f32[2u] = value_param[2u];
+  sb.arr[target_indices[0u]].mat4x3_f32[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], mat3 value_param) {
+  sb.arr[target_indices[0u]].mat3x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat3x3_f32[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat3x3_f32[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(uint target_indices[1], mat2x3 value_param) {
+  sb.arr[target_indices[0u]].mat2x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat2x3_f32[1u] = value_param[1u];
 }
 void tint_symbol_inner(uint idx) {
   sb.arr[idx].scalar_f32 = 0.0f;
@@ -84,15 +84,15 @@
   sb.arr[idx].vec4_i32 = ivec4(0);
   sb.arr[idx].vec4_u32 = uvec4(0u);
   sb.arr[idx].mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding(sb.arr[idx].mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding(uint[1](idx), mat2x3(vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
   sb.arr[idx].mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_1(sb.arr[idx].mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_1(uint[1](idx), mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
   sb.arr[idx].mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_2(sb.arr[idx].mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_2(uint[1](idx), mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
-  tint_store_and_preserve_padding_3(sb.arr[idx].arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_3(uint[1](idx), vec3[2](vec3(0.0f), vec3(0.0f)));
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
diff --git a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.glsl
index 7f5f141..4e67ebd 100644
--- a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.glsl
@@ -58,7 +58,7 @@
 buffer S_1_ssbo {
   Inner arr[];
 } sb;
-void tint_store_and_preserve_padding_6(inout vec3 target[2], vec3 value_param[2]) {
+void tint_store_and_preserve_padding_6(uint target_indices[1], vec3 value_param[2]) {
   {
     uint v = 0u;
     v = 0u;
@@ -67,7 +67,7 @@
       if ((v_1 >= 2u)) {
         break;
       }
-      target[v_1] = value_param[v_1];
+      sb.arr[target_indices[0u]].arr2_vec3_f32[v_1] = value_param[v_1];
       {
         v = (v_1 + 1u);
       }
@@ -75,35 +75,35 @@
     }
   }
 }
-void tint_store_and_preserve_padding_5(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_5(uint target_indices[1], f16mat4x3 value_param) {
+  sb.arr[target_indices[0u]].mat4x3_f16[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat4x3_f16[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat4x3_f16[2u] = value_param[2u];
+  sb.arr[target_indices[0u]].mat4x3_f16[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_4(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_4(uint target_indices[1], f16mat3 value_param) {
+  sb.arr[target_indices[0u]].mat3x3_f16[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat3x3_f16[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat3x3_f16[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_3(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_3(uint target_indices[1], f16mat2x3 value_param) {
+  sb.arr[target_indices[0u]].mat2x3_f16[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat2x3_f16[1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat4x3 value_param) {
+  sb.arr[target_indices[0u]].mat4x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat4x3_f32[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat4x3_f32[2u] = value_param[2u];
+  sb.arr[target_indices[0u]].mat4x3_f32[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], mat3 value_param) {
+  sb.arr[target_indices[0u]].mat3x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat3x3_f32[1u] = value_param[1u];
+  sb.arr[target_indices[0u]].mat3x3_f32[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(uint target_indices[1], mat2x3 value_param) {
+  sb.arr[target_indices[0u]].mat2x3_f32[0u] = value_param[0u];
+  sb.arr[target_indices[0u]].mat2x3_f32[1u] = value_param[1u];
 }
 void tint_symbol_inner(uint idx) {
   sb.arr[idx].scalar_f32 = 0.0f;
@@ -123,24 +123,24 @@
   sb.arr[idx].vec4_u32 = uvec4(0u);
   sb.arr[idx].vec4_f16 = f16vec4(0.0hf);
   sb.arr[idx].mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding(sb.arr[idx].mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding(uint[1](idx), mat2x3(vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
   sb.arr[idx].mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_1(sb.arr[idx].mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_1(uint[1](idx), mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
   sb.arr[idx].mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_2(sb.arr[idx].mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_2(uint[1](idx), mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
   sb.arr[idx].mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_3(sb.arr[idx].mat2x3_f16, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_3(uint[1](idx), f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
   sb.arr[idx].mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
   sb.arr[idx].mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_4(sb.arr[idx].mat3x3_f16, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_4(uint[1](idx), f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
   sb.arr[idx].mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
   sb.arr[idx].mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_5(sb.arr[idx].mat4x3_f16, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_5(uint[1](idx), f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
   sb.arr[idx].mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
-  tint_store_and_preserve_padding_6(sb.arr[idx].arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_6(uint[1](idx), vec3[2](vec3(0.0f), vec3(0.0f)));
   sb.arr[idx].arr2_mat4x2_f16 = f16mat4x2[2](f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
diff --git a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
index 63b0236..7b84cb3 100644
--- a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.glsl
@@ -47,7 +47,7 @@
 buffer sb_block_1_ssbo {
   S inner;
 } v;
-void tint_store_and_preserve_padding_3(inout vec3 target[2], vec3 value_param[2]) {
+void tint_store_and_preserve_padding_3(vec3 value_param[2]) {
   {
     uint v_1 = 0u;
     v_1 = 0u;
@@ -56,7 +56,7 @@
       if ((v_2 >= 2u)) {
         break;
       }
-      target[v_2] = value_param[v_2];
+      v.inner.arr2_vec3_f32[v_2] = value_param[v_2];
       {
         v_1 = (v_2 + 1u);
       }
@@ -64,20 +64,20 @@
     }
   }
 }
-void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(mat4x3 value_param) {
+  v.inner.mat4x3_f32[0u] = value_param[0u];
+  v.inner.mat4x3_f32[1u] = value_param[1u];
+  v.inner.mat4x3_f32[2u] = value_param[2u];
+  v.inner.mat4x3_f32[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(mat3 value_param) {
+  v.inner.mat3x3_f32[0u] = value_param[0u];
+  v.inner.mat3x3_f32[1u] = value_param[1u];
+  v.inner.mat3x3_f32[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner.mat2x3_f32[0u] = value_param[0u];
+  v.inner.mat2x3_f32[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
@@ -94,15 +94,15 @@
   v.inner.vec4_i32 = ivec4(0);
   v.inner.vec4_u32 = uvec4(0u);
   v.inner.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding(v.inner.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding(mat2x3(vec3(0.0f), vec3(0.0f)));
   v.inner.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
   v.inner.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_1(v.inner.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_1(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   v.inner.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
   v.inner.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_2(v.inner.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_2(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   v.inner.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
-  tint_store_and_preserve_padding_3(v.inner.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_3(vec3[2](vec3(0.0f), vec3(0.0f)));
   v.inner.struct_inner = Inner(0, 0.0f);
   v.inner.array_struct_inner = Inner[4](Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f), Inner(0, 0.0f));
 }
diff --git a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
index 51a7bf3..653ef62 100644
--- a/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/static_index/write_f16.wgsl.expected.ir.glsl
@@ -67,12 +67,12 @@
 buffer sb_block_1_ssbo {
   S inner;
 } v;
-void tint_store_and_preserve_padding_7(inout Inner target, Inner value_param) {
-  target.scalar_i32 = value_param.scalar_i32;
-  target.scalar_f32 = value_param.scalar_f32;
-  target.scalar_f16 = value_param.scalar_f16;
+void tint_store_and_preserve_padding_8(uint target_indices[1], Inner value_param) {
+  v.inner.array_struct_inner[target_indices[0u]].scalar_i32 = value_param.scalar_i32;
+  v.inner.array_struct_inner[target_indices[0u]].scalar_f32 = value_param.scalar_f32;
+  v.inner.array_struct_inner[target_indices[0u]].scalar_f16 = value_param.scalar_f16;
 }
-void tint_store_and_preserve_padding_8(inout Inner target[4], Inner value_param[4]) {
+void tint_store_and_preserve_padding_9(Inner value_param[4]) {
   {
     uint v_1 = 0u;
     v_1 = 0u;
@@ -81,7 +81,7 @@
       if ((v_2 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_7(target[v_2], value_param[v_2]);
+      tint_store_and_preserve_padding_8(uint[1](v_2), value_param[v_2]);
       {
         v_1 = (v_2 + 1u);
       }
@@ -89,7 +89,12 @@
     }
   }
 }
-void tint_store_and_preserve_padding_6(inout vec3 target[2], vec3 value_param[2]) {
+void tint_store_and_preserve_padding_7(Inner value_param) {
+  v.inner.struct_inner.scalar_i32 = value_param.scalar_i32;
+  v.inner.struct_inner.scalar_f32 = value_param.scalar_f32;
+  v.inner.struct_inner.scalar_f16 = value_param.scalar_f16;
+}
+void tint_store_and_preserve_padding_6(vec3 value_param[2]) {
   {
     uint v_3 = 0u;
     v_3 = 0u;
@@ -98,7 +103,7 @@
       if ((v_4 >= 2u)) {
         break;
       }
-      target[v_4] = value_param[v_4];
+      v.inner.arr2_vec3_f32[v_4] = value_param[v_4];
       {
         v_3 = (v_4 + 1u);
       }
@@ -106,35 +111,35 @@
     }
   }
 }
-void tint_store_and_preserve_padding_5(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_5(f16mat4x3 value_param) {
+  v.inner.mat4x3_f16[0u] = value_param[0u];
+  v.inner.mat4x3_f16[1u] = value_param[1u];
+  v.inner.mat4x3_f16[2u] = value_param[2u];
+  v.inner.mat4x3_f16[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_4(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_4(f16mat3 value_param) {
+  v.inner.mat3x3_f16[0u] = value_param[0u];
+  v.inner.mat3x3_f16[1u] = value_param[1u];
+  v.inner.mat3x3_f16[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_3(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_3(f16mat2x3 value_param) {
+  v.inner.mat2x3_f16[0u] = value_param[0u];
+  v.inner.mat2x3_f16[1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(mat4x3 value_param) {
+  v.inner.mat4x3_f32[0u] = value_param[0u];
+  v.inner.mat4x3_f32[1u] = value_param[1u];
+  v.inner.mat4x3_f32[2u] = value_param[2u];
+  v.inner.mat4x3_f32[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(mat3 value_param) {
+  v.inner.mat3x3_f32[0u] = value_param[0u];
+  v.inner.mat3x3_f32[1u] = value_param[1u];
+  v.inner.mat3x3_f32[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner.mat2x3_f32[0u] = value_param[0u];
+  v.inner.mat2x3_f32[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
@@ -155,25 +160,25 @@
   v.inner.vec4_u32 = uvec4(0u);
   v.inner.vec4_f16 = f16vec4(0.0hf);
   v.inner.mat2x2_f32 = mat2(vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding(v.inner.mat2x3_f32, mat2x3(vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding(mat2x3(vec3(0.0f), vec3(0.0f)));
   v.inner.mat2x4_f32 = mat2x4(vec4(0.0f), vec4(0.0f));
   v.inner.mat3x2_f32 = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_1(v.inner.mat3x3_f32, mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_1(mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   v.inner.mat3x4_f32 = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f));
   v.inner.mat4x2_f32 = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f));
-  tint_store_and_preserve_padding_2(v.inner.mat4x3_f32, mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_2(mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)));
   v.inner.mat4x4_f32 = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f));
   v.inner.mat2x2_f16 = f16mat2(f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_3(v.inner.mat2x3_f16, f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_3(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
   v.inner.mat2x4_f16 = f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf));
   v.inner.mat3x2_f16 = f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_4(v.inner.mat3x3_f16, f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_4(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
   v.inner.mat3x4_f16 = f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
   v.inner.mat4x2_f16 = f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
-  tint_store_and_preserve_padding_5(v.inner.mat4x3_f16, f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+  tint_store_and_preserve_padding_5(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
   v.inner.mat4x4_f16 = f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
-  tint_store_and_preserve_padding_6(v.inner.arr2_vec3_f32, vec3[2](vec3(0.0f), vec3(0.0f)));
+  tint_store_and_preserve_padding_6(vec3[2](vec3(0.0f), vec3(0.0f)));
   v.inner.arr2_mat4x2_f16 = f16mat4x2[2](f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)), f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
-  tint_store_and_preserve_padding_7(v.inner.struct_inner, Inner(0, 0.0f, 0.0hf));
-  tint_store_and_preserve_padding_8(v.inner.array_struct_inner, Inner[4](Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf)));
+  tint_store_and_preserve_padding_7(Inner(0, 0.0f, 0.0hf));
+  tint_store_and_preserve_padding_9(Inner[4](Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf), Inner(0, 0.0f, 0.0hf)));
 }
diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
index 4435e1f..6fe5295 100644
--- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.glsl
@@ -9,11 +9,11 @@
 buffer tint_symbol_1_block_1_ssbo {
   f16mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
index 3357d4b..5716b68 100644
--- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.glsl
@@ -8,11 +8,11 @@
 buffer tint_symbol_1_block_1_ssbo {
   mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
index b2bbf07..c2edbec 100644
--- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.glsl
@@ -9,12 +9,12 @@
 buffer tint_symbol_1_block_1_ssbo {
   f16mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
index 615f5ce..84dec3f 100644
--- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.glsl
@@ -8,12 +8,12 @@
 buffer tint_symbol_1_block_1_ssbo {
   mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
index 447b8c1..0ee4dfc 100644
--- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.glsl
@@ -9,13 +9,13 @@
 buffer tint_symbol_1_block_1_ssbo {
   f16mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
index ce919ef..4e379b0 100644
--- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.glsl
@@ -8,13 +8,13 @@
 buffer tint_symbol_1_block_1_ssbo {
   mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
+  tint_store_and_preserve_padding(v.inner);
 }
diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
index dc3bbeb..e00dbeb 100644
--- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.glsl
@@ -21,16 +21,16 @@
 buffer tint_symbol_1_block_1_ssbo {
   S inner;
 } v_1;
-void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
-  target.scalar_f16 = value_param.scalar_f16;
-  target.vec3_f16 = value_param.vec3_f16;
-  target.mat2x4_f16 = value_param.mat2x4_f16;
+void tint_store_and_preserve_padding_1(Inner value_param) {
+  v_1.inner.inner.scalar_f16 = value_param.scalar_f16;
+  v_1.inner.inner.vec3_f16 = value_param.vec3_f16;
+  v_1.inner.inner.mat2x4_f16 = value_param.mat2x4_f16;
 }
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  tint_store_and_preserve_padding_1(target.inner, value_param.inner);
+void tint_store_and_preserve_padding(S value_param) {
+  tint_store_and_preserve_padding_1(value_param.inner);
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   S t = v.inner;
-  tint_store_and_preserve_padding(v_1.inner, t);
+  tint_store_and_preserve_padding(t);
 }
diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
index 7876773..d7874a3 100644
--- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.glsl
@@ -23,16 +23,16 @@
 buffer tint_symbol_1_block_1_ssbo {
   S inner;
 } v_1;
-void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
-  target.scalar_f32 = value_param.scalar_f32;
-  target.vec3_f32 = value_param.vec3_f32;
-  target.mat2x4_f32 = value_param.mat2x4_f32;
+void tint_store_and_preserve_padding_1(Inner value_param) {
+  v_1.inner.inner.scalar_f32 = value_param.scalar_f32;
+  v_1.inner.inner.vec3_f32 = value_param.vec3_f32;
+  v_1.inner.inner.mat2x4_f32 = value_param.mat2x4_f32;
 }
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  tint_store_and_preserve_padding_1(target.inner, value_param.inner);
+void tint_store_and_preserve_padding(S value_param) {
+  tint_store_and_preserve_padding_1(value_param.inner);
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   S t = v.inner;
-  tint_store_and_preserve_padding(v_1.inner, t);
+  tint_store_and_preserve_padding(t);
 }
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
index 79ad0fe..8f8aa0e 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -15,11 +15,11 @@
 buffer s_block_1_ssbo {
   f16mat2x3 inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], f16mat2x3 value_param) {
+  v_1.inner[target_indices[0u]][0u] = value_param[0u];
+  v_1.inner[target_indices[0u]][1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding(inout f16mat2x3 target[4], f16mat2x3 value_param[4]) {
+void tint_store_and_preserve_padding(f16mat2x3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -28,7 +28,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -55,8 +55,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], f16mat2x3(v.inner[2].col0, v.inner[2].col1));
+  tint_store_and_preserve_padding(v_5);
+  f16mat2x3 v_8 = f16mat2x3(v.inner[2].col0, v.inner[2].col1);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[1][0] = v.inner[0].col1.zxy;
   v_1.inner[1][0][0u] = v.inner[0].col1.x;
 }
diff --git a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
index 4baea94..201ddb1 100644
--- a/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -16,11 +16,11 @@
 buffer s_block_1_ssbo {
   mat2x3 inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], mat2x3 value_param) {
+  v_1.inner[target_indices[0u]][0u] = value_param[0u];
+  v_1.inner[target_indices[0u]][1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding(inout mat2x3 target[4], mat2x3 value_param[4]) {
+void tint_store_and_preserve_padding(mat2x3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -29,7 +29,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -56,8 +56,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], mat2x3(v.inner[2].col0, v.inner[2].col1));
+  tint_store_and_preserve_padding(v_5);
+  mat2x3 v_8 = mat2x3(v.inner[2].col0, v.inner[2].col1);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[1][0] = v.inner[0].col1.zxy;
   v_1.inner[1][0][0u] = v.inner[0].col1.x;
 }
diff --git a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
index 550c3a1..86edab8 100644
--- a/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -18,12 +18,12 @@
 buffer s_block_1_ssbo {
   mat3 inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], mat3 value_param) {
+  v_1.inner[target_indices[0u]][0u] = value_param[0u];
+  v_1.inner[target_indices[0u]][1u] = value_param[1u];
+  v_1.inner[target_indices[0u]][2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding(inout mat3 target[4], mat3 value_param[4]) {
+void tint_store_and_preserve_padding(mat3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -32,7 +32,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -59,8 +59,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], mat3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2));
+  tint_store_and_preserve_padding(v_5);
+  mat3 v_8 = mat3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[1][0] = v.inner[0].col1.zxy;
   v_1.inner[1][0][0u] = v.inner[0].col1.x;
 }
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
index 49513a5..acb5e48 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -17,13 +17,13 @@
 buffer s_block_1_ssbo {
   f16mat4x3 inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], f16mat4x3 value_param) {
+  v_1.inner[target_indices[0u]][0u] = value_param[0u];
+  v_1.inner[target_indices[0u]][1u] = value_param[1u];
+  v_1.inner[target_indices[0u]][2u] = value_param[2u];
+  v_1.inner[target_indices[0u]][3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding(inout f16mat4x3 target[4], f16mat4x3 value_param[4]) {
+void tint_store_and_preserve_padding(f16mat4x3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -32,7 +32,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -59,8 +59,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], f16mat4x3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2, v.inner[2].col3));
+  tint_store_and_preserve_padding(v_5);
+  f16mat4x3 v_8 = f16mat4x3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2, v.inner[2].col3);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[1][0] = v.inner[0].col1.zxy;
   v_1.inner[1][0][0u] = v.inner[0].col1.x;
 }
diff --git a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
index c0fd75a..5bfa764 100644
--- a/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/array/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -20,13 +20,13 @@
 buffer s_block_1_ssbo {
   mat4x3 inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_1(uint target_indices[1], mat4x3 value_param) {
+  v_1.inner[target_indices[0u]][0u] = value_param[0u];
+  v_1.inner[target_indices[0u]][1u] = value_param[1u];
+  v_1.inner[target_indices[0u]][2u] = value_param[2u];
+  v_1.inner[target_indices[0u]][3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding(inout mat4x3 target[4], mat4x3 value_param[4]) {
+void tint_store_and_preserve_padding(mat4x3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -35,7 +35,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -62,8 +62,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], mat4x3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2, v.inner[2].col3));
+  tint_store_and_preserve_padding(v_5);
+  mat4x3 v_8 = mat4x3(v.inner[2].col0, v.inner[2].col1, v.inner[2].col2, v.inner[2].col3);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[1][0] = v.inner[0].col1.zxy;
   v_1.inner[1][0][0u] = v.inner[0].col1.x;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl
index f0faf65..efdabbf 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f16/to_storage.wgsl.expected.ir.glsl
@@ -82,12 +82,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, f16mat2(tint_input.m_col0, tint_input.m_col1), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -96,7 +96,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -123,8 +123,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat2(v.inner[2].m_col0, v.inner[2].m_col1);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl
index 998b9ba..693f200 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x2_f32/to_storage.wgsl.expected.ir.glsl
@@ -77,12 +77,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, mat2(tint_input.m_col0, tint_input.m_col1), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -91,7 +91,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -118,8 +118,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = mat2(v.inner[2].m_col0, v.inner[2].m_col1);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
index bf2d026..5c13b72 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -78,16 +78,16 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat2x3(tint_input.m_col0, tint_input.m_col1), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], f16mat2x3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -96,7 +96,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -123,8 +123,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, f16mat2x3(v.inner[2].m_col0, v.inner[2].m_col1));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  f16mat2x3 v_9 = f16mat2x3(v.inner[2].m_col0, v.inner[2].m_col1);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
index e6198e8..485baf4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -71,16 +71,16 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, 0u, 0u, mat2x3(tint_input.m_col0, tint_input.m_col1), 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat2x3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -89,7 +89,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -116,8 +116,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, mat2x3(v.inner[2].m_col0, v.inner[2].m_col1));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  mat2x3 v_9 = mat2x3(v.inner[2].m_col0, v.inner[2].m_col1);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl
index c51630b..a2c696e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f16/to_storage.wgsl.expected.ir.glsl
@@ -78,12 +78,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat2x4(tint_input.m_col0, tint_input.m_col1), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -92,7 +92,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -119,8 +119,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat2x4(v.inner[2].m_col0, v.inner[2].m_col1);
   v_1.inner[1].m[0] = v.inner[0].m_col1.ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl
index ab3506b..409c768 100644
--- a/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat2x4_f32/to_storage.wgsl.expected.ir.glsl
@@ -37,12 +37,12 @@
 buffer s_block_1_ssbo {
   S inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -51,7 +51,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -61,8 +61,9 @@
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
-  tint_store_and_preserve_padding_1(v_1.inner[1], v.inner[2]);
+  tint_store_and_preserve_padding(v.inner);
+  S v_4 = v.inner[2];
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_4);
   v_1.inner[3].m = v.inner[2].m;
   v_1.inner[1].m[0] = v.inner[0].m[1].ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl
index bbd4ce7..4662e1e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f16/to_storage.wgsl.expected.ir.glsl
@@ -81,12 +81,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, f16mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -95,7 +95,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -122,8 +122,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat3x2(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl
index 2422238..bfff5f0 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x2_f32/to_storage.wgsl.expected.ir.glsl
@@ -74,12 +74,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, mat3x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -88,7 +88,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -115,8 +115,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = mat3x2(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
index bf132e1..3ec731f 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -75,17 +75,17 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], f16mat3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
+  v_1.inner[target_indices[0u]].m[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -94,7 +94,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -121,8 +121,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, f16mat3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  f16mat3 v_9 = f16mat3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
index 354a040..8c7b653 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -65,17 +65,17 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, 0u, 0u, mat3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
+  v_1.inner[target_indices[0u]].m[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -84,7 +84,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -111,8 +111,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, mat3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  mat3 v_9 = mat3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl
index 49f1c39..8ea9c6e 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f16/to_storage.wgsl.expected.ir.glsl
@@ -75,12 +75,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat3x4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -89,7 +89,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -116,8 +116,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat3x4(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2);
   v_1.inner[1].m[0] = v.inner[0].m_col1.ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl
index 60f5014..f0279a4 100644
--- a/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat3x4_f32/to_storage.wgsl.expected.ir.glsl
@@ -33,12 +33,12 @@
 buffer s_block_1_ssbo {
   S inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -47,7 +47,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -57,8 +57,9 @@
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
-  tint_store_and_preserve_padding_1(v_1.inner[1], v.inner[2]);
+  tint_store_and_preserve_padding(v.inner);
+  S v_4 = v.inner[2];
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_4);
   v_1.inner[3].m = v.inner[2].m;
   v_1.inner[1].m[0] = v.inner[0].m[1].ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl
index 7842a1b..68d6765 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f16/to_storage.wgsl.expected.ir.glsl
@@ -80,12 +80,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, f16mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -94,7 +94,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -121,8 +121,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat4x2(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl
index b25fdab..5004795 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x2_f32/to_storage.wgsl.expected.ir.glsl
@@ -71,12 +71,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, mat4x2(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -85,7 +85,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -112,8 +112,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = mat4x2(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3);
   v_1.inner[1].m[0] = v.inner[0].m_col1.yx;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
index 336d07e..4739065 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -72,18 +72,18 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], f16mat4x3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
+  v_1.inner[target_indices[0u]].m[2u] = value_param[2u];
+  v_1.inner[target_indices[0u]].m[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -92,7 +92,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -119,8 +119,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, f16mat4x3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  f16mat4x3 v_9 = f16mat4x3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
index 603426d..66fe932 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -91,18 +91,18 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, 0u, 0u, mat4x3(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_2(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat4x3 value_param) {
+  v_1.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_1.inner[target_indices[0u]].m[1u] = value_param[1u];
+  v_1.inner[target_indices[0u]].m[2u] = value_param[2u];
+  v_1.inner[target_indices[0u]].m[3u] = value_param[3u];
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  tint_store_and_preserve_padding_2(target.m, value_param.m);
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -111,7 +111,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -138,8 +138,10 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
-  tint_store_and_preserve_padding_2(v_1.inner[3].m, mat4x3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
+  mat4x3 v_9 = mat4x3(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3);
+  tint_store_and_preserve_padding_2(uint[1](uint(3)), v_9);
   v_1.inner[1].m[0] = v.inner[0].m_col1.zxy;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl
index e71033b..bcc8f78 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f16/to_storage.wgsl.expected.ir.glsl
@@ -72,12 +72,12 @@
 S tint_convert_S(S_std140 tint_input) {
   return S(tint_input.before, 0u, f16mat4(tint_input.m_col0, tint_input.m_col1, tint_input.m_col2, tint_input.m_col3), 0u, 0u, 0u, 0u, 0u, 0u, tint_input.after, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u);
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -86,7 +86,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -113,8 +113,9 @@
       continue;
     }
   }
-  tint_store_and_preserve_padding(v_1.inner, v_5);
-  tint_store_and_preserve_padding_1(v_1.inner[1], tint_convert_S(v.inner[2]));
+  tint_store_and_preserve_padding(v_5);
+  S v_8 = tint_convert_S(v.inner[2]);
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_8);
   v_1.inner[3].m = f16mat4(v.inner[2].m_col0, v.inner[2].m_col1, v.inner[2].m_col2, v.inner[2].m_col3);
   v_1.inner[1].m[0] = v.inner[0].m_col1.ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl
index 605db75..7fff012 100644
--- a/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/struct/mat4x4_f32/to_storage.wgsl.expected.ir.glsl
@@ -45,12 +45,12 @@
 buffer s_block_1_ssbo {
   S inner[4];
 } v_1;
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  target.before = value_param.before;
-  target.m = value_param.m;
-  target.after = value_param.after;
+void tint_store_and_preserve_padding_1(uint target_indices[1], S value_param) {
+  v_1.inner[target_indices[0u]].before = value_param.before;
+  v_1.inner[target_indices[0u]].m = value_param.m;
+  v_1.inner[target_indices[0u]].after = value_param.after;
 }
-void tint_store_and_preserve_padding(inout S target[4], S value_param[4]) {
+void tint_store_and_preserve_padding(S value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -59,7 +59,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -69,8 +69,9 @@
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, v.inner);
-  tint_store_and_preserve_padding_1(v_1.inner[1], v.inner[2]);
+  tint_store_and_preserve_padding(v.inner);
+  S v_4 = v.inner[2];
+  tint_store_and_preserve_padding_1(uint[1](uint(1)), v_4);
   v_1.inner[3].m = v.inner[2].m;
   v_1.inner[1].m[0] = v.inner[0].m[1].ywxz;
 }
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
index 2221b76..0d9577c 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -10,13 +10,13 @@
 buffer s_block_1_ssbo {
   f16mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, f16mat2x3(v.inner_col0, v.inner_col1));
+  tint_store_and_preserve_padding(f16mat2x3(v.inner_col0, v.inner_col1));
   v_1.inner[1] = f16mat2x3(v.inner_col0, v.inner_col1)[0];
   v_1.inner[1] = f16mat2x3(v.inner_col0, v.inner_col1)[0].zxy;
   v_1.inner[0][1] = f16mat2x3(v.inner_col0, v.inner_col1)[1][0];
diff --git a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
index 1421c15..9ea8a1a 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat2x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -10,13 +10,13 @@
 buffer s_block_1_ssbo {
   mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, mat2x3(v.inner_col0, v.inner_col1));
+  tint_store_and_preserve_padding(mat2x3(v.inner_col0, v.inner_col1));
   v_1.inner[1] = mat2x3(v.inner_col0, v.inner_col1)[0];
   v_1.inner[1] = mat2x3(v.inner_col0, v.inner_col1)[0].zxy;
   v_1.inner[0][1] = mat2x3(v.inner_col0, v.inner_col1)[1][0];
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
index dbeda96..e96c14f 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -11,14 +11,14 @@
 buffer s_block_1_ssbo {
   f16mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, f16mat3(v.inner_col0, v.inner_col1, v.inner_col2));
+  tint_store_and_preserve_padding(f16mat3(v.inner_col0, v.inner_col1, v.inner_col2));
   v_1.inner[1] = f16mat3(v.inner_col0, v.inner_col1, v.inner_col2)[0];
   v_1.inner[1] = f16mat3(v.inner_col0, v.inner_col1, v.inner_col2)[0].zxy;
   v_1.inner[0][1] = f16mat3(v.inner_col0, v.inner_col1, v.inner_col2)[1][0];
diff --git a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
index 481832b..1c008cf 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat3x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -12,14 +12,14 @@
 buffer s_block_1_ssbo {
   mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, mat3(v.inner_col0, v.inner_col1, v.inner_col2));
+  tint_store_and_preserve_padding(mat3(v.inner_col0, v.inner_col1, v.inner_col2));
   v_1.inner[1] = mat3(v.inner_col0, v.inner_col1, v.inner_col2)[0];
   v_1.inner[1] = mat3(v.inner_col0, v.inner_col1, v.inner_col2)[0].zxy;
   v_1.inner[0][1] = mat3(v.inner_col0, v.inner_col1, v.inner_col2)[1][0];
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
index b7a4176..70242ec 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f16/to_storage.wgsl.expected.ir.glsl
@@ -12,15 +12,15 @@
 buffer s_block_1_ssbo {
   f16mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3));
+  tint_store_and_preserve_padding(f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3));
   v_1.inner[1] = f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[0];
   v_1.inner[1] = f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[0].zxy;
   v_1.inner[0][1] = f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[1][0];
diff --git a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
index 00b647e..b3f0149 100644
--- a/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/std140/unnested/mat4x3_f32/to_storage.wgsl.expected.ir.glsl
@@ -14,15 +14,15 @@
 buffer s_block_1_ssbo {
   mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3));
+  tint_store_and_preserve_padding(mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3));
   v_1.inner[1] = mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[0];
   v_1.inner[1] = mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[0].zxy;
   v_1.inner[0][1] = mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3)[1][0];
diff --git a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
index 1ac3011..e0a7ad2 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.glsl
@@ -10,12 +10,12 @@
 buffer s_block_1_ssbo {
   f16mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat2x3 x = f16mat2x3(v.inner_col0, v.inner_col1);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
index 222aa1e..6aed01e 100644
--- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.glsl
@@ -10,12 +10,12 @@
 buffer s_block_1_ssbo {
   mat2x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat2x3 x = mat2x3(v.inner_col0, v.inner_col1);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
index b45a198..eeca8f4 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.glsl
@@ -11,13 +11,13 @@
 buffer s_block_1_ssbo {
   f16mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat3 x = f16mat3(v.inner_col0, v.inner_col1, v.inner_col2);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
index 785b42b..5c3038e 100644
--- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.glsl
@@ -12,13 +12,13 @@
 buffer s_block_1_ssbo {
   mat3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat3 x = mat3(v.inner_col0, v.inner_col1, v.inner_col2);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
index dcbbdf5..3b00de5 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.glsl
@@ -12,14 +12,14 @@
 buffer s_block_1_ssbo {
   f16mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat4x3 x = f16mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
index a5c36d6..daf5af48 100644
--- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.glsl
@@ -14,14 +14,14 @@
 buffer s_block_1_ssbo {
   mat4x3 inner;
 } v_1;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v_1.inner[0u] = value_param[0u];
+  v_1.inner[1u] = value_param[1u];
+  v_1.inner[2u] = value_param[2u];
+  v_1.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat4x3 x = mat4x3(v.inner_col0, v.inner_col1, v.inner_col2, v.inner_col3);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
index dc5cc85..f26b2b6 100644
--- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.glsl
@@ -33,13 +33,13 @@
 buffer s_block_1_ssbo {
   S inner;
 } v_1;
-void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
-  target.scalar_f16 = value_param.scalar_f16;
-  target.vec3_f16 = value_param.vec3_f16;
-  target.mat2x4_f16 = value_param.mat2x4_f16;
+void tint_store_and_preserve_padding_1(Inner value_param) {
+  v_1.inner.inner.scalar_f16 = value_param.scalar_f16;
+  v_1.inner.inner.vec3_f16 = value_param.vec3_f16;
+  v_1.inner.inner.mat2x4_f16 = value_param.mat2x4_f16;
 }
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  tint_store_and_preserve_padding_1(target.inner, value_param.inner);
+void tint_store_and_preserve_padding(S value_param) {
+  tint_store_and_preserve_padding_1(value_param.inner);
 }
 Inner tint_convert_Inner(Inner_std140 tint_input) {
   return Inner(tint_input.scalar_f16, 0u, tint_input.vec3_f16, f16mat2x4(tint_input.mat2x4_f16_col0, tint_input.mat2x4_f16_col1));
@@ -50,5 +50,5 @@
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   S x = tint_convert_S(v.inner);
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
index 31fb117..9b90bb5 100644
--- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
+++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.glsl
@@ -23,16 +23,16 @@
 buffer s_block_1_ssbo {
   S inner;
 } v_1;
-void tint_store_and_preserve_padding_1(inout Inner target, Inner value_param) {
-  target.scalar_f32 = value_param.scalar_f32;
-  target.vec3_f32 = value_param.vec3_f32;
-  target.mat2x4_f32 = value_param.mat2x4_f32;
+void tint_store_and_preserve_padding_1(Inner value_param) {
+  v_1.inner.inner.scalar_f32 = value_param.scalar_f32;
+  v_1.inner.inner.vec3_f32 = value_param.vec3_f32;
+  v_1.inner.inner.mat2x4_f32 = value_param.mat2x4_f32;
 }
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  tint_store_and_preserve_padding_1(target.inner, value_param.inner);
+void tint_store_and_preserve_padding(S value_param) {
+  tint_store_and_preserve_padding_1(value_param.inner);
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   S x = v.inner;
-  tint_store_and_preserve_padding(v_1.inner, x);
+  tint_store_and_preserve_padding(x);
 }
diff --git a/test/tint/bug/chromium/1434271.wgsl.expected.ir.glsl b/test/tint/bug/chromium/1434271.wgsl.expected.ir.glsl
index 2a80028..4760c94 100644
--- a/test/tint/bug/chromium/1434271.wgsl.expected.ir.glsl
+++ b/test/tint/bug/chromium/1434271.wgsl.expected.ir.glsl
@@ -118,11 +118,11 @@
 buffer Particles_1_ssbo {
   Particle particles[];
 } data;
-void tint_store_and_preserve_padding(inout Particle target, Particle value_param) {
-  target.position = value_param.position;
-  target.lifetime = value_param.lifetime;
-  target.color = value_param.color;
-  target.velocity = value_param.velocity;
+void tint_store_and_preserve_padding(uint target_indices[1], Particle value_param) {
+  data.particles[target_indices[0u]].position = value_param.position;
+  data.particles[target_indices[0u]].lifetime = value_param.lifetime;
+  data.particles[target_indices[0u]].color = value_param.color;
+  data.particles[target_indices[0u]].velocity = value_param.velocity;
 }
 void simulate_inner(uvec3 GlobalInvocationID) {
   vec2 v_1 = v.inner.seed.xy;
@@ -130,7 +130,8 @@
   rand_seed = (v_2 * v.inner.seed.zw);
   uint idx = GlobalInvocationID[0u];
   Particle particle = data.particles[idx];
-  tint_store_and_preserve_padding(data.particles[idx], particle);
+  Particle v_3 = particle;
+  tint_store_and_preserve_padding(uint[1](idx), v_3);
 }
 layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
 void main() {
diff --git a/test/tint/bug/tint/2059.wgsl.expected.ir.glsl b/test/tint/bug/tint/2059.wgsl.expected.ir.glsl
index 5b26b30..f24c636 100644
--- a/test/tint/bug/tint/2059.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/2059.wgsl.expected.ir.glsl
@@ -49,12 +49,12 @@
 buffer buffer7_block_1_ssbo {
   S2 inner[1];
 } v_7;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding_1(uint target_indices[2], mat3 value_param) {
+  v_7.inner[target_indices[0u]].m[target_indices[1u]][0u] = value_param[0u];
+  v_7.inner[target_indices[0u]].m[target_indices[1u]][1u] = value_param[1u];
+  v_7.inner[target_indices[0u]].m[target_indices[1u]][2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_3(inout mat3 target[1], mat3 value_param[1]) {
+void tint_store_and_preserve_padding_15(uint target_indices[1], mat3 value_param[1]) {
   {
     uint v_8 = 0u;
     v_8 = 0u;
@@ -63,7 +63,7 @@
       if ((v_9 >= 1u)) {
         break;
       }
-      tint_store_and_preserve_padding(target[v_9], value_param[v_9]);
+      tint_store_and_preserve_padding_1(uint[2](target_indices[0u], v_9), value_param[v_9]);
       {
         v_8 = (v_9 + 1u);
       }
@@ -71,10 +71,10 @@
     }
   }
 }
-void tint_store_and_preserve_padding_2(inout S2 target, S2 value_param) {
-  tint_store_and_preserve_padding_3(target.m, value_param.m);
+void tint_store_and_preserve_padding_13(uint target_indices[1], S2 value_param) {
+  tint_store_and_preserve_padding_15(uint[1](target_indices[0u]), value_param.m);
 }
-void tint_store_and_preserve_padding_7(inout S2 target[1], S2 value_param[1]) {
+void tint_store_and_preserve_padding_21(S2 value_param[1]) {
   {
     uint v_10 = 0u;
     v_10 = 0u;
@@ -83,7 +83,7 @@
       if ((v_11 >= 1u)) {
         break;
       }
-      tint_store_and_preserve_padding_2(target[v_11], value_param[v_11]);
+      tint_store_and_preserve_padding_13(uint[1](v_11), value_param[v_11]);
       {
         v_10 = (v_11 + 1u);
       }
@@ -91,10 +91,15 @@
     }
   }
 }
-void tint_store_and_preserve_padding_1(inout S target, S value_param) {
-  tint_store_and_preserve_padding(target.m, value_param.m);
+void tint_store_and_preserve_padding_2(uint target_indices[1], mat3 value_param) {
+  v_6.inner[target_indices[0u]].m[0u] = value_param[0u];
+  v_6.inner[target_indices[0u]].m[1u] = value_param[1u];
+  v_6.inner[target_indices[0u]].m[2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_6(inout S target[1], S value_param[1]) {
+void tint_store_and_preserve_padding_9(uint target_indices[1], S value_param) {
+  tint_store_and_preserve_padding_2(uint[1](target_indices[0u]), value_param.m);
+}
+void tint_store_and_preserve_padding_19(S value_param[1]) {
   {
     uint v_12 = 0u;
     v_12 = 0u;
@@ -103,7 +108,7 @@
       if ((v_13 >= 1u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_13], value_param[v_13]);
+      tint_store_and_preserve_padding_9(uint[1](v_13), value_param[v_13]);
       {
         v_12 = (v_13 + 1u);
       }
@@ -111,11 +116,104 @@
     }
   }
 }
-void tint_store_and_preserve_padding_5(inout S4 target, S4 value_param) {
-  tint_store_and_preserve_padding_6(target.s, value_param.s);
+void tint_store_and_preserve_padding_3(uint target_indices[1], mat3 value_param) {
+  v_5.inner[target_indices[0u]][0u] = value_param[0u];
+  v_5.inner[target_indices[0u]][1u] = value_param[1u];
+  v_5.inner[target_indices[0u]][2u] = value_param[2u];
 }
-void tint_store_and_preserve_padding_4(inout S3 target, S3 value_param) {
-  tint_store_and_preserve_padding_1(target.s, value_param.s);
+void tint_store_and_preserve_padding_14(mat3 value_param[1]) {
+  {
+    uint v_14 = 0u;
+    v_14 = 0u;
+    while(true) {
+      uint v_15 = v_14;
+      if ((v_15 >= 1u)) {
+        break;
+      }
+      tint_store_and_preserve_padding_3(uint[1](v_15), value_param[v_15]);
+      {
+        v_14 = (v_15 + 1u);
+      }
+      continue;
+    }
+  }
+}
+void tint_store_and_preserve_padding_4(uint target_indices[1], mat3 value_param) {
+  v_4.inner.s[target_indices[0u]].m[0u] = value_param[0u];
+  v_4.inner.s[target_indices[0u]].m[1u] = value_param[1u];
+  v_4.inner.s[target_indices[0u]].m[2u] = value_param[2u];
+}
+void tint_store_and_preserve_padding_10(uint target_indices[1], S value_param) {
+  tint_store_and_preserve_padding_4(uint[1](target_indices[0u]), value_param.m);
+}
+void tint_store_and_preserve_padding_20(S value_param[1]) {
+  {
+    uint v_16 = 0u;
+    v_16 = 0u;
+    while(true) {
+      uint v_17 = v_16;
+      if ((v_17 >= 1u)) {
+        break;
+      }
+      tint_store_and_preserve_padding_10(uint[1](v_17), value_param[v_17]);
+      {
+        v_16 = (v_17 + 1u);
+      }
+      continue;
+    }
+  }
+}
+void tint_store_and_preserve_padding_18(S4 value_param) {
+  tint_store_and_preserve_padding_20(value_param.s);
+}
+void tint_store_and_preserve_padding_5(mat3 value_param) {
+  v_3.inner.s.m[0u] = value_param[0u];
+  v_3.inner.s.m[1u] = value_param[1u];
+  v_3.inner.s.m[2u] = value_param[2u];
+}
+void tint_store_and_preserve_padding_11(S value_param) {
+  tint_store_and_preserve_padding_5(value_param.m);
+}
+void tint_store_and_preserve_padding_17(S3 value_param) {
+  tint_store_and_preserve_padding_11(value_param.s);
+}
+void tint_store_and_preserve_padding_6(uint target_indices[1], mat3 value_param) {
+  v_2.inner.m[target_indices[0u]][0u] = value_param[0u];
+  v_2.inner.m[target_indices[0u]][1u] = value_param[1u];
+  v_2.inner.m[target_indices[0u]][2u] = value_param[2u];
+}
+void tint_store_and_preserve_padding_16(mat3 value_param[1]) {
+  {
+    uint v_18 = 0u;
+    v_18 = 0u;
+    while(true) {
+      uint v_19 = v_18;
+      if ((v_19 >= 1u)) {
+        break;
+      }
+      tint_store_and_preserve_padding_6(uint[1](v_19), value_param[v_19]);
+      {
+        v_18 = (v_19 + 1u);
+      }
+      continue;
+    }
+  }
+}
+void tint_store_and_preserve_padding_12(S2 value_param) {
+  tint_store_and_preserve_padding_16(value_param.m);
+}
+void tint_store_and_preserve_padding_7(mat3 value_param) {
+  v_1.inner.m[0u] = value_param[0u];
+  v_1.inner.m[1u] = value_param[1u];
+  v_1.inner.m[2u] = value_param[2u];
+}
+void tint_store_and_preserve_padding_8(S value_param) {
+  tint_store_and_preserve_padding_7(value_param.m);
+}
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
@@ -127,10 +225,10 @@
       } else {
         break;
       }
-      uint v_14 = c;
-      float v_15 = float(((c * 3u) + 1u));
-      float v_16 = float(((c * 3u) + 2u));
-      m[v_14] = vec3(v_15, v_16, float(((c * 3u) + 3u)));
+      uint v_20 = c;
+      float v_21 = float(((c * 3u) + 1u));
+      float v_22 = float(((c * 3u) + 2u));
+      m[v_20] = vec3(v_21, v_22, float(((c * 3u) + 3u)));
       {
         c = (c + 1u);
       }
@@ -138,19 +236,19 @@
     }
   }
   mat3 a = m;
-  tint_store_and_preserve_padding(v.inner, a);
+  tint_store_and_preserve_padding(a);
   S a_1 = S(m);
-  tint_store_and_preserve_padding_1(v_1.inner, a_1);
+  tint_store_and_preserve_padding_8(a_1);
   S2 a_2 = S2(mat3[1](m));
-  tint_store_and_preserve_padding_2(v_2.inner, a_2);
+  tint_store_and_preserve_padding_12(a_2);
   S3 a_3 = S3(S(m));
-  tint_store_and_preserve_padding_4(v_3.inner, a_3);
+  tint_store_and_preserve_padding_17(a_3);
   S4 a_4 = S4(S[1](S(m)));
-  tint_store_and_preserve_padding_5(v_4.inner, a_4);
+  tint_store_and_preserve_padding_18(a_4);
   mat3 a_5[1] = mat3[1](m);
-  tint_store_and_preserve_padding_3(v_5.inner, a_5);
+  tint_store_and_preserve_padding_14(a_5);
   S a_6[1] = S[1](S(m));
-  tint_store_and_preserve_padding_6(v_6.inner, a_6);
+  tint_store_and_preserve_padding_19(a_6);
   S2 a_7[1] = S2[1](S2(mat3[1](m)));
-  tint_store_and_preserve_padding_7(v_7.inner, a_7);
+  tint_store_and_preserve_padding_21(a_7);
 }
diff --git a/test/tint/bug/tint/366037039.wgsl.expected.ir.glsl b/test/tint/bug/tint/366037039.wgsl.expected.ir.glsl
index bed67b0..d72aed7 100644
--- a/test/tint/bug/tint/366037039.wgsl.expected.ir.glsl
+++ b/test/tint/bug/tint/366037039.wgsl.expected.ir.glsl
@@ -16,7 +16,7 @@
   S inner;
 } v_1;
 shared S wbuffer;
-void tint_store_and_preserve_padding_1(inout uvec3 target[4], uvec3 value_param[4]) {
+void tint_store_and_preserve_padding_1(uvec3 value_param[4]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -25,7 +25,7 @@
       if ((v_3 >= 4u)) {
         break;
       }
-      target[v_3] = value_param[v_3];
+      v_1.inner.c[v_3] = value_param[v_3];
       {
         v_2 = (v_3 + 1u);
       }
@@ -33,16 +33,16 @@
     }
   }
 }
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  target.a = value_param.a;
-  target.b = value_param.b;
-  tint_store_and_preserve_padding_1(target.c, value_param.c);
+void tint_store_and_preserve_padding(S value_param) {
+  v_1.inner.a = value_param.a;
+  v_1.inner.b = value_param.b;
+  tint_store_and_preserve_padding_1(value_param.c);
 }
 void foo() {
   S u = v.inner;
   S s = v_1.inner;
   S w = v_1.inner;
-  tint_store_and_preserve_padding(v_1.inner, S(uvec3(0u), 0u, uvec3[4](uvec3(0u), uvec3(0u), uvec3(0u), uvec3(0u))));
+  tint_store_and_preserve_padding(S(uvec3(0u), 0u, uvec3[4](uvec3(0u), uvec3(0u), uvec3(0u), uvec3(0u))));
   wbuffer = S(uvec3(0u), 0u, uvec3[4](uvec3(0u), uvec3(0u), uvec3(0u), uvec3(0u)));
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
index 6002c72..5369576 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat2x3(m));
+  tint_store_and_preserve_padding(f16mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
index 5a713b0..54131f3 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat2x3(m));
+  tint_store_and_preserve_padding(mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 8634c6f..8b5ea10 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index 8eca207..c5a2707 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 8634c6f..8b5ea10 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index 8eca207..c5a2707 100644
--- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
index 6002c72..5369576 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat2x3(m));
+  tint_store_and_preserve_padding(f16mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
index 5a713b0..54131f3 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat2x3(m));
+  tint_store_and_preserve_padding(mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index c582356..8a72d34 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -4,11 +4,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
+  tint_store_and_preserve_padding(mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 8634c6f..8b5ea10 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index 8eca207..c5a2707 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index c582356..8a72d34 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -4,11 +4,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
+  tint_store_and_preserve_padding(mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 8634c6f..8b5ea10 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index 8eca207..c5a2707 100644
--- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
index 34555ed..a6a8aad 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f16.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat2x3 m = f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf));
-  tint_store_and_preserve_padding(v.inner, f16mat2x3(m));
+  tint_store_and_preserve_padding(f16mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
index 38c2c16..5e6ab24 100644
--- a/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/load/f32.wgsl.expected.ir.glsl
@@ -4,12 +4,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat2x3 m = mat2x3(vec3(0.0f), vec3(0.0f));
-  tint_store_and_preserve_padding(v.inner, mat2x3(m));
+  tint_store_and_preserve_padding(mat2x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
index 3ccdf91..5c03fcc 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f16.wgsl.expected.ir.glsl
@@ -6,11 +6,11 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat2x3 target, f16mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(f16mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
index d4e961b..e12c68e 100644
--- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.ir.glsl
@@ -5,11 +5,11 @@
 buffer tint_symbol_block_1_ssbo {
   mat2x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat2x3 target, mat2x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
+void tint_store_and_preserve_padding(mat2x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
index 32c09f7..b118b17 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat3(m));
+  tint_store_and_preserve_padding(f16mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
index 54031d0..0d5aa0b 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat3(m));
+  tint_store_and_preserve_padding(mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 1f9b134..7947269 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index 4aa07f8..c03d326 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 1f9b134..7947269 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index 4aa07f8..c03d326 100644
--- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
index 32c09f7..b118b17 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat3(m));
+  tint_store_and_preserve_padding(f16mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
index 54031d0..0d5aa0b 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat3(m));
+  tint_store_and_preserve_padding(mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 6a86f3d..96b2f23 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -4,12 +4,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
+  tint_store_and_preserve_padding(mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 1f9b134..7947269 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index 4aa07f8..c03d326 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 6a86f3d..96b2f23 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -4,12 +4,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
+  tint_store_and_preserve_padding(mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 1f9b134..7947269 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index 4aa07f8..c03d326 100644
--- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
index f72a3e5..0e04ddf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f16.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat3 m = f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
-  tint_store_and_preserve_padding(v.inner, f16mat3(m));
+  tint_store_and_preserve_padding(f16mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
index edf44eb..348a4ff 100644
--- a/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/load/f32.wgsl.expected.ir.glsl
@@ -4,13 +4,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f));
-  tint_store_and_preserve_padding(v.inner, mat3(m));
+  tint_store_and_preserve_padding(mat3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
index e932fcb..5a3abef 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f16.wgsl.expected.ir.glsl
@@ -6,12 +6,12 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat3 target, f16mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(f16mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
index 5d6203e..36b9edf 100644
--- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.ir.glsl
@@ -5,12 +5,12 @@
 buffer tint_symbol_block_1_ssbo {
   mat3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat3 target, mat3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
+void tint_store_and_preserve_padding(mat3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
index 0b24675..fd0d118 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat4x3(m));
+  tint_store_and_preserve_padding(f16mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
index 90fbc54..7beb3b8 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat4x3(m));
+  tint_store_and_preserve_padding(mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
index 2a96d5c..45af429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
index f488605..2e921ef 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
index 2a96d5c..45af429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
index f488605..2e921ef 100644
--- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
index 0b24675..fd0d118 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, f16mat4x3(m));
+  tint_store_and_preserve_padding(f16mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
index 90fbc54..7beb3b8 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat4x3(m));
+  tint_store_and_preserve_padding(mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
index 2d6f0d3..7f9a1ba 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.ir.glsl
@@ -4,13 +4,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
+  tint_store_and_preserve_padding(mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
index 2a96d5c..45af429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
index f488605..2e921ef 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
index 2d6f0d3..7f9a1ba 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.ir.glsl
@@ -4,13 +4,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
+  tint_store_and_preserve_padding(mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
index 2a96d5c..45af429 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
index f488605..2e921ef 100644
--- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
index bab5fa3..32c8241 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f16.wgsl.expected.ir.glsl
@@ -5,14 +5,14 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   f16mat4x3 m = f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
-  tint_store_and_preserve_padding(v.inner, f16mat4x3(m));
+  tint_store_and_preserve_padding(f16mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
index ee0c4b3..6afb390 100644
--- a/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/load/f32.wgsl.expected.ir.glsl
@@ -4,14 +4,14 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
   mat4x3 m = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f));
-  tint_store_and_preserve_padding(v.inner, mat4x3(m));
+  tint_store_and_preserve_padding(mat4x3(m));
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
index 617d98e..8b9f710 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f16.wgsl.expected.ir.glsl
@@ -6,13 +6,13 @@
 buffer tint_symbol_block_1_ssbo {
   f16mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout f16mat4x3 target, f16mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(f16mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
index d5e10c4..96cf742 100644
--- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
+++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.ir.glsl
@@ -5,13 +5,13 @@
 buffer tint_symbol_block_1_ssbo {
   mat4x3 inner;
 } v;
-void tint_store_and_preserve_padding(inout mat4x3 target, mat4x3 value_param) {
-  target[0u] = value_param[0u];
-  target[1u] = value_param[1u];
-  target[2u] = value_param[2u];
-  target[3u] = value_param[3u];
+void tint_store_and_preserve_padding(mat4x3 value_param) {
+  v.inner[0u] = value_param[0u];
+  v.inner[1u] = value_param[1u];
+  v.inner[2u] = value_param[2u];
+  v.inner[3u] = value_param[3u];
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
-  tint_store_and_preserve_padding(v.inner, m);
+  tint_store_and_preserve_padding(m);
 }
diff --git a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
index 4cd0453..5b2480e 100644
--- a/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
+++ b/test/tint/layout/storage/mat2x2/stride/16.spvasm.expected.ir.glsl
@@ -22,10 +22,10 @@
 mat2 arr_to_mat2x2_stride_16(strided_arr arr[2]) {
   return mat2(arr[0u].el, arr[1u].el);
 }
-void tint_store_and_preserve_padding_1(inout strided_arr target, strided_arr value_param) {
-  target.el = value_param.el;
+void tint_store_and_preserve_padding_1(uint target_indices[1], strided_arr value_param) {
+  v.inner.m[target_indices[0u]].el = value_param.el;
 }
-void tint_store_and_preserve_padding(inout strided_arr target[2], strided_arr value_param[2]) {
+void tint_store_and_preserve_padding(strided_arr value_param[2]) {
   {
     uint v_2 = 0u;
     v_2 = 0u;
@@ -34,7 +34,7 @@
       if ((v_3 >= 2u)) {
         break;
       }
-      tint_store_and_preserve_padding_1(target[v_3], value_param[v_3]);
+      tint_store_and_preserve_padding_1(uint[1](v_3), value_param[v_3]);
       {
         v_2 = (v_3 + 1u);
       }
@@ -43,7 +43,7 @@
   }
 }
 void f_1() {
-  tint_store_and_preserve_padding(v.inner.m, mat2x2_stride_16_to_arr(arr_to_mat2x2_stride_16(v.inner.m)));
+  tint_store_and_preserve_padding(mat2x2_stride_16_to_arr(arr_to_mat2x2_stride_16(v.inner.m)));
 }
 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
 void main() {
diff --git a/test/tint/types/functions/shader_io/attributes_on_struct_not_used_for_interface.wgsl.expected.ir.glsl b/test/tint/types/functions/shader_io/attributes_on_struct_not_used_for_interface.wgsl.expected.ir.glsl
index 561d875..9f62366 100644
--- a/test/tint/types/functions/shader_io/attributes_on_struct_not_used_for_interface.wgsl.expected.ir.glsl
+++ b/test/tint/types/functions/shader_io/attributes_on_struct_not_used_for_interface.wgsl.expected.ir.glsl
@@ -71,11 +71,11 @@
 buffer tint_symbol_block_1_ssbo {
   S inner;
 } v_1;
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  target.f = value_param.f;
-  target.u = value_param.u;
-  target.v = value_param.v;
+void tint_store_and_preserve_padding(S value_param) {
+  v_1.inner.f = value_param.f;
+  v_1.inner.u = value_param.u;
+  v_1.inner.v = value_param.v;
 }
 void main() {
-  tint_store_and_preserve_padding(v_1.inner, S(1.0f, 2u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, vec4(3.0f), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));
+  tint_store_and_preserve_padding(S(1.0f, 2u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, vec4(3.0f), 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));
 }
diff --git a/test/tint/types/functions/shader_io/shared_struct_storage_buffer.wgsl.expected.ir.glsl b/test/tint/types/functions/shader_io/shared_struct_storage_buffer.wgsl.expected.ir.glsl
index 1f19288..358ea81 100644
--- a/test/tint/types/functions/shader_io/shared_struct_storage_buffer.wgsl.expected.ir.glsl
+++ b/test/tint/types/functions/shader_io/shared_struct_storage_buffer.wgsl.expected.ir.glsl
@@ -73,16 +73,16 @@
 } v_1;
 layout(location = 0) in float frag_main_loc0_Input;
 layout(location = 1) flat in uint frag_main_loc1_Input;
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  target.f = value_param.f;
-  target.u = value_param.u;
-  target.v = value_param.v;
+void tint_store_and_preserve_padding(S value_param) {
+  v_1.inner.f = value_param.f;
+  v_1.inner.u = value_param.u;
+  v_1.inner.v = value_param.v;
 }
 void frag_main_inner(S tint_symbol_1) {
   float f = tint_symbol_1.f;
   uint u = tint_symbol_1.u;
   vec4 v = tint_symbol_1.v;
-  tint_store_and_preserve_padding(v_1.inner, tint_symbol_1);
+  tint_store_and_preserve_padding(tint_symbol_1);
 }
 void main() {
   frag_main_inner(S(frag_main_loc0_Input, frag_main_loc1_Input, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, gl_FragCoord, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));
diff --git a/test/tint/types/functions/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.ir.glsl b/test/tint/types/functions/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.ir.glsl
index 177c31a..6c2f56f 100644
--- a/test/tint/types/functions/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.ir.glsl
+++ b/test/tint/types/functions/shader_io/shared_struct_storage_buffer_f16.wgsl.expected.ir.glsl
@@ -75,12 +75,12 @@
 layout(location = 1) flat in uint frag_main_loc1_Input;
 layout(location = 2) in float16_t frag_main_loc2_Input;
 layout(location = 3) in f16vec3 frag_main_loc3_Input;
-void tint_store_and_preserve_padding(inout S target, S value_param) {
-  target.f = value_param.f;
-  target.u = value_param.u;
-  target.v = value_param.v;
-  target.x = value_param.x;
-  target.y = value_param.y;
+void tint_store_and_preserve_padding(S value_param) {
+  v_1.inner.f = value_param.f;
+  v_1.inner.u = value_param.u;
+  v_1.inner.v = value_param.v;
+  v_1.inner.x = value_param.x;
+  v_1.inner.y = value_param.y;
 }
 void frag_main_inner(S tint_symbol_1) {
   float f = tint_symbol_1.f;
@@ -88,7 +88,7 @@
   vec4 v = tint_symbol_1.v;
   float16_t x = tint_symbol_1.x;
   f16vec3 y = tint_symbol_1.y;
-  tint_store_and_preserve_padding(v_1.inner, tint_symbol_1);
+  tint_store_and_preserve_padding(tint_symbol_1);
 }
 void main() {
   frag_main_inner(S(frag_main_loc0_Input, frag_main_loc1_Input, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, gl_FragCoord, 0u, 0u, 0u, 0u, frag_main_loc2_Input, 0u, 0u, 0u, 0u, 0u, 0u, 0u, frag_main_loc3_Input, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u, 0u));