[tint] Add read-only storage texture builtins

Most backends "just worked", except HLSL which uses a different
register space for read-only textures.

Bug: tint:2007
Change-Id: I7925b3bdf7389e3b429e0a570e988adde0443452
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/146961
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl
new file mode 100644
index 0000000..677c50d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16sint, read>) -> u32
+fn textureDimensions_0329b0() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0329b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0329b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0329b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7986521
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_0329b0() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0329b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0329b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0329b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7986521
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_0329b0() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0329b0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0329b0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0329b0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.glsl
new file mode 100644
index 0000000..cf963a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_0329b0() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0329b0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_0329b0() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_0329b0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_0329b0() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_0329b0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.msl
new file mode 100644
index 0000000..4238c80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0329b0(texture1d<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_0329b0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_0329b0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_0329b0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.spvasm
new file mode 100644
index 0000000..01197e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_0329b0 "textureDimensions_0329b0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0329b0 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %29 = OpLoad %uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_0329b0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_0329b0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_0329b0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.wgsl
new file mode 100644
index 0000000..04c4b5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, read>;
+
+fn textureDimensions_0329b0() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0329b0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0329b0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0329b0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl
new file mode 100644
index 0000000..e234b22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8unorm, read>) -> u32
+fn textureDimensions_033ea7() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_033ea7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_033ea7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_033ea7();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2073954
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_033ea7() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_033ea7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_033ea7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_033ea7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2073954
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_033ea7() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_033ea7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_033ea7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_033ea7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.glsl
new file mode 100644
index 0000000..ba982b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_033ea7() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_033ea7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_033ea7() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_033ea7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_033ea7() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_033ea7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.msl
new file mode 100644
index 0000000..b38ca7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_033ea7(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_033ea7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_033ea7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_033ea7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c45041
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_033ea7 "textureDimensions_033ea7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_033ea7 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_033ea7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_033ea7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_033ea7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.wgsl
new file mode 100644
index 0000000..1436886
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, read>;
+
+fn textureDimensions_033ea7() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_033ea7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_033ea7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_033ea7();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl
new file mode 100644
index 0000000..d7d5ade
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16float, read>) -> vec2<u32>
+fn textureDimensions_07f1ba() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_07f1ba();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_07f1ba();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_07f1ba();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2bb7aeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_07f1ba() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_07f1ba();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_07f1ba();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_07f1ba();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2bb7aeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_07f1ba() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_07f1ba();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_07f1ba();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_07f1ba();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.glsl
new file mode 100644
index 0000000..12443e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_07f1ba() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_07f1ba();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_07f1ba() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_07f1ba();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_07f1ba() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_07f1ba();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.msl
new file mode 100644
index 0000000..58f33c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_07f1ba(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_07f1ba(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_07f1ba(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_07f1ba(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.spvasm
new file mode 100644
index 0000000..552a06e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_07f1ba "textureDimensions_07f1ba"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_07f1ba = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_07f1ba
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_07f1ba
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_07f1ba
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.wgsl
new file mode 100644
index 0000000..437a60b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, read>;
+
+fn textureDimensions_07f1ba() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_07f1ba();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_07f1ba();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_07f1ba();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl
new file mode 100644
index 0000000..5195456
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8unorm, read>) -> vec2<u32>
+fn textureDimensions_088918() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_088918();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_088918();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_088918();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81f260b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_088918() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_088918();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_088918();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_088918();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..81f260b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_088918() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_088918();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_088918();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_088918();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.glsl
new file mode 100644
index 0000000..4d0eb27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_088918() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_088918();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_088918() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_088918();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_088918() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_088918();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.msl
new file mode 100644
index 0000000..67459cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_088918(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_088918(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_088918(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_088918(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.spvasm
new file mode 100644
index 0000000..5a9bda4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_088918 "textureDimensions_088918"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_088918 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_088918
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_088918
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_088918
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.wgsl
new file mode 100644
index 0000000..99e50b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, read>;
+
+fn textureDimensions_088918() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_088918();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_088918();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_088918();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl
new file mode 100644
index 0000000..7464183
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32sint, read>) -> vec2<u32>
+fn textureDimensions_08e371() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_08e371();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_08e371();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_08e371();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f39ed43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_08e371() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_08e371();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_08e371();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_08e371();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f39ed43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_08e371() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_08e371();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_08e371();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_08e371();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.glsl
new file mode 100644
index 0000000..88659b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_08e371() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_08e371();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_08e371() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_08e371();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_08e371() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_08e371();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.msl
new file mode 100644
index 0000000..1dbf58e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_08e371(texture2d<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_08e371(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_08e371(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_08e371(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.spvasm
new file mode 100644
index 0000000..ccae3a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_08e371 "textureDimensions_08e371"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_08e371 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v2uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %30 = OpLoad %v2uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_08e371
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_08e371
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_08e371
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4799fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, read>;
+
+fn textureDimensions_08e371() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_08e371();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_08e371();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_08e371();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl
new file mode 100644
index 0000000..18dcf9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32uint, read>) -> vec2<u32>
+fn textureDimensions_0d4a7c() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d4a7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d4a7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d4a7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1195ed8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_0d4a7c() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d4a7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d4a7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d4a7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1195ed8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_0d4a7c() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0d4a7c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0d4a7c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0d4a7c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.glsl
new file mode 100644
index 0000000..9d6bddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_0d4a7c() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_0d4a7c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_0d4a7c() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_0d4a7c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_0d4a7c() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_0d4a7c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.msl
new file mode 100644
index 0000000..c19f060
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0d4a7c(texture2d<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_0d4a7c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_0d4a7c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_0d4a7c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.spvasm
new file mode 100644
index 0000000..58f200c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_0d4a7c "textureDimensions_0d4a7c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0d4a7c = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_0d4a7c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_0d4a7c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_0d4a7c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.wgsl
new file mode 100644
index 0000000..552d61a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, read>;
+
+fn textureDimensions_0d4a7c() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0d4a7c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0d4a7c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0d4a7c();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl
new file mode 100644
index 0000000..455777c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32float, read>) -> vec2<u32>
+fn textureDimensions_135176() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_135176();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_135176();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_135176();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..88505da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_135176() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_135176();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_135176();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_135176();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88505da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_135176() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_135176();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_135176();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_135176();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.glsl
new file mode 100644
index 0000000..a0d6cd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_135176() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_135176();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_135176() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_135176();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_135176() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_135176();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.msl
new file mode 100644
index 0000000..e138e38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_135176(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_135176(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_135176(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_135176(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.spvasm
new file mode 100644
index 0000000..6502d22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_135176 "textureDimensions_135176"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_135176 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_135176
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_135176
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_135176
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.wgsl
new file mode 100644
index 0000000..64c6ba6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureDimensions_135176() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_135176();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_135176();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_135176();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl
new file mode 100644
index 0000000..0b4464f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16sint, read>) -> vec3<u32>
+fn textureDimensions_1b720f() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1b720f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1b720f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1b720f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..43d58f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_1b720f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1b720f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1b720f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1b720f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..43d58f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_1b720f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1b720f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1b720f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1b720f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.glsl
new file mode 100644
index 0000000..6417ccf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_1b720f() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_1b720f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_1b720f() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_1b720f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_1b720f() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_1b720f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.msl
new file mode 100644
index 0000000..21ce3ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1b720f(texture3d<int, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_1b720f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_1b720f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_1b720f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.spvasm
new file mode 100644
index 0000000..dd73469
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_1b720f "textureDimensions_1b720f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1b720f = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %30 = OpLoad %v3uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_1b720f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_1b720f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_1b720f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.wgsl
new file mode 100644
index 0000000..430a77a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, read>;
+
+fn textureDimensions_1b720f() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1b720f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1b720f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1b720f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl
new file mode 100644
index 0000000..36bf5b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32float, read>) -> u32
+fn textureDimensions_212362() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_212362();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_212362();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_212362();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b5d336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_212362() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_212362();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_212362();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_212362();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b5d336
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_212362() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_212362();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_212362();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_212362();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.glsl
new file mode 100644
index 0000000..ddb6b21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_212362() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_212362();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_212362() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_212362();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_212362() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_212362();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.msl
new file mode 100644
index 0000000..90fe7bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_212362(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_212362(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_212362(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_212362(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.spvasm
new file mode 100644
index 0000000..8e7f0ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_212362 "textureDimensions_212362"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_212362 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_212362
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_212362
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_212362
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.wgsl
new file mode 100644
index 0000000..c0a7fc1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, read>;
+
+fn textureDimensions_212362() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_212362();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_212362();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_212362();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl
new file mode 100644
index 0000000..c1d168a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32uint, read>) -> vec3<u32>
+fn textureDimensions_268ddb() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_268ddb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_268ddb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_268ddb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ccc269c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_268ddb() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_268ddb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_268ddb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_268ddb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ccc269c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_268ddb() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_268ddb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_268ddb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_268ddb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.glsl
new file mode 100644
index 0000000..c9ead1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_268ddb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_268ddb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_268ddb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_268ddb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_268ddb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_268ddb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.msl
new file mode 100644
index 0000000..a392720
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_268ddb(texture3d<uint, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_268ddb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_268ddb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_268ddb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.spvasm
new file mode 100644
index 0000000..f2c58b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_268ddb "textureDimensions_268ddb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_268ddb = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_268ddb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_268ddb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_268ddb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.wgsl
new file mode 100644
index 0000000..0f1cdf2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, read>;
+
+fn textureDimensions_268ddb() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_268ddb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_268ddb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_268ddb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl
new file mode 100644
index 0000000..2000c79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32float, read>) -> u32
+fn textureDimensions_284c27() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_284c27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_284c27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_284c27();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c1180b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_284c27() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_284c27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_284c27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_284c27();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c1180b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_284c27() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_284c27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_284c27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_284c27();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.glsl
new file mode 100644
index 0000000..5933a64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_284c27() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_284c27();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_284c27() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_284c27();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_284c27() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_284c27();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.msl
new file mode 100644
index 0000000..8b419a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_284c27(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_284c27(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_284c27(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_284c27(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.spvasm
new file mode 100644
index 0000000..256e8a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_284c27 "textureDimensions_284c27"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_284c27 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_284c27
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_284c27
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_284c27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.wgsl
new file mode 100644
index 0000000..df6719b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, read>;
+
+fn textureDimensions_284c27() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_284c27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_284c27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_284c27();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl
new file mode 100644
index 0000000..b8fc7c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<bgra8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<bgra8unorm, read>) -> u32
+fn textureDimensions_2bafdf() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2bafdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2bafdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2bafdf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..79faab8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2bafdf() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2bafdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2bafdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2bafdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..79faab8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2bafdf() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2bafdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2bafdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2bafdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.glsl
new file mode 100644
index 0000000..e380d6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2bafdf() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_2bafdf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2bafdf() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_2bafdf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2bafdf() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_2bafdf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.msl
new file mode 100644
index 0000000..077ce35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2bafdf(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_2bafdf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_2bafdf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_2bafdf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.spvasm
new file mode 100644
index 0000000..2ca0471
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_2bafdf "textureDimensions_2bafdf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2bafdf = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_2bafdf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_2bafdf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_2bafdf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.wgsl
new file mode 100644
index 0000000..0bc1933
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<bgra8unorm, read>;
+
+fn textureDimensions_2bafdf() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2bafdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2bafdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2bafdf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl
new file mode 100644
index 0000000..a67afff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8uint, read>) -> u32
+fn textureDimensions_2dc5c5() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2dc5c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2dc5c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2dc5c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..574c219
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2dc5c5() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2dc5c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2dc5c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2dc5c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..574c219
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2dc5c5() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2dc5c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2dc5c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2dc5c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.glsl
new file mode 100644
index 0000000..65c7187
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2dc5c5() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_2dc5c5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2dc5c5() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_2dc5c5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_2dc5c5() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_2dc5c5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.msl
new file mode 100644
index 0000000..cc64179
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2dc5c5(texture1d<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_2dc5c5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_2dc5c5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_2dc5c5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e741b4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_2dc5c5 "textureDimensions_2dc5c5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2dc5c5 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_2dc5c5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_2dc5c5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_2dc5c5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.wgsl
new file mode 100644
index 0000000..69175dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, read>;
+
+fn textureDimensions_2dc5c5() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2dc5c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2dc5c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2dc5c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl
new file mode 100644
index 0000000..c7fac88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32float, read>) -> vec3<u32>
+fn textureDimensions_2ff32a() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2ff32a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2ff32a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2ff32a();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a3d6c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2ff32a() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2ff32a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2ff32a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2ff32a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a3d6c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_2ff32a() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2ff32a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2ff32a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2ff32a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.glsl
new file mode 100644
index 0000000..0b97e6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_2ff32a() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_2ff32a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_2ff32a() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_2ff32a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_2ff32a() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_2ff32a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.msl
new file mode 100644
index 0000000..d99da69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2ff32a(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_2ff32a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_2ff32a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_2ff32a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.spvasm
new file mode 100644
index 0000000..b4c1596
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_2ff32a "textureDimensions_2ff32a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2ff32a = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_2ff32a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_2ff32a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_2ff32a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.wgsl
new file mode 100644
index 0000000..34d9d83
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, read>;
+
+fn textureDimensions_2ff32a() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2ff32a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2ff32a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2ff32a();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl
new file mode 100644
index 0000000..687141d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32uint, read>) -> vec2<u32>
+fn textureDimensions_305dd5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_305dd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_305dd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_305dd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0e27a46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_305dd5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_305dd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_305dd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_305dd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0e27a46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_305dd5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_305dd5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_305dd5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_305dd5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.glsl
new file mode 100644
index 0000000..0496715
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_305dd5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_305dd5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_305dd5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_305dd5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_305dd5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_305dd5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.msl
new file mode 100644
index 0000000..067fca1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_305dd5(texture2d_array<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_305dd5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_305dd5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_305dd5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e95ac29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_305dd5 "textureDimensions_305dd5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_305dd5 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_305dd5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_305dd5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_305dd5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.wgsl
new file mode 100644
index 0000000..6133e26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureDimensions_305dd5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_305dd5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_305dd5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_305dd5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl
new file mode 100644
index 0000000..44192ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8uint, read>) -> vec2<u32>
+fn textureDimensions_397dab() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_397dab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_397dab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_397dab();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..66b8685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_397dab() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_397dab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_397dab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_397dab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..66b8685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_397dab() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_397dab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_397dab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_397dab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.glsl
new file mode 100644
index 0000000..4fb6d27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_397dab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_397dab();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_397dab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_397dab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_397dab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_397dab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.msl
new file mode 100644
index 0000000..d2efe77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_397dab(texture2d_array<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_397dab(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_397dab(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_397dab(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.spvasm
new file mode 100644
index 0000000..08bb73c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_397dab "textureDimensions_397dab"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_397dab = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_397dab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_397dab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_397dab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.wgsl
new file mode 100644
index 0000000..c193244
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureDimensions_397dab() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_397dab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_397dab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_397dab();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl
new file mode 100644
index 0000000..e4138e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32sint, read>) -> vec2<u32>
+fn textureDimensions_3ff0a5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3ff0a5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3ff0a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3ff0a5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a88ebc7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_3ff0a5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3ff0a5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3ff0a5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3ff0a5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a88ebc7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_3ff0a5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3ff0a5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3ff0a5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3ff0a5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.glsl
new file mode 100644
index 0000000..6c5526a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_3ff0a5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_3ff0a5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_3ff0a5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_3ff0a5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_3ff0a5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_3ff0a5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.msl
new file mode 100644
index 0000000..338fff5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3ff0a5(texture2d_array<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_3ff0a5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_3ff0a5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_3ff0a5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.spvasm
new file mode 100644
index 0000000..811d06b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_3ff0a5 "textureDimensions_3ff0a5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3ff0a5 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+         %25 = OpLoad %11 %arg_0
+         %23 = OpImageQuerySize %v3uint %25
+         %22 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %22
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %32 = OpLoad %v2uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_3ff0a5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_3ff0a5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_3ff0a5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.wgsl
new file mode 100644
index 0000000..808c563
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureDimensions_3ff0a5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3ff0a5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3ff0a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3ff0a5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl
new file mode 100644
index 0000000..5f3619a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32uint, read>) -> vec3<u32>
+fn textureDimensions_423519() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_423519();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_423519();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_423519();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..350333f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_423519() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_423519();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_423519();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_423519();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..350333f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_423519() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_423519();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_423519();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_423519();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.glsl
new file mode 100644
index 0000000..7f40483
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_423519() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_423519();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_423519() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_423519();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_423519() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_423519();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.msl
new file mode 100644
index 0000000..a28ea80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_423519(texture3d<uint, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_423519(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_423519(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_423519(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6e3194
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_423519 "textureDimensions_423519"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_423519 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_423519
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_423519
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_423519
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.wgsl
new file mode 100644
index 0000000..f0a54ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, read>;
+
+fn textureDimensions_423519() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_423519();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_423519();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_423519();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl
new file mode 100644
index 0000000..c55dde2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8sint, read>) -> vec2<u32>
+fn textureDimensions_4716a4() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4716a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4716a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4716a4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b6f105e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_4716a4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4716a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4716a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4716a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b6f105e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_4716a4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4716a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4716a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4716a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.glsl
new file mode 100644
index 0000000..cae34d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4716a4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_4716a4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4716a4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_4716a4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4716a4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_4716a4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.msl
new file mode 100644
index 0000000..0a98d5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4716a4(texture2d_array<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_4716a4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_4716a4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_4716a4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.spvasm
new file mode 100644
index 0000000..1a98972
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_4716a4 "textureDimensions_4716a4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4716a4 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+         %25 = OpLoad %11 %arg_0
+         %23 = OpImageQuerySize %v3uint %25
+         %22 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %22
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %32 = OpLoad %v2uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_4716a4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_4716a4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_4716a4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.wgsl
new file mode 100644
index 0000000..a7b33bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureDimensions_4716a4() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4716a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4716a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4716a4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl
new file mode 100644
index 0000000..17e0755
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8uint, read>) -> vec3<u32>
+fn textureDimensions_475c10() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_475c10();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_475c10();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_475c10();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..393dac4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_475c10() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_475c10();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_475c10();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_475c10();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..393dac4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_475c10() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_475c10();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_475c10();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_475c10();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.glsl
new file mode 100644
index 0000000..0056e92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_475c10() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_475c10();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_475c10() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_475c10();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_475c10() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_475c10();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.msl
new file mode 100644
index 0000000..7a31e1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_475c10(texture3d<uint, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_475c10(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_475c10(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_475c10(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f43f51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_475c10 "textureDimensions_475c10"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_475c10 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_475c10
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_475c10
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_475c10
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.wgsl
new file mode 100644
index 0000000..ffff1f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, read>;
+
+fn textureDimensions_475c10() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_475c10();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_475c10();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_475c10();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl
new file mode 100644
index 0000000..b92c064
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32uint, read>) -> vec2<u32>
+fn textureDimensions_4d1f71() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d1f71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d1f71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d1f71();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..da415eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_4d1f71() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d1f71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d1f71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d1f71();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..da415eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_4d1f71() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4d1f71();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4d1f71();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4d1f71();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.glsl
new file mode 100644
index 0000000..2996f87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4d1f71() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_4d1f71();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4d1f71() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_4d1f71();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_4d1f71() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_4d1f71();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.msl
new file mode 100644
index 0000000..1435bac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4d1f71(texture2d_array<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_4d1f71(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_4d1f71(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_4d1f71(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.spvasm
new file mode 100644
index 0000000..f50210f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_4d1f71 "textureDimensions_4d1f71"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4d1f71 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_4d1f71
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_4d1f71
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_4d1f71
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.wgsl
new file mode 100644
index 0000000..0df045e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureDimensions_4d1f71() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4d1f71();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4d1f71();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4d1f71();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl
new file mode 100644
index 0000000..e0badbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32float, read>) -> vec2<u32>
+fn textureDimensions_52cf60() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_52cf60();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_52cf60();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_52cf60();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ce333d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_52cf60() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_52cf60();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_52cf60();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_52cf60();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ce333d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_52cf60() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_52cf60();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_52cf60();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_52cf60();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.glsl
new file mode 100644
index 0000000..d9cacc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_52cf60() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_52cf60();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_52cf60() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_52cf60();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_52cf60() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_52cf60();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.msl
new file mode 100644
index 0000000..51f8561
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_52cf60(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_52cf60(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_52cf60(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_52cf60(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.spvasm
new file mode 100644
index 0000000..2b767b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_52cf60 "textureDimensions_52cf60"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_52cf60 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_52cf60
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_52cf60
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_52cf60
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.wgsl
new file mode 100644
index 0000000..37cf16e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, read>;
+
+fn textureDimensions_52cf60() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_52cf60();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_52cf60();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_52cf60();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl
new file mode 100644
index 0000000..0118e69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8sint, read>) -> vec2<u32>
+fn textureDimensions_534ef8() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_534ef8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_534ef8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_534ef8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d442828
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_534ef8() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_534ef8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_534ef8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_534ef8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d442828
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_534ef8() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_534ef8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_534ef8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_534ef8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.glsl
new file mode 100644
index 0000000..31ed6a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_534ef8() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_534ef8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_534ef8() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_534ef8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_534ef8() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_534ef8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.msl
new file mode 100644
index 0000000..13796d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_534ef8(texture2d<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_534ef8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_534ef8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_534ef8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.spvasm
new file mode 100644
index 0000000..8c1e536
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_534ef8 "textureDimensions_534ef8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_534ef8 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v2uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %30 = OpLoad %v2uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_534ef8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_534ef8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_534ef8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.wgsl
new file mode 100644
index 0000000..025fe94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, read>;
+
+fn textureDimensions_534ef8() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_534ef8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_534ef8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_534ef8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl
new file mode 100644
index 0000000..dca489a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8snorm, read>) -> vec2<u32>
+fn textureDimensions_609d34() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_609d34();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_609d34();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_609d34();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6ef6e20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_609d34() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_609d34();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_609d34();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_609d34();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ef6e20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_609d34() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_609d34();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_609d34();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_609d34();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.glsl
new file mode 100644
index 0000000..80da527
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_609d34() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_609d34();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_609d34() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_609d34();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_609d34() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_609d34();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.msl
new file mode 100644
index 0000000..a28f5c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_609d34(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_609d34(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_609d34(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_609d34(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea13ca7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_609d34 "textureDimensions_609d34"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_609d34 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_609d34
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_609d34
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_609d34
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd0fefb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureDimensions_609d34() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_609d34();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_609d34();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_609d34();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl
new file mode 100644
index 0000000..3d2bf3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8uint, read>) -> vec2<u32>
+fn textureDimensions_62e7ae() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_62e7ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_62e7ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_62e7ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6659e3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_62e7ae() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_62e7ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_62e7ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_62e7ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6659e3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_62e7ae() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_62e7ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_62e7ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_62e7ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.glsl
new file mode 100644
index 0000000..35b2064
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_62e7ae() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_62e7ae();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_62e7ae() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_62e7ae();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_62e7ae() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_62e7ae();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.msl
new file mode 100644
index 0000000..90e1fd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_62e7ae(texture2d<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_62e7ae(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_62e7ae(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_62e7ae(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.spvasm
new file mode 100644
index 0000000..6438682
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_62e7ae "textureDimensions_62e7ae"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_62e7ae = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_62e7ae
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_62e7ae
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_62e7ae
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.wgsl
new file mode 100644
index 0000000..aa2b1de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, read>;
+
+fn textureDimensions_62e7ae() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_62e7ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_62e7ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_62e7ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl
new file mode 100644
index 0000000..ff29853
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32float, read>) -> vec3<u32>
+fn textureDimensions_6dae40() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6dae40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6dae40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6dae40();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..624511a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6dae40() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6dae40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6dae40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6dae40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..624511a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6dae40() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6dae40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6dae40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6dae40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.glsl
new file mode 100644
index 0000000..d41c3b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dae40() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_6dae40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dae40() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_6dae40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dae40() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_6dae40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.msl
new file mode 100644
index 0000000..7c76eae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6dae40(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_6dae40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_6dae40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_6dae40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.spvasm
new file mode 100644
index 0000000..5b54f79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_6dae40 "textureDimensions_6dae40"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6dae40 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_6dae40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_6dae40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_6dae40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a3eb74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, read>;
+
+fn textureDimensions_6dae40() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6dae40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6dae40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6dae40();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl
new file mode 100644
index 0000000..709dcbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32sint, read>) -> vec3<u32>
+fn textureDimensions_6dbef4() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6dbef4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6dbef4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6dbef4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9847496
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6dbef4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6dbef4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6dbef4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6dbef4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9847496
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6dbef4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6dbef4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6dbef4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6dbef4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.glsl
new file mode 100644
index 0000000..a1ff628
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dbef4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_6dbef4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dbef4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_6dbef4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_6dbef4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_6dbef4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.msl
new file mode 100644
index 0000000..ce5b634
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6dbef4(texture3d<int, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_6dbef4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_6dbef4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_6dbef4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.spvasm
new file mode 100644
index 0000000..8b46264
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_6dbef4 "textureDimensions_6dbef4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6dbef4 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %30 = OpLoad %v3uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_6dbef4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_6dbef4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_6dbef4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ba9f8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, read>;
+
+fn textureDimensions_6dbef4() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6dbef4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6dbef4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6dbef4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl
new file mode 100644
index 0000000..7b296af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32float, read>) -> vec2<u32>
+fn textureDimensions_6e72c5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6e72c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6e72c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6e72c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..103d950
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6e72c5() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6e72c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6e72c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6e72c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..103d950
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_6e72c5() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6e72c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6e72c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6e72c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.glsl
new file mode 100644
index 0000000..77ccdf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_6e72c5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_6e72c5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_6e72c5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_6e72c5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_6e72c5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_6e72c5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.msl
new file mode 100644
index 0000000..629d369
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6e72c5(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_6e72c5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_6e72c5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_6e72c5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.spvasm
new file mode 100644
index 0000000..3a238be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_6e72c5 "textureDimensions_6e72c5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6e72c5 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_6e72c5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_6e72c5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_6e72c5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4837b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, read>;
+
+fn textureDimensions_6e72c5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6e72c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6e72c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6e72c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl
new file mode 100644
index 0000000..c003050
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16uint, read>) -> u32
+fn textureDimensions_709357() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_709357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_709357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_709357();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2876f40
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_709357() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_709357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_709357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_709357();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2876f40
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_709357() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_709357();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_709357();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_709357();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.glsl
new file mode 100644
index 0000000..8f9939d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_709357() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_709357();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_709357() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_709357();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_709357() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_709357();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.msl
new file mode 100644
index 0000000..8c3975f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_709357(texture1d<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_709357(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_709357(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_709357(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.spvasm
new file mode 100644
index 0000000..6bf348e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_709357 "textureDimensions_709357"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_709357 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_709357
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_709357
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_709357
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.wgsl
new file mode 100644
index 0000000..b5e2031
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, read>;
+
+fn textureDimensions_709357() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_709357();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_709357();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_709357();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl
new file mode 100644
index 0000000..267279d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8snorm, read>) -> vec2<u32>
+fn textureDimensions_7327fa() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7327fa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7327fa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7327fa();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ee617e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7327fa() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7327fa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7327fa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7327fa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ee617e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7327fa() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7327fa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7327fa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7327fa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.glsl
new file mode 100644
index 0000000..d76b33a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7327fa() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7327fa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7327fa() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_7327fa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7327fa() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_7327fa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.msl
new file mode 100644
index 0000000..8efa69f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7327fa(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_7327fa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_7327fa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_7327fa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.spvasm
new file mode 100644
index 0000000..6afe408
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_7327fa "textureDimensions_7327fa"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7327fa = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_7327fa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_7327fa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_7327fa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.wgsl
new file mode 100644
index 0000000..a508143
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, read>;
+
+fn textureDimensions_7327fa() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7327fa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7327fa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7327fa();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl
new file mode 100644
index 0000000..53b744c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8sint, read>) -> vec3<u32>
+fn textureDimensions_790e57() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_790e57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_790e57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_790e57();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..019b410
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_790e57() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_790e57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_790e57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_790e57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..019b410
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_790e57() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_790e57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_790e57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_790e57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.glsl
new file mode 100644
index 0000000..eb498d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_790e57() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_790e57();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_790e57() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_790e57();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_790e57() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_790e57();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.msl
new file mode 100644
index 0000000..a5788b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_790e57(texture3d<int, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_790e57(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_790e57(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_790e57(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.spvasm
new file mode 100644
index 0000000..d23a18d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_790e57 "textureDimensions_790e57"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_790e57 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %30 = OpLoad %v3uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_790e57
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_790e57
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_790e57
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.wgsl
new file mode 100644
index 0000000..c703c02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, read>;
+
+fn textureDimensions_790e57() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_790e57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_790e57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_790e57();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl
new file mode 100644
index 0000000..5be6bb4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32uint, read>) -> u32
+fn textureDimensions_797c30() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_797c30();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_797c30();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_797c30();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b110126
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_797c30() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_797c30();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_797c30();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_797c30();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b110126
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_797c30() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_797c30();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_797c30();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_797c30();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.glsl
new file mode 100644
index 0000000..28a9d69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_797c30() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_797c30();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_797c30() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_797c30();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_797c30() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_797c30();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.msl
new file mode 100644
index 0000000..5004dea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_797c30(texture1d<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_797c30(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_797c30(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_797c30(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c56b0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_797c30 "textureDimensions_797c30"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_797c30 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_797c30
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_797c30
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_797c30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.wgsl
new file mode 100644
index 0000000..80ddb27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, read>;
+
+fn textureDimensions_797c30() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_797c30();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_797c30();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_797c30();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl
new file mode 100644
index 0000000..a252e81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32float, read>) -> u32
+fn textureDimensions_7c753b() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c753b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c753b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c753b();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1cd495b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7c753b() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c753b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c753b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c753b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cd495b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7c753b() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7c753b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7c753b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7c753b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.glsl
new file mode 100644
index 0000000..ae13574
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7c753b() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7c753b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7c753b() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_7c753b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7c753b() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_7c753b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.msl
new file mode 100644
index 0000000..445d3cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7c753b(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_7c753b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_7c753b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_7c753b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7e6423
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_7c753b "textureDimensions_7c753b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7c753b = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_7c753b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_7c753b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_7c753b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec66367
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, read>;
+
+fn textureDimensions_7c753b() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7c753b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7c753b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7c753b();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl
new file mode 100644
index 0000000..92d9208
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32uint, read>) -> u32
+fn textureDimensions_7d8439() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7d8439();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7d8439();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7d8439();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c63013
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7d8439() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7d8439();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7d8439();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7d8439();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c63013
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7d8439() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7d8439();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7d8439();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7d8439();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.glsl
new file mode 100644
index 0000000..06ff76f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7d8439() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7d8439();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7d8439() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_7d8439();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_7d8439() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_7d8439();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.msl
new file mode 100644
index 0000000..6669a37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7d8439(texture1d<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_7d8439(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_7d8439(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_7d8439(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.spvasm
new file mode 100644
index 0000000..f041802
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_7d8439 "textureDimensions_7d8439"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7d8439 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_7d8439
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_7d8439
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_7d8439
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.wgsl
new file mode 100644
index 0000000..103cf6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, read>;
+
+fn textureDimensions_7d8439() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7d8439();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7d8439();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7d8439();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl
new file mode 100644
index 0000000..79738e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16uint, read>) -> vec2<u32>
+fn textureDimensions_7edb05() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7edb05();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7edb05();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7edb05();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..73b3982
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7edb05() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7edb05();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7edb05();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7edb05();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..73b3982
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_7edb05() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7edb05();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7edb05();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7edb05();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.glsl
new file mode 100644
index 0000000..0ceaa27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7edb05() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_7edb05();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7edb05() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_7edb05();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_7edb05() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_7edb05();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.msl
new file mode 100644
index 0000000..cb6b073
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7edb05(texture2d_array<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_7edb05(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_7edb05(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_7edb05(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.spvasm
new file mode 100644
index 0000000..21e3776
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_7edb05 "textureDimensions_7edb05"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7edb05 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_7edb05
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_7edb05
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_7edb05
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.wgsl
new file mode 100644
index 0000000..268412d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureDimensions_7edb05() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7edb05();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7edb05();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7edb05();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl
new file mode 100644
index 0000000..1d556e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<bgra8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<bgra8unorm, read>) -> vec3<u32>
+fn textureDimensions_8057cb() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8057cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8057cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8057cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..18cc6b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8057cb() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8057cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8057cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8057cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..18cc6b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8057cb() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8057cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8057cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8057cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.glsl
new file mode 100644
index 0000000..f3fc56f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_8057cb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_8057cb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_8057cb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_8057cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_8057cb() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_8057cb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.msl
new file mode 100644
index 0000000..bcf8c18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8057cb(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_8057cb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_8057cb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_8057cb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..63bcdf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_8057cb "textureDimensions_8057cb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8057cb = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_8057cb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_8057cb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_8057cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..90e036e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<bgra8unorm, read>;
+
+fn textureDimensions_8057cb() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8057cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8057cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8057cb();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl
new file mode 100644
index 0000000..784e8ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8sint, read>) -> u32
+fn textureDimensions_841ebe() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_841ebe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_841ebe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_841ebe();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3b17d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_841ebe() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_841ebe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_841ebe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_841ebe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3b17d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_841ebe() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_841ebe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_841ebe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_841ebe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.glsl
new file mode 100644
index 0000000..6fcddb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_841ebe() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_841ebe();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_841ebe() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_841ebe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_841ebe() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_841ebe();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.msl
new file mode 100644
index 0000000..4a333b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_841ebe(texture1d<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_841ebe(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_841ebe(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_841ebe(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.spvasm
new file mode 100644
index 0000000..cb2ceb4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_841ebe "textureDimensions_841ebe"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_841ebe = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %29 = OpLoad %uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_841ebe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_841ebe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_841ebe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.wgsl
new file mode 100644
index 0000000..81ee114
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, read>;
+
+fn textureDimensions_841ebe() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_841ebe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_841ebe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_841ebe();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl
new file mode 100644
index 0000000..05b9ca4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32uint, read>) -> vec2<u32>
+fn textureDimensions_87b42d() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_87b42d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_87b42d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_87b42d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4255a14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_87b42d() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_87b42d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_87b42d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_87b42d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4255a14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_87b42d() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_87b42d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_87b42d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_87b42d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.glsl
new file mode 100644
index 0000000..1ddfcfc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_87b42d() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_87b42d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_87b42d() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_87b42d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_87b42d() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_87b42d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.msl
new file mode 100644
index 0000000..46d061a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_87b42d(texture2d_array<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_87b42d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_87b42d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_87b42d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.spvasm
new file mode 100644
index 0000000..cf3cdf8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_87b42d "textureDimensions_87b42d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_87b42d = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_87b42d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_87b42d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_87b42d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.wgsl
new file mode 100644
index 0000000..3f59871
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureDimensions_87b42d() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_87b42d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_87b42d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_87b42d();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl
new file mode 100644
index 0000000..2269098
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8unorm, read>) -> vec2<u32>
+fn textureDimensions_881dd4() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_881dd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_881dd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_881dd4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a056e85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_881dd4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_881dd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_881dd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_881dd4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a056e85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_881dd4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_881dd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_881dd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_881dd4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.glsl
new file mode 100644
index 0000000..127e4a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_881dd4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_881dd4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_881dd4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_881dd4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_881dd4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_881dd4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.msl
new file mode 100644
index 0000000..6e4ea66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_881dd4(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_881dd4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_881dd4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_881dd4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.spvasm
new file mode 100644
index 0000000..8f3723e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_881dd4 "textureDimensions_881dd4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_881dd4 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_881dd4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_881dd4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_881dd4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.wgsl
new file mode 100644
index 0000000..53358bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureDimensions_881dd4() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_881dd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_881dd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_881dd4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl
new file mode 100644
index 0000000..d18e8e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32uint, read>) -> vec2<u32>
+fn textureDimensions_8e15f4() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8e15f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8e15f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8e15f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56e39bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8e15f4() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8e15f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8e15f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8e15f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56e39bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8e15f4() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8e15f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8e15f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8e15f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.glsl
new file mode 100644
index 0000000..0afad33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_8e15f4() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_8e15f4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_8e15f4() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_8e15f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_8e15f4() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_8e15f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.msl
new file mode 100644
index 0000000..2a513ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8e15f4(texture2d<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_8e15f4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_8e15f4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_8e15f4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..ee61a3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_8e15f4 "textureDimensions_8e15f4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8e15f4 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_8e15f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_8e15f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_8e15f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..4527144
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, read>;
+
+fn textureDimensions_8e15f4() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8e15f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8e15f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8e15f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl
new file mode 100644
index 0000000..9ce808d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32sint, read>) -> u32
+fn textureDimensions_8e5de6() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8e5de6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8e5de6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8e5de6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d02fd23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8e5de6() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8e5de6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8e5de6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8e5de6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d02fd23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_8e5de6() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8e5de6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8e5de6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8e5de6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.glsl
new file mode 100644
index 0000000..57b6886
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_8e5de6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_8e5de6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_8e5de6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_8e5de6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_8e5de6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_8e5de6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.msl
new file mode 100644
index 0000000..10f98b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8e5de6(texture1d<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_8e5de6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_8e5de6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_8e5de6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.spvasm
new file mode 100644
index 0000000..13ba65c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_8e5de6 "textureDimensions_8e5de6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8e5de6 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %29 = OpLoad %uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_8e5de6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_8e5de6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_8e5de6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.wgsl
new file mode 100644
index 0000000..ef966ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, read>;
+
+fn textureDimensions_8e5de6() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8e5de6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8e5de6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8e5de6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl
new file mode 100644
index 0000000..47d03ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16sint, read>) -> vec2<u32>
+fn textureDimensions_904b0f() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_904b0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_904b0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_904b0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b490a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_904b0f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_904b0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_904b0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_904b0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b490a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_904b0f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_904b0f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_904b0f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_904b0f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.glsl
new file mode 100644
index 0000000..8d1b18f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_904b0f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_904b0f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_904b0f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_904b0f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_904b0f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_904b0f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.msl
new file mode 100644
index 0000000..ec71160
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_904b0f(texture2d_array<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_904b0f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_904b0f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_904b0f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.spvasm
new file mode 100644
index 0000000..9df5109
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_904b0f "textureDimensions_904b0f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_904b0f = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+         %25 = OpLoad %11 %arg_0
+         %23 = OpImageQuerySize %v3uint %25
+         %22 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %22
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %32 = OpLoad %v2uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_904b0f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_904b0f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_904b0f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.wgsl
new file mode 100644
index 0000000..44f39db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureDimensions_904b0f() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_904b0f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_904b0f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_904b0f();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl
new file mode 100644
index 0000000..8e0d66b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<bgra8unorm, read>) -> vec2<u32>
+fn textureDimensions_9b10a0() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9b10a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9b10a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9b10a0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f21349
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9b10a0() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9b10a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9b10a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9b10a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f21349
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9b10a0() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9b10a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9b10a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9b10a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.glsl
new file mode 100644
index 0000000..107fc4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9b10a0() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_9b10a0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9b10a0() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_9b10a0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9b10a0() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_9b10a0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.msl
new file mode 100644
index 0000000..bc2ff2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9b10a0(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_9b10a0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_9b10a0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_9b10a0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.spvasm
new file mode 100644
index 0000000..922dcd2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_9b10a0 "textureDimensions_9b10a0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9b10a0 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_9b10a0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_9b10a0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_9b10a0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.wgsl
new file mode 100644
index 0000000..e5dc3b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureDimensions_9b10a0() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9b10a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9b10a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9b10a0();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl
new file mode 100644
index 0000000..345512b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32float, read>) -> vec2<u32>
+fn textureDimensions_9d0bac() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9d0bac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9d0bac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9d0bac();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e5a70d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9d0bac() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9d0bac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9d0bac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9d0bac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e5a70d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9d0bac() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9d0bac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9d0bac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9d0bac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.glsl
new file mode 100644
index 0000000..2a6faa8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9d0bac() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_9d0bac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9d0bac() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_9d0bac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9d0bac() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_9d0bac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.msl
new file mode 100644
index 0000000..2c37917
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9d0bac(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_9d0bac(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_9d0bac(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_9d0bac(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.spvasm
new file mode 100644
index 0000000..df30003
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_9d0bac "textureDimensions_9d0bac"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9d0bac = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_9d0bac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_9d0bac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_9d0bac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.wgsl
new file mode 100644
index 0000000..a54364b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, read>;
+
+fn textureDimensions_9d0bac() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9d0bac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9d0bac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9d0bac();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl
new file mode 100644
index 0000000..93672a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8snorm, read>) -> u32
+fn textureDimensions_9d68b8() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9d68b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9d68b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9d68b8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1a89e4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9d68b8() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9d68b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9d68b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9d68b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1a89e4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9d68b8() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9d68b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9d68b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9d68b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.glsl
new file mode 100644
index 0000000..e47454f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_9d68b8() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_9d68b8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_9d68b8() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_9d68b8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_9d68b8() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_9d68b8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.msl
new file mode 100644
index 0000000..e8a81a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9d68b8(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_9d68b8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_9d68b8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_9d68b8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.spvasm
new file mode 100644
index 0000000..a7c41bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_9d68b8 "textureDimensions_9d68b8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9d68b8 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_9d68b8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_9d68b8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_9d68b8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.wgsl
new file mode 100644
index 0000000..26f97ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, read>;
+
+fn textureDimensions_9d68b8() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9d68b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9d68b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9d68b8();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl
new file mode 100644
index 0000000..4c59e44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32float, read>) -> vec2<u32>
+fn textureDimensions_9dc27a() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9dc27a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9dc27a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9dc27a();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3baf781
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9dc27a() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9dc27a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9dc27a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9dc27a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3baf781
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_9dc27a() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9dc27a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9dc27a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9dc27a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.glsl
new file mode 100644
index 0000000..90c03c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9dc27a() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_9dc27a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9dc27a() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_9dc27a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_9dc27a() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_9dc27a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.msl
new file mode 100644
index 0000000..ac2aefb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9dc27a(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_9dc27a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_9dc27a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_9dc27a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.spvasm
new file mode 100644
index 0000000..c277a29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_9dc27a "textureDimensions_9dc27a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9dc27a = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_9dc27a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_9dc27a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_9dc27a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.wgsl
new file mode 100644
index 0000000..f57fb76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureDimensions_9dc27a() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9dc27a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9dc27a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9dc27a();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl
new file mode 100644
index 0000000..75f04cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8unorm, read>) -> vec3<u32>
+fn textureDimensions_a25d9b() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a25d9b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a25d9b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a25d9b();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..497f7ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a25d9b() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a25d9b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a25d9b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a25d9b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..497f7ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a25d9b() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a25d9b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a25d9b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a25d9b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.glsl
new file mode 100644
index 0000000..80b1057
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a25d9b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_a25d9b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a25d9b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_a25d9b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a25d9b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_a25d9b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.msl
new file mode 100644
index 0000000..df1ac0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a25d9b(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_a25d9b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_a25d9b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_a25d9b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.spvasm
new file mode 100644
index 0000000..3d0abc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_a25d9b "textureDimensions_a25d9b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a25d9b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_a25d9b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_a25d9b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_a25d9b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.wgsl
new file mode 100644
index 0000000..dc8df8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, read>;
+
+fn textureDimensions_a25d9b() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a25d9b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a25d9b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a25d9b();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl
new file mode 100644
index 0000000..34871b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16float, read>) -> vec3<u32>
+fn textureDimensions_a3ea91() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a3ea91();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a3ea91();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a3ea91();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e268f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a3ea91() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a3ea91();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a3ea91();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a3ea91();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e268f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a3ea91() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a3ea91();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a3ea91();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a3ea91();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.glsl
new file mode 100644
index 0000000..e1550ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a3ea91() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_a3ea91();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a3ea91() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_a3ea91();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_a3ea91() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_a3ea91();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.msl
new file mode 100644
index 0000000..d161824
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a3ea91(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_a3ea91(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_a3ea91(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_a3ea91(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.spvasm
new file mode 100644
index 0000000..d34788b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_a3ea91 "textureDimensions_a3ea91"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a3ea91 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_a3ea91
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_a3ea91
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_a3ea91
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ea63bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, read>;
+
+fn textureDimensions_a3ea91() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a3ea91();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a3ea91();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a3ea91();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl
new file mode 100644
index 0000000..174eb26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16sint, read>) -> vec2<u32>
+fn textureDimensions_a65776() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a65776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a65776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a65776();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6e7abbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a65776() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a65776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a65776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a65776();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e7abbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_a65776() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a65776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a65776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a65776();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.glsl
new file mode 100644
index 0000000..3057133
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_a65776() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_a65776();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_a65776() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_a65776();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_a65776() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_a65776();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.msl
new file mode 100644
index 0000000..eedd1cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a65776(texture2d<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_a65776(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_a65776(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_a65776(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.spvasm
new file mode 100644
index 0000000..e07651b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_a65776 "textureDimensions_a65776"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a65776 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v2uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %30 = OpLoad %v2uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_a65776
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_a65776
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_a65776
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.wgsl
new file mode 100644
index 0000000..3f46072
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, read>;
+
+fn textureDimensions_a65776() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a65776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a65776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a65776();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl
new file mode 100644
index 0000000..8da5003
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32uint, read>) -> vec2<u32>
+fn textureDimensions_b56112() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b56112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b56112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b56112();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e1f1e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b56112() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b56112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b56112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b56112();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e1f1e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b56112() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b56112();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b56112();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b56112();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.glsl
new file mode 100644
index 0000000..c958132
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_b56112() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_b56112();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_b56112() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_b56112();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_b56112() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_b56112();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.msl
new file mode 100644
index 0000000..067fa80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b56112(texture2d<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_b56112(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_b56112(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_b56112(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.spvasm
new file mode 100644
index 0000000..293c96a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_b56112 "textureDimensions_b56112"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b56112 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_b56112
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_b56112
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_b56112
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.wgsl
new file mode 100644
index 0000000..a54597d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b56112.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, read>;
+
+fn textureDimensions_b56112() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b56112();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b56112();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b56112();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl
new file mode 100644
index 0000000..2e7171f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16float, read>) -> u32
+fn textureDimensions_b5ba03() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b5ba03();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b5ba03();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b5ba03();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d8c5ba7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b5ba03() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b5ba03();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b5ba03();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b5ba03();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8c5ba7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b5ba03() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b5ba03();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b5ba03();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b5ba03();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.glsl
new file mode 100644
index 0000000..9104daf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b5ba03() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_b5ba03();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b5ba03() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_b5ba03();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b5ba03() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_b5ba03();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.msl
new file mode 100644
index 0000000..392cd4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b5ba03(texture1d<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_b5ba03(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_b5ba03(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_b5ba03(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.spvasm
new file mode 100644
index 0000000..2a37dd6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_b5ba03 "textureDimensions_b5ba03"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b5ba03 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_b5ba03
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_b5ba03
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_b5ba03
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.wgsl
new file mode 100644
index 0000000..66ec05a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b5ba03.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, read>;
+
+fn textureDimensions_b5ba03() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b5ba03();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b5ba03();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b5ba03();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl
new file mode 100644
index 0000000..f6388ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16uint, read>) -> vec3<u32>
+fn textureDimensions_b6bbf4() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b6bbf4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b6bbf4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b6bbf4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3f39596
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b6bbf4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b6bbf4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b6bbf4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b6bbf4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3f39596
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b6bbf4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b6bbf4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b6bbf4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b6bbf4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.glsl
new file mode 100644
index 0000000..c45ab38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_b6bbf4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_b6bbf4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_b6bbf4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_b6bbf4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_b6bbf4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_b6bbf4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.msl
new file mode 100644
index 0000000..6657c2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b6bbf4(texture3d<uint, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_b6bbf4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_b6bbf4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_b6bbf4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.spvasm
new file mode 100644
index 0000000..f935538
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_b6bbf4 "textureDimensions_b6bbf4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b6bbf4 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_b6bbf4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_b6bbf4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_b6bbf4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc45fb3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b6bbf4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, read>;
+
+fn textureDimensions_b6bbf4() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b6bbf4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b6bbf4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b6bbf4();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl
new file mode 100644
index 0000000..143b020
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32sint, read>) -> u32
+fn textureDimensions_b9e7ef() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b9e7ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b9e7ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b9e7ef();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87bc187
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b9e7ef() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b9e7ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b9e7ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b9e7ef();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..87bc187
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_b9e7ef() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b9e7ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b9e7ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b9e7ef();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.glsl
new file mode 100644
index 0000000..41ac48a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b9e7ef() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_b9e7ef();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b9e7ef() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_b9e7ef();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_b9e7ef() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_b9e7ef();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.msl
new file mode 100644
index 0000000..8cce255
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b9e7ef(texture1d<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_b9e7ef(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_b9e7ef(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_b9e7ef(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.spvasm
new file mode 100644
index 0000000..993d90cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_b9e7ef "textureDimensions_b9e7ef"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b9e7ef = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %29 = OpLoad %uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_b9e7ef
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_b9e7ef
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_b9e7ef
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.wgsl
new file mode 100644
index 0000000..5163c38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/b9e7ef.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, read>;
+
+fn textureDimensions_b9e7ef() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b9e7ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b9e7ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b9e7ef();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl
new file mode 100644
index 0000000..7a4e9f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32float, read>) -> vec3<u32>
+fn textureDimensions_bec716() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bec716();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bec716();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bec716();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a403ff8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_bec716() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bec716();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bec716();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bec716();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a403ff8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_bec716() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bec716();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bec716();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bec716();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.glsl
new file mode 100644
index 0000000..c5e386e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bec716() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_bec716();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bec716() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_bec716();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bec716() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_bec716();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.msl
new file mode 100644
index 0000000..72b86e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_bec716(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_bec716(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_bec716(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_bec716(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.spvasm
new file mode 100644
index 0000000..2cb96d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_bec716 "textureDimensions_bec716"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_bec716 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_bec716
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_bec716
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_bec716
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.wgsl
new file mode 100644
index 0000000..ff742ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bec716.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, read>;
+
+fn textureDimensions_bec716() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bec716();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bec716();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bec716();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl
new file mode 100644
index 0000000..debfcf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8snorm, read>) -> vec3<u32>
+fn textureDimensions_bf9170() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bf9170();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bf9170();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bf9170();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..400fdf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_bf9170() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bf9170();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bf9170();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bf9170();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..400fdf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_bf9170() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bf9170();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bf9170();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bf9170();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.glsl
new file mode 100644
index 0000000..e110759
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bf9170() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_bf9170();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bf9170() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_bf9170();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_bf9170() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_bf9170();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.msl
new file mode 100644
index 0000000..f3ea6c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_bf9170(texture3d<float, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_bf9170(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_bf9170(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_bf9170(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.spvasm
new file mode 100644
index 0000000..51cfbb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_bf9170 "textureDimensions_bf9170"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_bf9170 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_bf9170
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_bf9170
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_bf9170
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.wgsl
new file mode 100644
index 0000000..3a47b02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/bf9170.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, read>;
+
+fn textureDimensions_bf9170() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bf9170();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bf9170();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bf9170();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl
new file mode 100644
index 0000000..bf154f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32float, read>) -> vec2<u32>
+fn textureDimensions_c1189e() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c1189e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c1189e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c1189e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8d81cd6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_c1189e() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c1189e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c1189e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c1189e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8d81cd6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_c1189e() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c1189e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c1189e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c1189e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.glsl
new file mode 100644
index 0000000..788f6c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_c1189e() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_c1189e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_c1189e() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_c1189e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_c1189e() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_c1189e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.msl
new file mode 100644
index 0000000..d72929a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c1189e(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_c1189e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_c1189e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_c1189e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.spvasm
new file mode 100644
index 0000000..b1cdd1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_c1189e "textureDimensions_c1189e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c1189e = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_c1189e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_c1189e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_c1189e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.wgsl
new file mode 100644
index 0000000..8bab568
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/c1189e.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureDimensions_c1189e() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c1189e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c1189e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c1189e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl
new file mode 100644
index 0000000..e2e80eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32sint, read>) -> vec2<u32>
+fn textureDimensions_cd3033() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cd3033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cd3033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cd3033();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7bf99ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_cd3033() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cd3033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cd3033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cd3033();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7bf99ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_cd3033() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cd3033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cd3033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cd3033();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.glsl
new file mode 100644
index 0000000..04d337b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_cd3033() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_cd3033();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_cd3033() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_cd3033();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_cd3033() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_cd3033();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.msl
new file mode 100644
index 0000000..cde806f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_cd3033(texture2d_array<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_cd3033(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_cd3033(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_cd3033(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.spvasm
new file mode 100644
index 0000000..d9c55ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_cd3033 "textureDimensions_cd3033"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cd3033 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+         %25 = OpLoad %11 %arg_0
+         %23 = OpImageQuerySize %v3uint %25
+         %22 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %22
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %32 = OpLoad %v2uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_cd3033
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_cd3033
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_cd3033
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.wgsl
new file mode 100644
index 0000000..a5f85b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cd3033.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureDimensions_cd3033() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cd3033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cd3033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cd3033();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl
new file mode 100644
index 0000000..0626dac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32sint, read>) -> u32
+fn textureDimensions_cedabd() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cedabd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cedabd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cedabd();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56b1176
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_cedabd() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cedabd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cedabd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cedabd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56b1176
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_cedabd() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cedabd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cedabd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cedabd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.glsl
new file mode 100644
index 0000000..2ca0e23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_cedabd() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_cedabd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_cedabd() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_cedabd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_cedabd() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_cedabd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.msl
new file mode 100644
index 0000000..ee5c6f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_cedabd(texture1d<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_cedabd(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_cedabd(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_cedabd(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d9f510
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_cedabd "textureDimensions_cedabd"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %25 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cedabd = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %29 = OpLoad %uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_cedabd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_cedabd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_cedabd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.wgsl
new file mode 100644
index 0000000..7a7be32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/cedabd.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, read>;
+
+fn textureDimensions_cedabd() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cedabd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cedabd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cedabd();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl
new file mode 100644
index 0000000..8d6beb4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32uint, read>) -> vec3<u32>
+fn textureDimensions_d0778e() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d0778e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d0778e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d0778e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..22daecc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d0778e() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d0778e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d0778e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d0778e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..22daecc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d0778e() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d0778e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d0778e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d0778e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.glsl
new file mode 100644
index 0000000..cd058a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_d0778e() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d0778e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_d0778e() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_d0778e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_d0778e() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_d0778e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.msl
new file mode 100644
index 0000000..ba21125
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d0778e(texture3d<uint, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_d0778e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_d0778e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_d0778e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.spvasm
new file mode 100644
index 0000000..c32348d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_d0778e "textureDimensions_d0778e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %25 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d0778e = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %29 = OpLoad %v3uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d0778e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_d0778e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_d0778e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.wgsl
new file mode 100644
index 0000000..807b327
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d0778e.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, read>;
+
+fn textureDimensions_d0778e() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d0778e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d0778e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d0778e();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl
new file mode 100644
index 0000000..fa6c1b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<bgra8unorm, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<bgra8unorm, read>) -> vec2<u32>
+fn textureDimensions_d44ac3() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d44ac3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d44ac3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d44ac3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..381077f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d44ac3() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d44ac3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d44ac3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d44ac3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..381077f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d44ac3() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d44ac3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d44ac3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d44ac3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.glsl
new file mode 100644
index 0000000..b9f0e3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44ac3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d44ac3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44ac3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_d44ac3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44ac3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_d44ac3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.msl
new file mode 100644
index 0000000..e11f740
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d44ac3(texture2d<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_d44ac3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_d44ac3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_d44ac3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.spvasm
new file mode 100644
index 0000000..66b60c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_d44ac3 "textureDimensions_d44ac3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d44ac3 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d44ac3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_d44ac3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_d44ac3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.wgsl
new file mode 100644
index 0000000..6413008
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44ac3.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<bgra8unorm, read>;
+
+fn textureDimensions_d44ac3() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d44ac3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d44ac3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d44ac3();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl
new file mode 100644
index 0000000..fa207ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16uint, read>) -> vec2<u32>
+fn textureDimensions_d44dd1() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d44dd1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d44dd1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d44dd1();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0cd0e85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d44dd1() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d44dd1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d44dd1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d44dd1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0cd0e85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d44dd1() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d44dd1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d44dd1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d44dd1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.glsl
new file mode 100644
index 0000000..4d6c256
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44dd1() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d44dd1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44dd1() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_d44dd1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d44dd1() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_d44dd1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.msl
new file mode 100644
index 0000000..a323bd4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d44dd1(texture2d<uint, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_d44dd1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_d44dd1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_d44dd1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.spvasm
new file mode 100644
index 0000000..a027eff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_d44dd1 "textureDimensions_d44dd1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d44dd1 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v2uint %22
+               OpStore %res %21
+         %28 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %29 = OpLoad %v2uint %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d44dd1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_d44dd1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_d44dd1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.wgsl
new file mode 100644
index 0000000..ab791d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d44dd1.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, read>;
+
+fn textureDimensions_d44dd1() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d44dd1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d44dd1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d44dd1();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl
new file mode 100644
index 0000000..12f76dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32sint, read>) -> vec2<u32>
+fn textureDimensions_d6f3cf() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d6f3cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d6f3cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d6f3cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f07fb0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d6f3cf() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d6f3cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d6f3cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d6f3cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f07fb0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_d6f3cf() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d6f3cf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d6f3cf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d6f3cf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.glsl
new file mode 100644
index 0000000..a7193cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d6f3cf() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_d6f3cf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d6f3cf() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_d6f3cf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_d6f3cf() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_d6f3cf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.msl
new file mode 100644
index 0000000..de74a3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d6f3cf(texture2d<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_d6f3cf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_d6f3cf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_d6f3cf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.spvasm
new file mode 100644
index 0000000..deb9d9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_d6f3cf "textureDimensions_d6f3cf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d6f3cf = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v2uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %30 = OpLoad %v2uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_d6f3cf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_d6f3cf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_d6f3cf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.wgsl
new file mode 100644
index 0000000..f5db3e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/d6f3cf.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, read>;
+
+fn textureDimensions_d6f3cf() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d6f3cf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d6f3cf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d6f3cf();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl
new file mode 100644
index 0000000..7f49104
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16float, read>) -> vec2<u32>
+fn textureDimensions_daf0fe() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_daf0fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_daf0fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_daf0fe();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6e5f91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_daf0fe() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_daf0fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_daf0fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_daf0fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6e5f91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_daf0fe() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_daf0fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_daf0fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_daf0fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.glsl
new file mode 100644
index 0000000..743ee71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_daf0fe() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_daf0fe();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_daf0fe() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_daf0fe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_daf0fe() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_daf0fe();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.msl
new file mode 100644
index 0000000..75a9896
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_daf0fe(texture2d_array<float, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_daf0fe(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_daf0fe(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_daf0fe(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f9383b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_daf0fe "textureDimensions_daf0fe"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_daf0fe = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpVectorShuffle %v2uint %22 %22 0 1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %31 = OpLoad %v2uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_daf0fe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_daf0fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureDimensions_daf0fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..999850a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/daf0fe.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureDimensions_daf0fe() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_daf0fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_daf0fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_daf0fe();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl
new file mode 100644
index 0000000..8b1b706
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32sint, read>) -> vec3<u32>
+fn textureDimensions_db7131() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_db7131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_db7131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_db7131();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..191f2df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_db7131() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_db7131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_db7131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_db7131();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..191f2df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_db7131() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_db7131();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_db7131();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_db7131();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.glsl
new file mode 100644
index 0000000..691dfaf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_db7131() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_db7131();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_db7131() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_db7131();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_db7131() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_db7131();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.msl
new file mode 100644
index 0000000..de00680
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_db7131(texture3d<int, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_db7131(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_db7131(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_db7131(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.spvasm
new file mode 100644
index 0000000..1f15e73
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_db7131 "textureDimensions_db7131"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_db7131 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %30 = OpLoad %v3uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_db7131
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_db7131
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_db7131
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.wgsl
new file mode 100644
index 0000000..89d7cca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/db7131.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, read>;
+
+fn textureDimensions_db7131() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_db7131();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_db7131();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_db7131();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl
new file mode 100644
index 0000000..353247a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, read>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32uint, read>) -> u32
+fn textureDimensions_de03c6() {
+  var res: u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_de03c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_de03c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_de03c6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..15b5301
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_de03c6() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_de03c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_de03c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_de03c6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..15b5301
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_de03c6() {
+  uint tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_de03c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_de03c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_de03c6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.glsl
new file mode 100644
index 0000000..deda0f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_de03c6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_de03c6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_de03c6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_de03c6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureDimensions_de03c6() {
+  uint res = uvec2(imageSize(arg_0)).x;
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_de03c6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.msl
new file mode 100644
index 0000000..4d09530
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_de03c6(texture1d<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_width(0);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureDimensions_de03c6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_de03c6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_de03c6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.spvasm
new file mode 100644
index 0000000..b292353
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_de03c6 "textureDimensions_de03c6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %24 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_de03c6 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %uint %21
+               OpStore %res %20
+         %27 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %28 = OpLoad %uint %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_de03c6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_de03c6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_de03c6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.wgsl
new file mode 100644
index 0000000..3435bb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/de03c6.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, read>;
+
+fn textureDimensions_de03c6() {
+  var res : u32 = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_de03c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_de03c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_de03c6();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl
new file mode 100644
index 0000000..bc6fe68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32sint, read>) -> vec3<u32>
+fn textureDimensions_f4321c() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f4321c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f4321c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f4321c();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..161e20b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f4321c() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f4321c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f4321c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f4321c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..161e20b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f4321c() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+  prevent_dce.Store3(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f4321c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f4321c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f4321c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.glsl
new file mode 100644
index 0000000..674aca2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_f4321c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_f4321c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_f4321c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_f4321c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec3 inner;
+} prevent_dce;
+
+void textureDimensions_f4321c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_f4321c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.msl
new file mode 100644
index 0000000..4bb01b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f4321c(texture3d<int, access::read> tint_symbol_1, device packed_uint3* const tint_symbol_2) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+  *(tint_symbol_2) = packed_uint3(res);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device packed_uint3* const tint_symbol_4) {
+  textureDimensions_f4321c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device packed_uint3* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device packed_uint3* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_f4321c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device packed_uint3* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_f4321c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.spvasm
new file mode 100644
index 0000000..d380b8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_f4321c "textureDimensions_f4321c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%prevent_dce_block = OpTypeStruct %v3uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %26 = OpConstantNull %v3uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v3uint = OpTypePointer StorageBuffer %v3uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f4321c = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v3uint %prevent_dce %uint_0
+         %30 = OpLoad %v3uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_f4321c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_f4321c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_f4321c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.wgsl
new file mode 100644
index 0000000..1a15a3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f4321c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, read>;
+
+fn textureDimensions_f4321c() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec3<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f4321c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f4321c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f4321c();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl
new file mode 100644
index 0000000..53827cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32sint, read>) -> vec2<u32>
+fn textureDimensions_f48886() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f48886();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f48886();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f48886();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0aacb5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f48886() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f48886();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f48886();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f48886();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0aacb5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f48886() {
+  uint2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f48886();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f48886();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f48886();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.glsl
new file mode 100644
index 0000000..c059dd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f48886() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_f48886();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f48886() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_f48886();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f48886() {
+  uvec2 res = uvec2(imageSize(arg_0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_f48886();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.msl
new file mode 100644
index 0000000..c83049a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f48886(texture2d<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_f48886(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_f48886(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_f48886(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.spvasm
new file mode 100644
index 0000000..bf126b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_f48886 "textureDimensions_f48886"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f48886 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v2uint %23
+               OpStore %res %22
+         %29 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %30 = OpLoad %v2uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_f48886
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_f48886
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_f48886
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.wgsl
new file mode 100644
index 0000000..e4d4365
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f48886.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, read>;
+
+fn textureDimensions_f48886() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f48886();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f48886();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f48886();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl
new file mode 100644
index 0000000..64b5bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32sint, read>) -> vec2<u32>
+fn textureDimensions_f7bac5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f7bac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f7bac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f7bac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..744b6ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f7bac5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f7bac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f7bac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f7bac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..744b6ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureDimensions_f7bac5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+  prevent_dce.Store2(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f7bac5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f7bac5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f7bac5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.glsl
new file mode 100644
index 0000000..db1cbc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f7bac5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureDimensions_f7bac5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f7bac5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureDimensions_f7bac5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec2 inner;
+} prevent_dce;
+
+void textureDimensions_f7bac5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureDimensions_f7bac5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.msl
new file mode 100644
index 0000000..62f5af6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f7bac5(texture2d_array<int, access::read> tint_symbol_1, device uint2* const tint_symbol_2) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint2* const tint_symbol_4) {
+  textureDimensions_f7bac5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint2* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint2* tint_symbol_8 [[buffer(0)]]) {
+  textureDimensions_f7bac5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint2* tint_symbol_10 [[buffer(0)]]) {
+  textureDimensions_f7bac5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.spvasm
new file mode 100644
index 0000000..4897baf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureDimensions_f7bac5 "textureDimensions_f7bac5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%prevent_dce_block = OpTypeStruct %v2uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %18 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v2uint = OpTypePointer StorageBuffer %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f7bac5 = OpFunction %void None %18
+         %21 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+         %25 = OpLoad %11 %arg_0
+         %23 = OpImageQuerySize %v3uint %25
+         %22 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %22
+         %31 = OpAccessChain %_ptr_StorageBuffer_v2uint %prevent_dce %uint_0
+         %32 = OpLoad %v2uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_f7bac5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %18
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %18
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_f7bac5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %18
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_f7bac5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.wgsl
new file mode 100644
index 0000000..185f158
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureDimensions/f7bac5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureDimensions_f7bac5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec2<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f7bac5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f7bac5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f7bac5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl
new file mode 100644
index 0000000..de6da02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_045ec9() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_045ec9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_045ec9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_045ec9();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f6e670e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_045ec9() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_045ec9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_045ec9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f6e670e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_045ec9() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_045ec9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_045ec9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.glsl
new file mode 100644
index 0000000..d8fc6d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_045ec9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_045ec9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_045ec9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_045ec9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.msl
new file mode 100644
index 0000000..3a7b66e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_045ec9(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_045ec9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_045ec9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_045ec9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.spvasm
new file mode 100644
index 0000000..5172f14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_045ec9 "textureLoad_045ec9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_045ec9 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_045ec9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.wgsl
new file mode 100644
index 0000000..30efee0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/045ec9.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, read>;
+
+fn textureLoad_045ec9() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_045ec9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_045ec9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_045ec9();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl
new file mode 100644
index 0000000..ecb8ced
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_050c33() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_050c33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_050c33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_050c33();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2b84a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_050c33() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_050c33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_050c33();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2b84a5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_050c33() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_050c33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_050c33();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.glsl
new file mode 100644
index 0000000..632eef8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_050c33();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_050c33();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_050c33() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_050c33();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.msl
new file mode 100644
index 0000000..db518d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_050c33(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_050c33(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_050c33(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_050c33(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.spvasm
new file mode 100644
index 0000000..a6131fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_050c33 "textureLoad_050c33"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_050c33 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_050c33
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_050c33
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_050c33
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.wgsl
new file mode 100644
index 0000000..01a1e4b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/050c33.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, read>;
+
+fn textureLoad_050c33() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_050c33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_050c33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_050c33();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl
new file mode 100644
index 0000000..65eeadb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8snorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_0674b1() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0674b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0674b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0674b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..196af11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_0674b1() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0674b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0674b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..196af11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_0674b1() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_0674b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_0674b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.glsl
new file mode 100644
index 0000000..e8ca415
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_0674b1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_0674b1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_0674b1() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_0674b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.msl
new file mode 100644
index 0000000..fbfa94e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_0674b1(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_0674b1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_0674b1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_0674b1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..5b1bfdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_0674b1 "textureLoad_0674b1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_0674b1 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_0674b1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..f733453
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/0674b1.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, read>;
+
+fn textureLoad_0674b1() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_0674b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_0674b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_0674b1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl
new file mode 100644
index 0000000..2e9fca5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_06ac37() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_06ac37();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_06ac37();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_06ac37();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..963470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_06ac37() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_06ac37();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_06ac37();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..963470c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_06ac37() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_06ac37();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_06ac37();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.glsl
new file mode 100644
index 0000000..190913a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_06ac37();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_06ac37();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_06ac37() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_06ac37();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.msl
new file mode 100644
index 0000000..3714b16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_06ac37(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_06ac37(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_06ac37(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_06ac37(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.spvasm
new file mode 100644
index 0000000..38a058f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_06ac37 "textureLoad_06ac37"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_06ac37 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_06ac37
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.wgsl
new file mode 100644
index 0000000..d130bfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/06ac37.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_06ac37() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_06ac37();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_06ac37();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_06ac37();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl
new file mode 100644
index 0000000..cbb915f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_072e26() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_072e26();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_072e26();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_072e26();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c469f37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_072e26() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_072e26();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_072e26();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c469f37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_072e26() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_072e26();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_072e26();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.glsl
new file mode 100644
index 0000000..ff2ea27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_072e26();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_072e26();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_072e26() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_072e26();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.msl
new file mode 100644
index 0000000..dc68f1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_072e26(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_072e26(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_072e26(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_072e26(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.spvasm
new file mode 100644
index 0000000..5ffefb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_072e26 "textureLoad_072e26"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_072e26 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_072e26
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_072e26
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_072e26
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.wgsl
new file mode 100644
index 0000000..0aad9ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/072e26.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_072e26() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_072e26();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_072e26();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_072e26();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl
new file mode 100644
index 0000000..bb51777
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8snorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_078bc4() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_078bc4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_078bc4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_078bc4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..57707e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_078bc4() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_078bc4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_078bc4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..57707e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_078bc4() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_078bc4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_078bc4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.glsl
new file mode 100644
index 0000000..5f912f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_078bc4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_078bc4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_078bc4() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_078bc4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.msl
new file mode 100644
index 0000000..0e58eb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_078bc4(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_078bc4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_078bc4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_078bc4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.spvasm
new file mode 100644
index 0000000..34e1aad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_078bc4 "textureLoad_078bc4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_078bc4 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_078bc4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.wgsl
new file mode 100644
index 0000000..5bb37cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/078bc4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, read>;
+
+fn textureLoad_078bc4() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_078bc4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_078bc4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_078bc4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl
new file mode 100644
index 0000000..2f7d1de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_10db82() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_10db82();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_10db82();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_10db82();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c49c1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_10db82() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_10db82();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_10db82();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6c49c1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_10db82() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_10db82();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_10db82();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.glsl
new file mode 100644
index 0000000..b8e64fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_10db82();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_10db82();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_10db82() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_10db82();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.msl
new file mode 100644
index 0000000..2feaa12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_10db82(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_10db82(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_10db82(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_10db82(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.spvasm
new file mode 100644
index 0000000..435c25f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_10db82 "textureLoad_10db82"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_10db82 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_10db82
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_10db82
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_10db82
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3b1054
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/10db82.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_10db82() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_10db82();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_10db82();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_10db82();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl
new file mode 100644
index 0000000..17fdf96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_127e12() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_127e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_127e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_127e12();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..06c81a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_127e12() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_127e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_127e12();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06c81a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_127e12() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_127e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_127e12();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.glsl
new file mode 100644
index 0000000..5f83106
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_127e12();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_127e12();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_127e12() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_127e12();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.msl
new file mode 100644
index 0000000..6577dd7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_127e12(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_127e12(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_127e12(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_127e12(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.spvasm
new file mode 100644
index 0000000..272d5be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_127e12 "textureLoad_127e12"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_127e12 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpCompositeConstruct %v3int %28 %29 %int_1
+         %21 = OpImageRead %v4uint %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_127e12
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_127e12
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_127e12
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.wgsl
new file mode 100644
index 0000000..deafb34
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/127e12.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_127e12() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_127e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_127e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_127e12();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl
new file mode 100644
index 0000000..5470bd6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_13d539() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13d539();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13d539();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13d539();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..64de678
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13d539() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13d539();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13d539();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..64de678
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13d539() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13d539();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13d539();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.glsl
new file mode 100644
index 0000000..1a9e2d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_13d539();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_13d539();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_13d539() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_13d539();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.msl
new file mode 100644
index 0000000..0ef47d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_13d539(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_13d539(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_13d539(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_13d539(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.spvasm
new file mode 100644
index 0000000..1c4be30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_13d539 "textureLoad_13d539"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_13d539 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %28 %29 %30
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_13d539
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_13d539
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_13d539
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.wgsl
new file mode 100644
index 0000000..15b864e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13d539.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_13d539() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13d539();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13d539();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13d539();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl
new file mode 100644
index 0000000..cf9963e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_13e90c() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13e90c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13e90c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13e90c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ea49527
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13e90c() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13e90c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13e90c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ea49527
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_13e90c() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_13e90c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_13e90c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.glsl
new file mode 100644
index 0000000..373c78f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_13e90c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_13e90c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_13e90c() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_13e90c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.msl
new file mode 100644
index 0000000..6a6ec4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_13e90c(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_13e90c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_13e90c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_13e90c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.spvasm
new file mode 100644
index 0000000..a63b847
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_13e90c "textureLoad_13e90c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_13e90c = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_13e90c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.wgsl
new file mode 100644
index 0000000..800863b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/13e90c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_13e90c() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_13e90c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_13e90c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_13e90c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl
new file mode 100644
index 0000000..f2c177a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_143d84() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_143d84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_143d84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_143d84();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fcb8e9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_143d84() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_143d84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_143d84();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fcb8e9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_143d84() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_143d84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_143d84();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.glsl
new file mode 100644
index 0000000..ea3c5be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_143d84();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_143d84();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_143d84() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_143d84();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.msl
new file mode 100644
index 0000000..2d40806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_143d84(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_143d84(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_143d84(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_143d84(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.spvasm
new file mode 100644
index 0000000..de775ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_143d84 "textureLoad_143d84"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_143d84 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_143d84
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_143d84
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_143d84
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.wgsl
new file mode 100644
index 0000000..2b6184d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/143d84.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_143d84() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_143d84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_143d84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_143d84();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl
new file mode 100644
index 0000000..7b8db83
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_1471b8() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1471b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1471b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1471b8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a932a22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1471b8() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1471b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1471b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a932a22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1471b8() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1471b8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1471b8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.glsl
new file mode 100644
index 0000000..25dde30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1471b8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1471b8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1471b8() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1471b8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.msl
new file mode 100644
index 0000000..a75df3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1471b8(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_1471b8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1471b8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1471b8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.spvasm
new file mode 100644
index 0000000..908f75b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1471b8 "textureLoad_1471b8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1471b8 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %28 %29 %30
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_1471b8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.wgsl
new file mode 100644
index 0000000..3690cf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1471b8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_1471b8() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1471b8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1471b8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1471b8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl
new file mode 100644
index 0000000..1e598e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_1561a7() {
+  var res: vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1561a7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1561a7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1561a7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0bebab8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1561a7() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1561a7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1561a7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0bebab8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1561a7() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1561a7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1561a7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.glsl
new file mode 100644
index 0000000..3887c68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1561a7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1561a7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1561a7() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1561a7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.msl
new file mode 100644
index 0000000..176d2a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1561a7(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_1561a7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1561a7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1561a7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.spvasm
new file mode 100644
index 0000000..b299bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1561a7 "textureLoad_1561a7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %27 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1561a7 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %31 = OpLoad %v4uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_1561a7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd2a4c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1561a7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, read>;
+
+fn textureLoad_1561a7() {
+  var res : vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1561a7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1561a7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1561a7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl
new file mode 100644
index 0000000..efee2dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_15e675() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_15e675();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_15e675();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_15e675();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..88d4b09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_15e675() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_15e675();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_15e675();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88d4b09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_15e675() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_15e675();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_15e675();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.glsl
new file mode 100644
index 0000000..11eb6fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_15e675();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_15e675();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_15e675() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_15e675();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.msl
new file mode 100644
index 0000000..22b76e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_15e675(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_15e675(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_15e675(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_15e675(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.spvasm
new file mode 100644
index 0000000..54a41eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_15e675 "textureLoad_15e675"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_15e675 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %27 %28 %29
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_15e675
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_15e675
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_15e675
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.wgsl
new file mode 100644
index 0000000..ea5a2c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/15e675.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_15e675() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_15e675();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_15e675();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_15e675();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl
new file mode 100644
index 0000000..7ed9d04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_18ac11() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_18ac11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_18ac11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_18ac11();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2920875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_18ac11() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_18ac11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_18ac11();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2920875
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_18ac11() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_18ac11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_18ac11();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.glsl
new file mode 100644
index 0000000..351ba18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_18ac11();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_18ac11();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_18ac11() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_18ac11();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.msl
new file mode 100644
index 0000000..28ca0e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_18ac11(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_18ac11(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_18ac11(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_18ac11(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.spvasm
new file mode 100644
index 0000000..40c5685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_18ac11 "textureLoad_18ac11"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_18ac11 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %uint_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_18ac11
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a563ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/18ac11.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, read>;
+
+fn textureLoad_18ac11() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_18ac11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_18ac11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_18ac11();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl
new file mode 100644
index 0000000..f1617c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_1a062f() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a062f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a062f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a062f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69012df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a062f() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a062f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a062f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69012df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a062f() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a062f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a062f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.glsl
new file mode 100644
index 0000000..c8f66c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1a062f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1a062f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1a062f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1a062f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.msl
new file mode 100644
index 0000000..d2ed40f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1a062f(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_1a062f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1a062f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1a062f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.spvasm
new file mode 100644
index 0000000..464a46a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1a062f "textureLoad_1a062f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1a062f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_1a062f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.wgsl
new file mode 100644
index 0000000..782fd87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a062f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_1a062f() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a062f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a062f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a062f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl
new file mode 100644
index 0000000..7d8be84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_1a8452() {
+  var res: vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a8452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a8452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a8452();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c047a88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a8452() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a8452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a8452();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c047a88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1a8452() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1a8452();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1a8452();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.glsl
new file mode 100644
index 0000000..320053b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1a8452();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1a8452();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_1a8452() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1a8452();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.msl
new file mode 100644
index 0000000..9325bda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1a8452(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_1a8452(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1a8452(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1a8452(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.spvasm
new file mode 100644
index 0000000..6efe517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1a8452 "textureLoad_1a8452"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %27 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1a8452 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %31 = OpLoad %v4uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_1a8452
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.wgsl
new file mode 100644
index 0000000..cd60816
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1a8452.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, read>;
+
+fn textureLoad_1a8452() {
+  var res : vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1a8452();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1a8452();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1a8452();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl
new file mode 100644
index 0000000..707afcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_1aa950() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1aa950();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1aa950();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1aa950();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0ec266d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1aa950() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1aa950();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1aa950();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0ec266d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1aa950() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1aa950();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1aa950();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.glsl
new file mode 100644
index 0000000..c798b05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1aa950();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1aa950();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_1aa950() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1aa950();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.msl
new file mode 100644
index 0000000..357aec1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1aa950(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_1aa950(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1aa950(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1aa950(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.spvasm
new file mode 100644
index 0000000..bda6faa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1aa950 "textureLoad_1aa950"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1aa950 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %27 %28 %29
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_1aa950
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.wgsl
new file mode 100644
index 0000000..9e4e24a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1aa950.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_1aa950() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1aa950();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1aa950();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1aa950();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl
new file mode 100644
index 0000000..b33b03ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_1eb93f() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1eb93f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1eb93f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1eb93f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ff2f62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1eb93f() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1eb93f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1eb93f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ff2f62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_1eb93f() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_1eb93f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_1eb93f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.glsl
new file mode 100644
index 0000000..e055011
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_1eb93f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_1eb93f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_1eb93f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_1eb93f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.msl
new file mode 100644
index 0000000..bdc370a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_1eb93f(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_1eb93f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_1eb93f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_1eb93f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.spvasm
new file mode 100644
index 0000000..8fd23b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_1eb93f "textureLoad_1eb93f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_1eb93f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_1eb93f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.wgsl
new file mode 100644
index 0000000..30de273
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/1eb93f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, read>;
+
+fn textureLoad_1eb93f() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_1eb93f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_1eb93f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_1eb93f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl
new file mode 100644
index 0000000..794e3e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_206a08() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_206a08();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_206a08();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_206a08();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..12745b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_206a08() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_206a08();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_206a08();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..12745b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_206a08() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_206a08();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_206a08();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.glsl
new file mode 100644
index 0000000..85eb20d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_206a08();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_206a08();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_206a08() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_206a08();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.msl
new file mode 100644
index 0000000..0fbf998
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_206a08(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_206a08(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_206a08(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_206a08(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.spvasm
new file mode 100644
index 0000000..12d91d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_206a08 "textureLoad_206a08"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_206a08 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %uint_1
+               OpStore %res %21
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %30 = OpLoad %v4uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_206a08
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_206a08
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_206a08
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.wgsl
new file mode 100644
index 0000000..37dcb5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/206a08.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, read>;
+
+fn textureLoad_206a08() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_206a08();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_206a08();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_206a08();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl
new file mode 100644
index 0000000..15ac7cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_20fa2f() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_20fa2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_20fa2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_20fa2f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ab0be3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_20fa2f() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_20fa2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_20fa2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ab0be3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_20fa2f() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_20fa2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_20fa2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.glsl
new file mode 100644
index 0000000..150db65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_20fa2f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_20fa2f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_20fa2f() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_20fa2f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.msl
new file mode 100644
index 0000000..479a408
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_20fa2f(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_20fa2f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_20fa2f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_20fa2f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e41749
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_20fa2f "textureLoad_20fa2f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_20fa2f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_20fa2f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.wgsl
new file mode 100644
index 0000000..db1149f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/20fa2f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_20fa2f() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_20fa2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_20fa2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_20fa2f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl
new file mode 100644
index 0000000..439d535
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_22e963() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_22e963();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_22e963();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_22e963();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a1b8314
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_22e963() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_22e963();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_22e963();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a1b8314
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_22e963() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_22e963();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_22e963();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.glsl
new file mode 100644
index 0000000..442be85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_22e963();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_22e963();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_22e963() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_22e963();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.msl
new file mode 100644
index 0000000..0b16d81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_22e963(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_22e963(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_22e963(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_22e963(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.spvasm
new file mode 100644
index 0000000..d2b5210
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_22e963 "textureLoad_22e963"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_22e963 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpCompositeConstruct %v3uint %27 %28 %uint_1
+         %21 = OpImageRead %v4uint %22 %29
+               OpStore %res %21
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_22e963
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_22e963
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_22e963
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.wgsl
new file mode 100644
index 0000000..a93698f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/22e963.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_22e963() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_22e963();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_22e963();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_22e963();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl
new file mode 100644
index 0000000..982d576
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_23007a() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23007a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23007a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23007a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..864c8f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23007a() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23007a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23007a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..864c8f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23007a() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23007a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23007a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.glsl
new file mode 100644
index 0000000..31d35d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_23007a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_23007a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_23007a() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_23007a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.msl
new file mode 100644
index 0000000..3a2f4aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_23007a(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_23007a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_23007a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_23007a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.spvasm
new file mode 100644
index 0000000..a0bf8392
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_23007a "textureLoad_23007a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_23007a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_23007a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_23007a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_23007a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.wgsl
new file mode 100644
index 0000000..3240cbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23007a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_23007a() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23007a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23007a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23007a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl
new file mode 100644
index 0000000..0c23892
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_23ff89() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23ff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23ff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23ff89();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..21459f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23ff89() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23ff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23ff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..21459f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_23ff89() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_23ff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_23ff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.glsl
new file mode 100644
index 0000000..45d8a92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_23ff89();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_23ff89();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_23ff89() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_23ff89();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.msl
new file mode 100644
index 0000000..251c1ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_23ff89(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_23ff89(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_23ff89(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_23ff89(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.spvasm
new file mode 100644
index 0000000..8eb8570
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_23ff89 "textureLoad_23ff89"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_23ff89 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpCompositeConstruct %v3uint %27 %28 %uint_1
+         %21 = OpImageRead %v4uint %22 %29
+               OpStore %res %21
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_23ff89
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.wgsl
new file mode 100644
index 0000000..84de075
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/23ff89.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_23ff89() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_23ff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_23ff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_23ff89();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl
new file mode 100644
index 0000000..de3575a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<bgra8unorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_26c4f8() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26c4f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26c4f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26c4f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2c67ac1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26c4f8() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26c4f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26c4f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2c67ac1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26c4f8() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26c4f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26c4f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.glsl
new file mode 100644
index 0000000..e7e4c2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_26c4f8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_26c4f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_26c4f8() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_26c4f8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.msl
new file mode 100644
index 0000000..e69da24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_26c4f8(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_26c4f8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_26c4f8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_26c4f8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcdae0e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_26c4f8 "textureLoad_26c4f8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_26c4f8 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_26c4f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..60d2146
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26c4f8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<bgra8unorm, read>;
+
+fn textureLoad_26c4f8() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26c4f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26c4f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26c4f8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl
new file mode 100644
index 0000000..68d2444
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_26d7f1() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26d7f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26d7f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26d7f1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6ec59b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26d7f1() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26d7f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26d7f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ec59b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_26d7f1() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_26d7f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_26d7f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.glsl
new file mode 100644
index 0000000..4545b1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_26d7f1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_26d7f1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_26d7f1() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_26d7f1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.msl
new file mode 100644
index 0000000..b138581
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_26d7f1(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_26d7f1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_26d7f1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_26d7f1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f26e14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_26d7f1 "textureLoad_26d7f1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_26d7f1 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %27 %28 %29
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_26d7f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..4417e03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/26d7f1.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_26d7f1() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_26d7f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_26d7f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_26d7f1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl
new file mode 100644
index 0000000..af4fb81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_276a2c() {
+  var res: vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_276a2c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_276a2c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_276a2c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9bc3e1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_276a2c() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_276a2c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_276a2c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9bc3e1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_276a2c() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_276a2c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_276a2c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.glsl
new file mode 100644
index 0000000..f9e4141
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_276a2c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_276a2c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_276a2c() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_276a2c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.msl
new file mode 100644
index 0000000..e8944bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_276a2c(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_276a2c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_276a2c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_276a2c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.spvasm
new file mode 100644
index 0000000..63113c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_276a2c "textureLoad_276a2c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %27 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_276a2c = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %31 = OpLoad %v4uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_276a2c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.wgsl
new file mode 100644
index 0000000..8bf3d6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/276a2c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, read>;
+
+fn textureLoad_276a2c() {
+  var res : vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_276a2c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_276a2c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_276a2c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl
new file mode 100644
index 0000000..6c960ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_2887d7() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2887d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2887d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2887d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7a3a6f65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2887d7() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2887d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2887d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a3a6f65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2887d7() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2887d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2887d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.glsl
new file mode 100644
index 0000000..334da2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2887d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2887d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2887d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2887d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.msl
new file mode 100644
index 0000000..7bd271e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2887d7(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_2887d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2887d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2887d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc9698d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2887d7 "textureLoad_2887d7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2887d7 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_2887d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..de4e07d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2887d7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, read>;
+
+fn textureLoad_2887d7() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2887d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2887d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2887d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl
new file mode 100644
index 0000000..c893350
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_2a82d9() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2a82d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2a82d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2a82d9();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5dfda19
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2a82d9() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2a82d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2a82d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5dfda19
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2a82d9() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2a82d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2a82d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.glsl
new file mode 100644
index 0000000..0dcbebf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2a82d9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2a82d9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2a82d9() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2a82d9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.msl
new file mode 100644
index 0000000..ffabd66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2a82d9(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2a82d9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2a82d9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2a82d9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.spvasm
new file mode 100644
index 0000000..a9e5e20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2a82d9 "textureLoad_2a82d9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2a82d9 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpCompositeConstruct %v3uint %28 %29 %uint_1
+         %21 = OpImageRead %v4int %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_2a82d9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.wgsl
new file mode 100644
index 0000000..e8338df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2a82d9.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_2a82d9() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2a82d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2a82d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2a82d9();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl
new file mode 100644
index 0000000..2aaa685
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_2ae485() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2ae485();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2ae485();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2ae485();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..54ce286
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2ae485() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2ae485();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2ae485();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..54ce286
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2ae485() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2ae485();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2ae485();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.glsl
new file mode 100644
index 0000000..aa28e3a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2ae485();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2ae485();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2ae485() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2ae485();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.msl
new file mode 100644
index 0000000..03799f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2ae485(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2ae485(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2ae485(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2ae485(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.spvasm
new file mode 100644
index 0000000..ba0547e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2ae485 "textureLoad_2ae485"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2ae485 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_2ae485
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.wgsl
new file mode 100644
index 0000000..86d9981
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2ae485.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, read>;
+
+fn textureLoad_2ae485() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2ae485();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2ae485();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2ae485();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl
new file mode 100644
index 0000000..50f7285
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_2c72ae() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2c72ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2c72ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2c72ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..323886b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2c72ae() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2c72ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2c72ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..323886b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2c72ae() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2c72ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2c72ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.glsl
new file mode 100644
index 0000000..d9a6320
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2c72ae();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2c72ae();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2c72ae() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2c72ae();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.msl
new file mode 100644
index 0000000..1e5f759
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2c72ae(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2c72ae(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2c72ae(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2c72ae(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.spvasm
new file mode 100644
index 0000000..f042b3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2c72ae "textureLoad_2c72ae"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2c72ae = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_2c72ae
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.wgsl
new file mode 100644
index 0000000..b026db6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2c72ae.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, read>;
+
+fn textureLoad_2c72ae() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2c72ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2c72ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2c72ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl
new file mode 100644
index 0000000..4b222c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_2d6cf7() {
+  var res: vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2d6cf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2d6cf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..36c1b20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2d6cf7() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2d6cf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2d6cf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..36c1b20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2d6cf7() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2d6cf7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2d6cf7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.glsl
new file mode 100644
index 0000000..1e53d85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2d6cf7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_2d6cf7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2d6cf7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.msl
new file mode 100644
index 0000000..1c8f337
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2d6cf7(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_2d6cf7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2d6cf7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2d6cf7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.spvasm
new file mode 100644
index 0000000..0654f62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2d6cf7 "textureLoad_2d6cf7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2d6cf7 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_2d6cf7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.wgsl
new file mode 100644
index 0000000..cc6ca98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2d6cf7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, read>;
+
+fn textureLoad_2d6cf7() {
+  var res : vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2d6cf7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2d6cf7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2d6cf7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl
new file mode 100644
index 0000000..eb0237b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_2e3552() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e3552();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e3552();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e3552();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7d247b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2e3552() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e3552();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e3552();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7d247b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_2e3552() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_2e3552();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_2e3552();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.glsl
new file mode 100644
index 0000000..221f340
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_2e3552();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_2e3552();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_2e3552() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_2e3552();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.msl
new file mode 100644
index 0000000..1ad1ad8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_2e3552(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_2e3552(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_2e3552(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_2e3552(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.spvasm
new file mode 100644
index 0000000..68eeb82
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_2e3552 "textureLoad_2e3552"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_2e3552 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_2e3552
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.wgsl
new file mode 100644
index 0000000..8f20f29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/2e3552.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_2e3552() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_2e3552();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_2e3552();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_2e3552();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl
new file mode 100644
index 0000000..3f85130
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_313c73() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_313c73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_313c73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_313c73();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ab6a00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_313c73() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_313c73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_313c73();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ab6a00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_313c73() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_313c73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_313c73();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.glsl
new file mode 100644
index 0000000..0533063
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_313c73();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_313c73();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_313c73() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_313c73();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.msl
new file mode 100644
index 0000000..326f7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_313c73(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_313c73(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_313c73(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_313c73(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.spvasm
new file mode 100644
index 0000000..eb9452b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_313c73 "textureLoad_313c73"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_313c73 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpCompositeConstruct %v3uint %28 %29 %uint_1
+         %21 = OpImageRead %v4int %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_313c73
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_313c73
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_313c73
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.wgsl
new file mode 100644
index 0000000..38a374e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/313c73.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_313c73() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_313c73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_313c73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_313c73();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl
new file mode 100644
index 0000000..9dc912e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_31db4b() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_31db4b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_31db4b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_31db4b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..740f810
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_31db4b() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_31db4b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_31db4b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..740f810
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_31db4b() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_31db4b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_31db4b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.glsl
new file mode 100644
index 0000000..45ac5d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_31db4b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_31db4b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_31db4b() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_31db4b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.msl
new file mode 100644
index 0000000..82e9174
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_31db4b(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_31db4b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_31db4b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_31db4b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ac3cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_31db4b "textureLoad_31db4b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_31db4b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %uint_1
+               OpStore %res %21
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %30 = OpLoad %v4uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_31db4b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.wgsl
new file mode 100644
index 0000000..e509cdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/31db4b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, read>;
+
+fn textureLoad_31db4b() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_31db4b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_31db4b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_31db4b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl
new file mode 100644
index 0000000..3fe9ddb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_321210() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_321210();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_321210();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_321210();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3c23f84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_321210() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_321210();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_321210();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3c23f84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_321210() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_321210();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_321210();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.glsl
new file mode 100644
index 0000000..c4520d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_321210();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_321210();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_321210() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_321210();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.msl
new file mode 100644
index 0000000..cbb6a41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_321210(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_321210(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_321210(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_321210(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.spvasm
new file mode 100644
index 0000000..a207342
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_321210 "textureLoad_321210"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_321210 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %28 %29 %30
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_321210
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_321210
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_321210
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.wgsl
new file mode 100644
index 0000000..ce339b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/321210.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_321210() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_321210();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_321210();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_321210();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl
new file mode 100644
index 0000000..1628e37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_33d3aa() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_33d3aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_33d3aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_33d3aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..05f6c4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_33d3aa() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_33d3aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_33d3aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..05f6c4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_33d3aa() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_33d3aa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_33d3aa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.glsl
new file mode 100644
index 0000000..bfcc1f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_33d3aa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_33d3aa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_33d3aa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_33d3aa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.msl
new file mode 100644
index 0000000..ca0976d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_33d3aa(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_33d3aa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_33d3aa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_33d3aa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.spvasm
new file mode 100644
index 0000000..1baa07b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_33d3aa "textureLoad_33d3aa"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_33d3aa = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %uint_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_33d3aa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.wgsl
new file mode 100644
index 0000000..64140ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/33d3aa.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, read>;
+
+fn textureLoad_33d3aa() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_33d3aa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_33d3aa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_33d3aa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl
new file mode 100644
index 0000000..3353509
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_348827() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_348827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_348827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_348827();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b1f213
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_348827() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_348827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_348827();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b1f213
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_348827() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_348827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_348827();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.glsl
new file mode 100644
index 0000000..1ec80f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_348827();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_348827();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_348827() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_348827();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.msl
new file mode 100644
index 0000000..3e393f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_348827(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_348827(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_348827(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_348827(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.spvasm
new file mode 100644
index 0000000..47c9077
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_348827 "textureLoad_348827"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_348827 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpCompositeConstruct %v3uint %27 %28 %uint_1
+         %21 = OpImageRead %v4uint %22 %29
+               OpStore %res %21
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_348827
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_348827
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_348827
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe44e7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/348827.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_348827() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_348827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_348827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_348827();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl
new file mode 100644
index 0000000..2fdedd6b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_374351() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_374351();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_374351();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_374351();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..89e41fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_374351() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_374351();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_374351();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89e41fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_374351() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_374351();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_374351();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.glsl
new file mode 100644
index 0000000..355dfbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_374351();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_374351();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_374351() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_374351();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.msl
new file mode 100644
index 0000000..a1be918
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_374351(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_374351(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_374351(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_374351(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.spvasm
new file mode 100644
index 0000000..4c12e2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_374351 "textureLoad_374351"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_374351 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_374351
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_374351
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_374351
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.wgsl
new file mode 100644
index 0000000..fd8dfd6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/374351.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, read>;
+
+fn textureLoad_374351() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_374351();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_374351();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_374351();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl
new file mode 100644
index 0000000..8e84e52
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8snorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_388688() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_388688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_388688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_388688();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..57346ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_388688() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_388688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_388688();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..57346ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_388688() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_388688();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_388688();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.glsl
new file mode 100644
index 0000000..14c8d00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_388688();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_388688();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_388688() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_388688();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.msl
new file mode 100644
index 0000000..0a079ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_388688(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_388688(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_388688(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_388688(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.spvasm
new file mode 100644
index 0000000..64b6dd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_388688 "textureLoad_388688"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_388688 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_388688
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_388688
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_388688
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.wgsl
new file mode 100644
index 0000000..7f0ee00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/388688.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, read>;
+
+fn textureLoad_388688() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_388688();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_388688();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_388688();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl
new file mode 100644
index 0000000..a99cf43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_39ef40() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_39ef40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_39ef40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_39ef40();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1cf7871
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_39ef40() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_39ef40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_39ef40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cf7871
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_39ef40() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_39ef40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_39ef40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.glsl
new file mode 100644
index 0000000..14f44b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_39ef40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_39ef40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_39ef40() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_39ef40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.msl
new file mode 100644
index 0000000..acdef4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_39ef40(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_39ef40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_39ef40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_39ef40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.spvasm
new file mode 100644
index 0000000..4f298ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_39ef40 "textureLoad_39ef40"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_39ef40 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_39ef40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.wgsl
new file mode 100644
index 0000000..d51c5e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/39ef40.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, read>;
+
+fn textureLoad_39ef40() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_39ef40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_39ef40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_39ef40();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl
new file mode 100644
index 0000000..dffb3b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_3c0d9e() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c0d9e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c0d9e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7e517ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c0d9e() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c0d9e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c0d9e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7e517ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c0d9e() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c0d9e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c0d9e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.glsl
new file mode 100644
index 0000000..f4e5449
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3c0d9e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_3c0d9e() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3c0d9e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.msl
new file mode 100644
index 0000000..e6f900d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3c0d9e(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_3c0d9e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3c0d9e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3c0d9e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.spvasm
new file mode 100644
index 0000000..87d4e8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3c0d9e "textureLoad_3c0d9e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3c0d9e = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_3c0d9e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ead483
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c0d9e.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, read>;
+
+fn textureLoad_3c0d9e() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c0d9e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c0d9e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c0d9e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl
new file mode 100644
index 0000000..24e9c57
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8unorm, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_3c9587() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c9587();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c9587();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c9587();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5086930
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c9587() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c9587();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c9587();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5086930
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3c9587() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3c9587();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3c9587();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.glsl
new file mode 100644
index 0000000..d683a8e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3c9587();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3c9587();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3c9587() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3c9587();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.msl
new file mode 100644
index 0000000..77b650c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3c9587(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3c9587(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3c9587(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3c9587(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc4d785
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3c9587 "textureLoad_3c9587"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3c9587 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_3c9587
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.wgsl
new file mode 100644
index 0000000..bc328fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3c9587.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, read>;
+
+fn textureLoad_3c9587() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3c9587();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3c9587();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3c9587();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl
new file mode 100644
index 0000000..111a412
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_3d001b() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d001b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d001b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d001b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1741689
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d001b() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d001b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d001b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1741689
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d001b() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d001b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d001b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.glsl
new file mode 100644
index 0000000..826a83e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3d001b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3d001b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_3d001b() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3d001b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.msl
new file mode 100644
index 0000000..cbaf3ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3d001b(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_3d001b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3d001b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3d001b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.spvasm
new file mode 100644
index 0000000..25f45c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3d001b "textureLoad_3d001b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3d001b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_3d001b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.wgsl
new file mode 100644
index 0000000..b4f6b4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d001b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, read>;
+
+fn textureLoad_3d001b() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d001b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d001b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d001b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl
new file mode 100644
index 0000000..a05597e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_3d9c90() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d9c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d9c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d9c90();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fdffb7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d9c90() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d9c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d9c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fdffb7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3d9c90() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3d9c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3d9c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.glsl
new file mode 100644
index 0000000..b95558d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3d9c90();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3d9c90();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3d9c90() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3d9c90();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.msl
new file mode 100644
index 0000000..00a3bff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3d9c90(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3d9c90(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3d9c90(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3d9c90(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.spvasm
new file mode 100644
index 0000000..879ab99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3d9c90 "textureLoad_3d9c90"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3d9c90 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_3d9c90
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbe5562
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3d9c90.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, read>;
+
+fn textureLoad_3d9c90() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3d9c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3d9c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3d9c90();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl
new file mode 100644
index 0000000..2f0e576
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_3e5f6a() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3e5f6a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3e5f6a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1923534
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3e5f6a() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3e5f6a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3e5f6a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1923534
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_3e5f6a() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_3e5f6a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_3e5f6a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.glsl
new file mode 100644
index 0000000..bfb571a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_3e5f6a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_3e5f6a() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_3e5f6a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.msl
new file mode 100644
index 0000000..1354069
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_3e5f6a(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_3e5f6a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_3e5f6a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_3e5f6a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.spvasm
new file mode 100644
index 0000000..8d1d59d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_3e5f6a "textureLoad_3e5f6a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_3e5f6a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_3e5f6a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.wgsl
new file mode 100644
index 0000000..131e5a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/3e5f6a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, read>;
+
+fn textureLoad_3e5f6a() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_3e5f6a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_3e5f6a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_3e5f6a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl
new file mode 100644
index 0000000..078feb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_44c826() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_44c826();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_44c826();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_44c826();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8bdfbc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_44c826() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_44c826();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_44c826();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8bdfbc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_44c826() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_44c826();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_44c826();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.glsl
new file mode 100644
index 0000000..0a0f978
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_44c826();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_44c826();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_44c826() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_44c826();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.msl
new file mode 100644
index 0000000..faa3cd4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_44c826(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_44c826(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_44c826(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_44c826(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.spvasm
new file mode 100644
index 0000000..625a548
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_44c826 "textureLoad_44c826"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_44c826 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %uint_1
+               OpStore %res %21
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %30 = OpLoad %v4uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_44c826
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_44c826
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_44c826
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.wgsl
new file mode 100644
index 0000000..6758c25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/44c826.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, read>;
+
+fn textureLoad_44c826() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_44c826();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_44c826();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_44c826();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl
new file mode 100644
index 0000000..7da0853
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_454347() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_454347();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_454347();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_454347();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ee19170
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_454347() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_454347();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_454347();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ee19170
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_454347() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_454347();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_454347();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.glsl
new file mode 100644
index 0000000..e1e9c75
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_454347();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_454347();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_454347() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_454347();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.msl
new file mode 100644
index 0000000..924d40e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_454347(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_454347(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_454347(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_454347(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.spvasm
new file mode 100644
index 0000000..90ccbc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_454347 "textureLoad_454347"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_454347 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %uint_1
+               OpStore %res %21
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %30 = OpLoad %v4uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_454347
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_454347
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_454347
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.wgsl
new file mode 100644
index 0000000..f19ab00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/454347.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, read>;
+
+fn textureLoad_454347() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_454347();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_454347();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_454347();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl
new file mode 100644
index 0000000..8be6873
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_4638a0() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4638a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4638a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4638a0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a7b0c3a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4638a0() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4638a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4638a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a7b0c3a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4638a0() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4638a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4638a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.glsl
new file mode 100644
index 0000000..97b963d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4638a0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4638a0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4638a0() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4638a0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.msl
new file mode 100644
index 0000000..c3677dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4638a0(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_4638a0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4638a0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4638a0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a8c41d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4638a0 "textureLoad_4638a0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4638a0 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %27 %28 %29
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_4638a0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.wgsl
new file mode 100644
index 0000000..4134a77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4638a0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_4638a0() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4638a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4638a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4638a0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl
new file mode 100644
index 0000000..bd85574
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8unorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_46dbf5() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_46dbf5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_46dbf5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_46dbf5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b95838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_46dbf5() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_46dbf5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_46dbf5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b95838
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_46dbf5() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_46dbf5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_46dbf5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.glsl
new file mode 100644
index 0000000..19e2587
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_46dbf5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_46dbf5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_46dbf5() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_46dbf5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.msl
new file mode 100644
index 0000000..700c128
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_46dbf5(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_46dbf5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_46dbf5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_46dbf5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.spvasm
new file mode 100644
index 0000000..6d68333
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_46dbf5 "textureLoad_46dbf5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_46dbf5 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_46dbf5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.wgsl
new file mode 100644
index 0000000..90e118a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/46dbf5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, read>;
+
+fn textureLoad_46dbf5() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_46dbf5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_46dbf5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_46dbf5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl
new file mode 100644
index 0000000..458d414
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_4c67be() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4c67be();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4c67be();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4c67be();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4aad8a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4c67be() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4c67be();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4c67be();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4aad8a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4c67be() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4c67be();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4c67be();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.glsl
new file mode 100644
index 0000000..6081051
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4c67be();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4c67be();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4c67be() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4c67be();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.msl
new file mode 100644
index 0000000..ae642b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4c67be(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_4c67be(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4c67be(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4c67be(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.spvasm
new file mode 100644
index 0000000..f363d1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4c67be "textureLoad_4c67be"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4c67be = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_4c67be
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.wgsl
new file mode 100644
index 0000000..f94599e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4c67be.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, read>;
+
+fn textureLoad_4c67be() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4c67be();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4c67be();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4c67be();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl
new file mode 100644
index 0000000..1018639
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_4cdca5() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4cdca5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4cdca5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4cdca5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..adff0a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4cdca5() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4cdca5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4cdca5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..adff0a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4cdca5() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4cdca5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4cdca5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.glsl
new file mode 100644
index 0000000..e73da3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4cdca5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4cdca5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_4cdca5() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4cdca5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.msl
new file mode 100644
index 0000000..736c016
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4cdca5(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_4cdca5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4cdca5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4cdca5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.spvasm
new file mode 100644
index 0000000..9fc4b4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4cdca5 "textureLoad_4cdca5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4cdca5 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %27 %28 %29
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_4cdca5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.wgsl
new file mode 100644
index 0000000..6993252
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4cdca5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_4cdca5() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4cdca5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4cdca5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4cdca5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl
new file mode 100644
index 0000000..be3144f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<bgra8unorm, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_4fa6ae() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4fa6ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4fa6ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1762c15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4fa6ae() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4fa6ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4fa6ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1762c15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_4fa6ae() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_4fa6ae();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_4fa6ae();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.glsl
new file mode 100644
index 0000000..654b921
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_4fa6ae();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_4fa6ae() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_4fa6ae();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.msl
new file mode 100644
index 0000000..7f8cd6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_4fa6ae(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_4fa6ae(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_4fa6ae(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_4fa6ae(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.spvasm
new file mode 100644
index 0000000..a2d9bf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_4fa6ae "textureLoad_4fa6ae"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_4fa6ae = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_4fa6ae
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.wgsl
new file mode 100644
index 0000000..1940acd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/4fa6ae.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<bgra8unorm, read>;
+
+fn textureLoad_4fa6ae() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_4fa6ae();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_4fa6ae();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_4fa6ae();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl
new file mode 100644
index 0000000..9461b16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_505aa2() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_505aa2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_505aa2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_505aa2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ea86e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_505aa2() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_505aa2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_505aa2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8ea86e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_505aa2() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_505aa2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_505aa2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.glsl
new file mode 100644
index 0000000..5f9a9a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_505aa2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_505aa2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_505aa2() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_505aa2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.msl
new file mode 100644
index 0000000..e4acb2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_505aa2(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_505aa2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_505aa2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_505aa2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.spvasm
new file mode 100644
index 0000000..b796b40
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_505aa2 "textureLoad_505aa2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_505aa2 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_505aa2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.wgsl
new file mode 100644
index 0000000..0ede798
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/505aa2.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, read>;
+
+fn textureLoad_505aa2() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_505aa2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_505aa2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_505aa2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl
new file mode 100644
index 0000000..452b367
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_50915c() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_50915c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_50915c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_50915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b2e4d3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_50915c() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_50915c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_50915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b2e4d3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_50915c() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_50915c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_50915c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.glsl
new file mode 100644
index 0000000..c0a42c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_50915c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_50915c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_50915c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_50915c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.msl
new file mode 100644
index 0000000..8fb4848
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_50915c(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_50915c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_50915c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_50915c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.spvasm
new file mode 100644
index 0000000..0c3f606
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_50915c "textureLoad_50915c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_50915c = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_50915c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_50915c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_50915c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.wgsl
new file mode 100644
index 0000000..ac33ab3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/50915c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, read>;
+
+fn textureLoad_50915c() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_50915c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_50915c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_50915c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl
new file mode 100644
index 0000000..7daa09f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8unorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_519ab5() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_519ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_519ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_519ab5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c937d97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_519ab5() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_519ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_519ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c937d97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_519ab5() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_519ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_519ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.glsl
new file mode 100644
index 0000000..2ea4b9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_519ab5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_519ab5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_519ab5() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_519ab5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.msl
new file mode 100644
index 0000000..657f2ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_519ab5(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_519ab5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_519ab5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_519ab5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.spvasm
new file mode 100644
index 0000000..72afb59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_519ab5 "textureLoad_519ab5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_519ab5 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_519ab5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.wgsl
new file mode 100644
index 0000000..11348f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/519ab5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, read>;
+
+fn textureLoad_519ab5() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_519ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_519ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_519ab5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl
new file mode 100644
index 0000000..64cf14a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_53378a() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_53378a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_53378a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_53378a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4158ae8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_53378a() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_53378a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_53378a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4158ae8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_53378a() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_53378a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_53378a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.glsl
new file mode 100644
index 0000000..be3092f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_53378a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_53378a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_53378a() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_53378a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.msl
new file mode 100644
index 0000000..9196f6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_53378a(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_53378a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_53378a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_53378a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.spvasm
new file mode 100644
index 0000000..c5e33a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_53378a "textureLoad_53378a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_53378a = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_53378a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_53378a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_53378a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.wgsl
new file mode 100644
index 0000000..d4edee9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/53378a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, read>;
+
+fn textureLoad_53378a() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_53378a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_53378a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_53378a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl
new file mode 100644
index 0000000..a311634
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<bgra8unorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_54e0ce() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_54e0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_54e0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_54e0ce();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..70ecd02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_54e0ce() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_54e0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_54e0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..70ecd02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_54e0ce() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_54e0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_54e0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.glsl
new file mode 100644
index 0000000..4f9de20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_54e0ce();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_54e0ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_54e0ce() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_54e0ce();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.msl
new file mode 100644
index 0000000..fa68f35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_54e0ce(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_54e0ce(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_54e0ce(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_54e0ce(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc1bbbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_54e0ce "textureLoad_54e0ce"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_54e0ce = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_54e0ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..daff677
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/54e0ce.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<bgra8unorm, read>;
+
+fn textureLoad_54e0ce() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_54e0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_54e0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_54e0ce();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl
new file mode 100644
index 0000000..51f4bff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_55e745() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_55e745();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_55e745();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_55e745();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8b2f92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_55e745() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_55e745();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_55e745();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8b2f92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_55e745() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_55e745();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_55e745();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.glsl
new file mode 100644
index 0000000..4f7654e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_55e745();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_55e745();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_55e745() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_55e745();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.msl
new file mode 100644
index 0000000..c0ca151
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_55e745(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_55e745(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_55e745(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_55e745(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.spvasm
new file mode 100644
index 0000000..7c53cbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_55e745 "textureLoad_55e745"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_55e745 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %28 %29 %30
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_55e745
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_55e745
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_55e745
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.wgsl
new file mode 100644
index 0000000..c4bc5fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/55e745.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_55e745() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_55e745();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_55e745();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_55e745();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl
new file mode 100644
index 0000000..0c6c615
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_560573() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_560573();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_560573();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_560573();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69f201e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_560573() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_560573();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_560573();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69f201e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_560573() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_560573();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_560573();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.glsl
new file mode 100644
index 0000000..dce3273
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_560573();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_560573();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_560573() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_560573();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.msl
new file mode 100644
index 0000000..5407ca9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_560573(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_560573(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_560573(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_560573(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.spvasm
new file mode 100644
index 0000000..0fae9cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_560573 "textureLoad_560573"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_560573 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpCompositeConstruct %v3int %27 %28 %int_1
+         %21 = OpImageRead %v4int %22 %29
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_560573
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_560573
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_560573
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd5d099
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/560573.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_560573() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_560573();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_560573();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_560573();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl
new file mode 100644
index 0000000..a6136cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_582015() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_582015();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_582015();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_582015();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a86d0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_582015() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_582015();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_582015();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a86d0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_582015() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_582015();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_582015();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.glsl
new file mode 100644
index 0000000..17013b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_582015();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_582015();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_582015() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_582015();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.msl
new file mode 100644
index 0000000..66cfc55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_582015(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_582015(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_582015(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_582015(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.spvasm
new file mode 100644
index 0000000..3617230
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_582015 "textureLoad_582015"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_582015 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpCompositeConstruct %v3int %27 %28 %int_1
+         %21 = OpImageRead %v4int %22 %29
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_582015
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_582015
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_582015
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.wgsl
new file mode 100644
index 0000000..a8e84ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/582015.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_582015() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_582015();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_582015();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_582015();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl
new file mode 100644
index 0000000..644f82f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_589eaa() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_589eaa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_589eaa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_589eaa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c952ffb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_589eaa() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_589eaa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_589eaa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c952ffb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_589eaa() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_589eaa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_589eaa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.glsl
new file mode 100644
index 0000000..4400f4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_589eaa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_589eaa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_589eaa() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_589eaa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.msl
new file mode 100644
index 0000000..ee14b43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_589eaa(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_589eaa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_589eaa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_589eaa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f685da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_589eaa "textureLoad_589eaa"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_589eaa = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_589eaa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.wgsl
new file mode 100644
index 0000000..776d29e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/589eaa.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, read>;
+
+fn textureLoad_589eaa() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_589eaa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_589eaa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_589eaa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl
new file mode 100644
index 0000000..88b6fb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_5abbf2() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5abbf2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5abbf2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5abbf2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..051320a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5abbf2() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5abbf2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5abbf2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..051320a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5abbf2() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5abbf2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5abbf2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.glsl
new file mode 100644
index 0000000..ecd500c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5abbf2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5abbf2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5abbf2() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5abbf2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.msl
new file mode 100644
index 0000000..fc33fea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5abbf2(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5abbf2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5abbf2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5abbf2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.spvasm
new file mode 100644
index 0000000..211097a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5abbf2 "textureLoad_5abbf2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5abbf2 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_5abbf2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.wgsl
new file mode 100644
index 0000000..627936b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5abbf2.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, read>;
+
+fn textureLoad_5abbf2() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5abbf2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5abbf2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5abbf2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl
new file mode 100644
index 0000000..840b385
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_5bb7fb() {
+  var res: vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5bb7fb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5bb7fb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30da94d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5bb7fb() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5bb7fb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5bb7fb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..30da94d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5bb7fb() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5bb7fb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5bb7fb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.glsl
new file mode 100644
index 0000000..603ec2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5bb7fb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5bb7fb() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5bb7fb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.msl
new file mode 100644
index 0000000..34d5ca3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5bb7fb(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5bb7fb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5bb7fb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5bb7fb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.spvasm
new file mode 100644
index 0000000..b257e1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5bb7fb "textureLoad_5bb7fb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %27 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5bb7fb = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %31 = OpLoad %v4uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_5bb7fb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ecb136
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5bb7fb.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, read>;
+
+fn textureLoad_5bb7fb() {
+  var res : vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5bb7fb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5bb7fb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5bb7fb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl
new file mode 100644
index 0000000..23b211f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_5cee3b() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5cee3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5cee3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5cee3b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3e0eb4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5cee3b() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5cee3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5cee3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3e0eb4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5cee3b() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5cee3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5cee3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.glsl
new file mode 100644
index 0000000..ce3f7f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5cee3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5cee3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5cee3b() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5cee3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.msl
new file mode 100644
index 0000000..3b1d121
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5cee3b(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5cee3b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5cee3b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5cee3b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..37b8385
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5cee3b "textureLoad_5cee3b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5cee3b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_5cee3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..3523b92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5cee3b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, read>;
+
+fn textureLoad_5cee3b() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5cee3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5cee3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5cee3b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl
new file mode 100644
index 0000000..f0335ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_5d0a2f() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d0a2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d0a2f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3b23879
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d0a2f() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d0a2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d0a2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3b23879
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d0a2f() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d0a2f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d0a2f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.glsl
new file mode 100644
index 0000000..5520304
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5d0a2f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5d0a2f() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5d0a2f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.msl
new file mode 100644
index 0000000..1a8d6a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5d0a2f(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5d0a2f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5d0a2f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5d0a2f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.spvasm
new file mode 100644
index 0000000..fcafc53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5d0a2f "textureLoad_5d0a2f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5d0a2f = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpCompositeConstruct %v3int %28 %29 %int_1
+         %21 = OpImageRead %v4uint %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_5d0a2f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.wgsl
new file mode 100644
index 0000000..c91b8c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d0a2f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_5d0a2f() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d0a2f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d0a2f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d0a2f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl
new file mode 100644
index 0000000..15777ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_5d4042() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d4042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d4042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d4042();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..743eb0c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d4042() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d4042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d4042();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..743eb0c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5d4042() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5d4042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5d4042();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.glsl
new file mode 100644
index 0000000..c35cd58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5d4042();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5d4042();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5d4042() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5d4042();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.msl
new file mode 100644
index 0000000..7559117
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5d4042(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5d4042(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5d4042(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5d4042(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7906a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5d4042 "textureLoad_5d4042"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5d4042 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_5d4042
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.wgsl
new file mode 100644
index 0000000..ec87df0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5d4042.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_5d4042() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5d4042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5d4042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5d4042();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl
new file mode 100644
index 0000000..d9f82df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_5e8d3f() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5e8d3f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5e8d3f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db5f681
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5e8d3f() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5e8d3f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5e8d3f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..db5f681
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5e8d3f() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5e8d3f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5e8d3f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.glsl
new file mode 100644
index 0000000..cc84994
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5e8d3f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_5e8d3f() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5e8d3f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.msl
new file mode 100644
index 0000000..d23bdf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5e8d3f(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_5e8d3f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5e8d3f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5e8d3f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bd6301
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5e8d3f "textureLoad_5e8d3f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5e8d3f = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_5e8d3f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.wgsl
new file mode 100644
index 0000000..54f7bdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5e8d3f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, read>;
+
+fn textureLoad_5e8d3f() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5e8d3f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5e8d3f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5e8d3f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl
new file mode 100644
index 0000000..809df2d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_5f4473() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5f4473();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5f4473();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5f4473();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1606ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5f4473() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5f4473();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5f4473();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1606ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5f4473() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5f4473();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5f4473();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.glsl
new file mode 100644
index 0000000..bc80ad3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5f4473();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5f4473();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_5f4473() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5f4473();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.msl
new file mode 100644
index 0000000..f70a9c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5f4473(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_5f4473(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5f4473(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5f4473(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.spvasm
new file mode 100644
index 0000000..cbce24e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5f4473 "textureLoad_5f4473"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5f4473 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_5f4473
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e3375c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5f4473.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, read>;
+
+fn textureLoad_5f4473() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5f4473();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5f4473();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5f4473();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl
new file mode 100644
index 0000000..db85b71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_5feb4d() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5feb4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5feb4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5feb4d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..17f1545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5feb4d() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5feb4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5feb4d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..17f1545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_5feb4d() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_5feb4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_5feb4d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.glsl
new file mode 100644
index 0000000..1ea45a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_5feb4d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_5feb4d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_5feb4d() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_5feb4d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.msl
new file mode 100644
index 0000000..2d80af5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_5feb4d(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_5feb4d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_5feb4d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_5feb4d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..8319d22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_5feb4d "textureLoad_5feb4d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_5feb4d = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_5feb4d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..4581a95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/5feb4d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, read>;
+
+fn textureLoad_5feb4d() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_5feb4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_5feb4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_5feb4d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl
new file mode 100644
index 0000000..2fb5fd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_620caa() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_620caa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_620caa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_620caa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c4cdd79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_620caa() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_620caa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_620caa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c4cdd79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_620caa() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_620caa();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_620caa();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.glsl
new file mode 100644
index 0000000..a061e25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_620caa();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_620caa();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_620caa() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_620caa();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.msl
new file mode 100644
index 0000000..00e2b6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_620caa(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_620caa(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_620caa(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_620caa(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.spvasm
new file mode 100644
index 0000000..51d9e99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_620caa "textureLoad_620caa"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_620caa = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_620caa
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_620caa
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_620caa
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.wgsl
new file mode 100644
index 0000000..4484d74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/620caa.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, read>;
+
+fn textureLoad_620caa() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_620caa();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_620caa();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_620caa();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl
new file mode 100644
index 0000000..3d8f39f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8snorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_62d125() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_62d125();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_62d125();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_62d125();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f4cf081
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_62d125() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_62d125();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_62d125();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f4cf081
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_62d125() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_62d125();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_62d125();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.glsl
new file mode 100644
index 0000000..5bfc443
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_62d125();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_62d125();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_62d125() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_62d125();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.msl
new file mode 100644
index 0000000..a2d8cea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_62d125(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_62d125(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_62d125(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_62d125(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.spvasm
new file mode 100644
index 0000000..28e1514
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_62d125 "textureLoad_62d125"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_62d125 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_62d125
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_62d125
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_62d125
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.wgsl
new file mode 100644
index 0000000..c0ee768
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/62d125.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, read>;
+
+fn textureLoad_62d125() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_62d125();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_62d125();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_62d125();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl
new file mode 100644
index 0000000..3c16d92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_63be18() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_63be18();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_63be18();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_63be18();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2c5376b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_63be18() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_63be18();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_63be18();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2c5376b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_63be18() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_63be18();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_63be18();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.glsl
new file mode 100644
index 0000000..fbff245
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_63be18();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_63be18();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_63be18() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_63be18();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.msl
new file mode 100644
index 0000000..292600f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_63be18(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_63be18(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_63be18(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_63be18(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.spvasm
new file mode 100644
index 0000000..7d56e85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_63be18 "textureLoad_63be18"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_63be18 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpCompositeConstruct %v3uint %28 %29 %uint_1
+         %21 = OpImageRead %v4int %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_63be18
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_63be18
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_63be18
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.wgsl
new file mode 100644
index 0000000..f5f6257
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/63be18.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_63be18() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_63be18();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_63be18();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_63be18();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl
new file mode 100644
index 0000000..a9f82da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_65a4d0() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_65a4d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_65a4d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_65a4d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..070aec0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_65a4d0() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_65a4d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_65a4d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..070aec0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_65a4d0() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_65a4d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_65a4d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.glsl
new file mode 100644
index 0000000..f835334
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_65a4d0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_65a4d0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_65a4d0() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_65a4d0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.msl
new file mode 100644
index 0000000..6793a56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_65a4d0(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_65a4d0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_65a4d0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_65a4d0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..495b1f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_65a4d0 "textureLoad_65a4d0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_65a4d0 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_65a4d0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..7b3cb7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/65a4d0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_65a4d0() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_65a4d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_65a4d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_65a4d0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl
new file mode 100644
index 0000000..fce3d55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_6678b6() {
+  var res: vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6678b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6678b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6678b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0841549
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6678b6() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6678b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6678b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0841549
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6678b6() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6678b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6678b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.glsl
new file mode 100644
index 0000000..608fc7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_6678b6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_6678b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_6678b6() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_6678b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.msl
new file mode 100644
index 0000000..4ac25eb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6678b6(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_6678b6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_6678b6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_6678b6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..936b887
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_6678b6 "textureLoad_6678b6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6678b6 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_6678b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..81f8f33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6678b6.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, read>;
+
+fn textureLoad_6678b6() {
+  var res : vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6678b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6678b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6678b6();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl
new file mode 100644
index 0000000..d85c3b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_67edca() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_67edca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_67edca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_67edca();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..364bad9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_67edca() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_67edca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_67edca();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..364bad9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_67edca() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_67edca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_67edca();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.glsl
new file mode 100644
index 0000000..fd631a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_67edca();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_67edca();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_67edca() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_67edca();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.msl
new file mode 100644
index 0000000..886136a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_67edca(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_67edca(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_67edca(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_67edca(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.spvasm
new file mode 100644
index 0000000..16af074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_67edca "textureLoad_67edca"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_67edca = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_67edca
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_67edca
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_67edca
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.wgsl
new file mode 100644
index 0000000..b984fff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/67edca.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, read>;
+
+fn textureLoad_67edca() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_67edca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_67edca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_67edca();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl
new file mode 100644
index 0000000..8d7a283
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_6f1750() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6f1750();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6f1750();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6f1750();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3982b10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6f1750() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6f1750();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6f1750();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3982b10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_6f1750() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_6f1750();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_6f1750();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.glsl
new file mode 100644
index 0000000..4ffc7a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_6f1750();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_6f1750();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_6f1750() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_6f1750();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.msl
new file mode 100644
index 0000000..45587d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_6f1750(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_6f1750(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_6f1750(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_6f1750(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.spvasm
new file mode 100644
index 0000000..cad9b48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_6f1750 "textureLoad_6f1750"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_6f1750 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_6f1750
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.wgsl
new file mode 100644
index 0000000..420e60f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/6f1750.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_6f1750() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_6f1750();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_6f1750();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_6f1750();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl
new file mode 100644
index 0000000..362c977
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_72bb3c() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_72bb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_72bb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_72bb3c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4a5b847
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_72bb3c() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_72bb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_72bb3c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4a5b847
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_72bb3c() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_72bb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_72bb3c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.glsl
new file mode 100644
index 0000000..ec85482
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_72bb3c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_72bb3c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_72bb3c() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_72bb3c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.msl
new file mode 100644
index 0000000..be73de2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_72bb3c(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_72bb3c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_72bb3c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_72bb3c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a95b4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_72bb3c "textureLoad_72bb3c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_72bb3c = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_72bb3c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.wgsl
new file mode 100644
index 0000000..54bc0cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/72bb3c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_72bb3c() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_72bb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_72bb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_72bb3c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl
new file mode 100644
index 0000000..e96ed31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_749704() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_749704();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_749704();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_749704();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4ce71f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_749704() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_749704();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_749704();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4ce71f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_749704() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_749704();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_749704();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.glsl
new file mode 100644
index 0000000..d4ac524
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_749704();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_749704();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_749704() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_749704();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.msl
new file mode 100644
index 0000000..ad52099
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_749704(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_749704(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_749704(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_749704(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3972bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_749704 "textureLoad_749704"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_749704 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_749704
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_749704
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_749704
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.wgsl
new file mode 100644
index 0000000..4cc8aa4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/749704.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, read>;
+
+fn textureLoad_749704() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_749704();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_749704();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_749704();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl
new file mode 100644
index 0000000..d827902
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_773c46() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_773c46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_773c46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_773c46();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3eee459
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_773c46() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_773c46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_773c46();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3eee459
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_773c46() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_773c46();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_773c46();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.glsl
new file mode 100644
index 0000000..c135048
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_773c46();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_773c46();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_773c46() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_773c46();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.msl
new file mode 100644
index 0000000..6213ed3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_773c46(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_773c46(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_773c46(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_773c46(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.spvasm
new file mode 100644
index 0000000..e389eb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_773c46 "textureLoad_773c46"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_773c46 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_773c46
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_773c46
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_773c46
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca0b0a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/773c46.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, read>;
+
+fn textureLoad_773c46() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_773c46();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_773c46();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_773c46();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl
new file mode 100644
index 0000000..0398a11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_7dab57() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7dab57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7dab57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7dab57();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae00c12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_7dab57() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7dab57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7dab57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae00c12
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_7dab57() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_7dab57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_7dab57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.glsl
new file mode 100644
index 0000000..cf68619
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_7dab57();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_7dab57();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_7dab57() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_7dab57();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.msl
new file mode 100644
index 0000000..980b415
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_7dab57(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_7dab57(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_7dab57(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_7dab57(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.spvasm
new file mode 100644
index 0000000..f89cd38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_7dab57 "textureLoad_7dab57"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_7dab57 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %28 %29 %30
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_7dab57
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.wgsl
new file mode 100644
index 0000000..915ffa9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/7dab57.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_7dab57() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_7dab57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_7dab57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_7dab57();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl
new file mode 100644
index 0000000..a6c1559
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_83162f() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83162f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83162f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83162f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3e20c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83162f() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83162f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83162f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3e20c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83162f() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83162f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83162f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.glsl
new file mode 100644
index 0000000..54ef71d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_83162f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_83162f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_83162f() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_83162f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.msl
new file mode 100644
index 0000000..8781b3f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_83162f(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_83162f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_83162f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_83162f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.spvasm
new file mode 100644
index 0000000..7539141
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_83162f "textureLoad_83162f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_83162f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_83162f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_83162f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_83162f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.wgsl
new file mode 100644
index 0000000..ac4a128
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83162f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, read>;
+
+fn textureLoad_83162f() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83162f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83162f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83162f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl
new file mode 100644
index 0000000..e58ee95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16uint, read>, coords: i32) -> vec4<u32>
+fn textureLoad_83cea4() {
+  var res: vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83cea4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83cea4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83cea4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..49f94dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83cea4() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83cea4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83cea4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..49f94dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_83cea4() {
+  uint4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_83cea4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_83cea4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.glsl
new file mode 100644
index 0000000..c2ca2fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_83cea4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_83cea4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_83cea4() {
+  uvec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_83cea4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.msl
new file mode 100644
index 0000000..f86257b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_83cea4(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_83cea4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_83cea4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_83cea4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.spvasm
new file mode 100644
index 0000000..9cc1841
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_83cea4 "textureLoad_83cea4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %27 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_83cea4 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %31 = OpLoad %v4uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_83cea4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.wgsl
new file mode 100644
index 0000000..066a33d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/83cea4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, read>;
+
+fn textureLoad_83cea4() {
+  var res : vec4<u32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_83cea4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_83cea4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_83cea4();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl
new file mode 100644
index 0000000..3315475
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32float, read>, coords: u32) -> vec4<f32>
+fn textureLoad_84c728() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84c728();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84c728();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84c728();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b9d2490
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_84c728() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84c728();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84c728();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b9d2490
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_84c728() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_84c728();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_84c728();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.glsl
new file mode 100644
index 0000000..4330581
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_84c728();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_84c728();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_84c728() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_84c728();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.msl
new file mode 100644
index 0000000..940a659
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_84c728(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_84c728(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_84c728(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_84c728(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.spvasm
new file mode 100644
index 0000000..377a143
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_84c728 "textureLoad_84c728"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_84c728 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_84c728
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_84c728
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_84c728
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.wgsl
new file mode 100644
index 0000000..1aa0a68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/84c728.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, read>;
+
+fn textureLoad_84c728() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_84c728();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_84c728();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_84c728();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl
new file mode 100644
index 0000000..42b542a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_862833() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_862833();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_862833();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_862833();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5e57af3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_862833() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_862833();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_862833();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5e57af3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_862833() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_862833();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_862833();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.glsl
new file mode 100644
index 0000000..bf9b6fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_862833();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_862833();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_862833() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_862833();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.msl
new file mode 100644
index 0000000..1c8adbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_862833(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_862833(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_862833(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_862833(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.spvasm
new file mode 100644
index 0000000..7c41f93
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_862833 "textureLoad_862833"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_862833 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_862833
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_862833
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_862833
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.wgsl
new file mode 100644
index 0000000..8dd5c6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/862833.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_862833() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_862833();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_862833();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_862833();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl
new file mode 100644
index 0000000..23068b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_89620b() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_89620b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_89620b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_89620b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38a0d9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_89620b() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_89620b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_89620b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38a0d9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_89620b() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_89620b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_89620b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.glsl
new file mode 100644
index 0000000..16ab45d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_89620b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_89620b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_89620b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_89620b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.msl
new file mode 100644
index 0000000..5ce13e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_89620b(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_89620b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_89620b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_89620b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.spvasm
new file mode 100644
index 0000000..5ab217a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_89620b "textureLoad_89620b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_89620b = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_89620b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_89620b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_89620b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.wgsl
new file mode 100644
index 0000000..659d776
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/89620b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_89620b() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_89620b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_89620b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_89620b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl
new file mode 100644
index 0000000..e9acb3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_8a291b() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a291b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a291b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a291b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b76b71f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a291b() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a291b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a291b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b76b71f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a291b() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a291b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a291b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.glsl
new file mode 100644
index 0000000..f9290f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8a291b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8a291b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8a291b() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8a291b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.msl
new file mode 100644
index 0000000..46888bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8a291b(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_8a291b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8a291b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8a291b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.spvasm
new file mode 100644
index 0000000..03d5d46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8a291b "textureLoad_8a291b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8a291b = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_8a291b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.wgsl
new file mode 100644
index 0000000..a90f203
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a291b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_8a291b() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a291b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a291b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a291b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl
new file mode 100644
index 0000000..e83fbde
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_8a9988() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a9988();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a9988();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a9988();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1cf72f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a9988() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a9988();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a9988();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1cf72f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8a9988() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8a9988();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8a9988();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.glsl
new file mode 100644
index 0000000..9e86e4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8a9988();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8a9988();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8a9988() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8a9988();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.msl
new file mode 100644
index 0000000..18e97ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8a9988(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_8a9988(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8a9988(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8a9988(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.spvasm
new file mode 100644
index 0000000..511ca18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8a9988 "textureLoad_8a9988"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8a9988 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_8a9988
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.wgsl
new file mode 100644
index 0000000..d53a4e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8a9988.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, read>;
+
+fn textureLoad_8a9988() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8a9988();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8a9988();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8a9988();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl
new file mode 100644
index 0000000..f909b9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_8db0ce() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8db0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8db0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8db0ce();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..71c7b8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8db0ce() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8db0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8db0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71c7b8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8db0ce() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8db0ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8db0ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.glsl
new file mode 100644
index 0000000..d04b85d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8db0ce();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8db0ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_8db0ce() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8db0ce();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.msl
new file mode 100644
index 0000000..7c72966
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8db0ce(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_8db0ce(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8db0ce(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8db0ce(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..a2e0bc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8db0ce "textureLoad_8db0ce"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8db0ce = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpCompositeConstruct %v3uint %28 %29 %uint_1
+         %21 = OpImageRead %v4int %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_8db0ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..8709154
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8db0ce.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_8db0ce() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8db0ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8db0ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8db0ce();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl
new file mode 100644
index 0000000..733865c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_8e5032() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8e5032();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8e5032();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8e5032();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..37ccf46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8e5032() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8e5032();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8e5032();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..37ccf46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8e5032() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8e5032();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8e5032();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.glsl
new file mode 100644
index 0000000..2028006
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8e5032();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8e5032();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_8e5032() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8e5032();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.msl
new file mode 100644
index 0000000..697916d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8e5032(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_8e5032(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8e5032(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8e5032(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea886b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8e5032 "textureLoad_8e5032"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8e5032 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpCompositeConstruct %v3int %28 %29 %int_1
+         %21 = OpImageRead %v4uint %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_8e5032
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.wgsl
new file mode 100644
index 0000000..99e50be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8e5032.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_8e5032() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8e5032();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8e5032();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8e5032();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl
new file mode 100644
index 0000000..4e767ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8snorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_8ff033() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8ff033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8ff033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8ff033();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ba8d3d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8ff033() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8ff033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8ff033();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ba8d3d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_8ff033() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_8ff033();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_8ff033();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.glsl
new file mode 100644
index 0000000..dee375e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_8ff033();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_8ff033();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_8ff033() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_8ff033();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.msl
new file mode 100644
index 0000000..cd72a1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_8ff033(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_8ff033(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_8ff033(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_8ff033(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.spvasm
new file mode 100644
index 0000000..364560d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_8ff033 "textureLoad_8ff033"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_8ff033 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_8ff033
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.wgsl
new file mode 100644
index 0000000..c90ad74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/8ff033.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, read>;
+
+fn textureLoad_8ff033() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_8ff033();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_8ff033();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_8ff033();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl
new file mode 100644
index 0000000..3d57836
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_936952() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_936952();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_936952();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_936952();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d29ec72
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_936952() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_936952();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_936952();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d29ec72
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_936952() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_936952();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_936952();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.glsl
new file mode 100644
index 0000000..eb73dab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_936952();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_936952();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_936952() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_936952();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.msl
new file mode 100644
index 0000000..598efe0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_936952(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_936952(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_936952(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_936952(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.spvasm
new file mode 100644
index 0000000..4347293
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_936952 "textureLoad_936952"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_936952 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_936952
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_936952
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_936952
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.wgsl
new file mode 100644
index 0000000..0385749
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/936952.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureLoad_936952() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_936952();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_936952();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_936952();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl
new file mode 100644
index 0000000..2bbe625
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_970308() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_970308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_970308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_970308();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e8143c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_970308() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_970308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_970308();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e8143c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_970308() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_970308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_970308();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.glsl
new file mode 100644
index 0000000..df98c63
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_970308();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_970308();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_970308() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_970308();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.msl
new file mode 100644
index 0000000..55c1341
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_970308(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_970308(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_970308(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_970308(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc1761b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_970308 "textureLoad_970308"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_970308 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %28 %29 %30
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_970308
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_970308
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_970308
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.wgsl
new file mode 100644
index 0000000..48e433a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/970308.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_970308() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_970308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_970308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_970308();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl
new file mode 100644
index 0000000..e226048
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_9a7c90() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a7c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a7c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a7c90();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4907e17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a7c90() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a7c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a7c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4907e17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a7c90() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a7c90();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a7c90();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.glsl
new file mode 100644
index 0000000..6b5a879
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9a7c90();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9a7c90();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9a7c90() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9a7c90();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.msl
new file mode 100644
index 0000000..0e4f224
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9a7c90(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_9a7c90(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9a7c90(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9a7c90(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.spvasm
new file mode 100644
index 0000000..22ab759
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9a7c90 "textureLoad_9a7c90"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9a7c90 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_9a7c90
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.wgsl
new file mode 100644
index 0000000..56559a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a7c90.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, read>;
+
+fn textureLoad_9a7c90() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a7c90();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a7c90();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a7c90();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl
new file mode 100644
index 0000000..44f0a99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<u32>, array_index: i32) -> vec4<i32>
+fn textureLoad_9a8c1e() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a8c1e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a8c1e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c22670ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a8c1e() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a8c1e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a8c1e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c22670ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9a8c1e() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9a8c1e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9a8c1e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.glsl
new file mode 100644
index 0000000..00a59d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9a8c1e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9a8c1e() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9a8c1e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.msl
new file mode 100644
index 0000000..d853e70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9a8c1e(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_9a8c1e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9a8c1e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9a8c1e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.spvasm
new file mode 100644
index 0000000..07ca32f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9a8c1e "textureLoad_9a8c1e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9a8c1e = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %28 %29 %30
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_9a8c1e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.wgsl
new file mode 100644
index 0000000..b6677a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9a8c1e.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_9a8c1e() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9a8c1e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9a8c1e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9a8c1e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl
new file mode 100644
index 0000000..ce08852
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_9b5343() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9b5343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9b5343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9b5343();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ed096ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9b5343() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9b5343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9b5343();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ed096ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9b5343() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9b5343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9b5343();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.glsl
new file mode 100644
index 0000000..f34309d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9b5343();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9b5343();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_9b5343() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9b5343();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.msl
new file mode 100644
index 0000000..2f5c378
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9b5343(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_9b5343(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9b5343(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9b5343(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e6fdb3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9b5343 "textureLoad_9b5343"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9b5343 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %27 %28 %29
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_9b5343
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1c4d47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9b5343.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureLoad_9b5343() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9b5343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9b5343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9b5343();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl
new file mode 100644
index 0000000..9341703
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_9c2376() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2376();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c1283b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2376() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2376();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c1283b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2376() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2376();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.glsl
new file mode 100644
index 0000000..dc220c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9c2376();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9c2376();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2376() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9c2376();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.msl
new file mode 100644
index 0000000..ca3a25c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9c2376(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9c2376(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9c2376(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9c2376(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.spvasm
new file mode 100644
index 0000000..5a48cec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9c2376 "textureLoad_9c2376"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9c2376 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9c2376
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.wgsl
new file mode 100644
index 0000000..c9bb370
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2376.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_9c2376() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2376();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl
new file mode 100644
index 0000000..d047d00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rg32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_9c2a14() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2a14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2a14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2a14();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d10935
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2a14() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2a14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2a14();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d10935
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9c2a14() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9c2a14();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9c2a14();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.glsl
new file mode 100644
index 0000000..f3ea9ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9c2a14();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9c2a14();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9c2a14() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9c2a14();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.msl
new file mode 100644
index 0000000..5b8e52c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9c2a14(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9c2a14(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9c2a14(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9c2a14(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.spvasm
new file mode 100644
index 0000000..ab0e736
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9c2a14 "textureLoad_9c2a14"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9c2a14 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_9c2a14
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.wgsl
new file mode 100644
index 0000000..f16a13c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9c2a14.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, read>;
+
+fn textureLoad_9c2a14() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9c2a14();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9c2a14();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9c2a14();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl
new file mode 100644
index 0000000..5b5e230
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_9cf7df() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9cf7df();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9cf7df();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9cf7df();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e311686
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9cf7df() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9cf7df();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9cf7df();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e311686
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9cf7df() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9cf7df();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9cf7df();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.glsl
new file mode 100644
index 0000000..6586e15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9cf7df();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9cf7df();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_9cf7df() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9cf7df();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.msl
new file mode 100644
index 0000000..0105c02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9cf7df(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_9cf7df(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9cf7df(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9cf7df(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.spvasm
new file mode 100644
index 0000000..ab55bff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9cf7df "textureLoad_9cf7df"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9cf7df = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %27 %28 %29
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_9cf7df
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.wgsl
new file mode 100644
index 0000000..1e3d492
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9cf7df.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_9cf7df() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9cf7df();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9cf7df();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9cf7df();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl
new file mode 100644
index 0000000..92d8702
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_9de6f5() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9de6f5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9de6f5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9de6f5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0bab0d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9de6f5() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9de6f5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9de6f5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0bab0d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_9de6f5() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_9de6f5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_9de6f5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.glsl
new file mode 100644
index 0000000..4147a5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_9de6f5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_9de6f5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_9de6f5() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_9de6f5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.msl
new file mode 100644
index 0000000..851fdc1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_9de6f5(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_9de6f5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_9de6f5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_9de6f5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.spvasm
new file mode 100644
index 0000000..c371de4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_9de6f5 "textureLoad_9de6f5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_9de6f5 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_9de6f5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.wgsl
new file mode 100644
index 0000000..5056340
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/9de6f5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_9de6f5() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_9de6f5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_9de6f5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_9de6f5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl
new file mode 100644
index 0000000..53e9f71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<i32>, array_index: u32) -> vec4<f32>
+fn textureLoad_a03af1() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a03af1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a03af1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a03af1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3a82d7f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a03af1() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a03af1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a03af1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3a82d7f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a03af1() {
+  float4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a03af1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a03af1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.glsl
new file mode 100644
index 0000000..24d53bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a03af1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a03af1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a03af1() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a03af1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.msl
new file mode 100644
index 0000000..5ab6899
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a03af1(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a03af1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a03af1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a03af1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.spvasm
new file mode 100644
index 0000000..302ce9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a03af1 "textureLoad_a03af1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a03af1 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpBitcast %int %uint_1
+         %31 = OpCompositeConstruct %v3int %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_a03af1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3a9f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a03af1.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_a03af1() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a03af1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a03af1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a03af1();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl
new file mode 100644
index 0000000..a95d503
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba8unorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_a6a85a() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6a85a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6a85a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6a85a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d8dd03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6a85a() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6a85a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6a85a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d8dd03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6a85a() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6a85a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6a85a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.glsl
new file mode 100644
index 0000000..93023c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a6a85a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a6a85a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a6a85a() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a6a85a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.msl
new file mode 100644
index 0000000..afa87c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a6a85a(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a6a85a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a6a85a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a6a85a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.spvasm
new file mode 100644
index 0000000..52090d7f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a6a85a "textureLoad_a6a85a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a6a85a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_a6a85a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.wgsl
new file mode 100644
index 0000000..4ef43a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6a85a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, read>;
+
+fn textureLoad_a6a85a() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6a85a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6a85a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6a85a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl
new file mode 100644
index 0000000..075c7cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_a6b61d() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6b61d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6b61d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6b61d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2884575
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6b61d() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6b61d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6b61d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2884575
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a6b61d() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a6b61d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a6b61d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.glsl
new file mode 100644
index 0000000..72a20ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a6b61d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a6b61d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a6b61d() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a6b61d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.msl
new file mode 100644
index 0000000..783ac05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a6b61d(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_a6b61d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a6b61d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a6b61d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.spvasm
new file mode 100644
index 0000000..c250136
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a6b61d "textureLoad_a6b61d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a6b61d = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpCompositeConstruct %v3int %27 %28 %int_1
+         %21 = OpImageRead %v4int %22 %29
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_a6b61d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d5cd04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a6b61d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureLoad_a6b61d() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a6b61d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a6b61d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a6b61d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl
new file mode 100644
index 0000000..a5fb98b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_a7444c() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7444c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7444c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7444c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e21b6bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7444c() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7444c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7444c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e21b6bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7444c() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7444c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7444c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.glsl
new file mode 100644
index 0000000..cdf51a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a7444c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a7444c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_a7444c() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a7444c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.msl
new file mode 100644
index 0000000..183cf81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a7444c(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_a7444c(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a7444c(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a7444c(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.spvasm
new file mode 100644
index 0000000..c893c42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.spvasm
@@ -0,0 +1,97 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a7444c "textureLoad_a7444c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a7444c = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpCompositeConstruct %v3uint %27 %28 %uint_1
+         %21 = OpImageRead %v4uint %22 %29
+               OpStore %res %21
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_a7444c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.wgsl
new file mode 100644
index 0000000..31d2017
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7444c.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_a7444c() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7444c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7444c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7444c();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl
new file mode 100644
index 0000000..0b7305f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_a7a3c3() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7a3c3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7a3c3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ffcb3f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7a3c3() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7a3c3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7a3c3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ffcb3f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a7a3c3() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a7a3c3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a7a3c3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.glsl
new file mode 100644
index 0000000..0419209
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a7a3c3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_a7a3c3() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a7a3c3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.msl
new file mode 100644
index 0000000..cea66d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a7a3c3(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_a7a3c3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a7a3c3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a7a3c3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.spvasm
new file mode 100644
index 0000000..3745304
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a7a3c3 "textureLoad_a7a3c3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a7a3c3 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_a7a3c3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.wgsl
new file mode 100644
index 0000000..09b40d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a7a3c3.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, read>;
+
+fn textureLoad_a7a3c3() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a7a3c3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a7a3c3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a7a3c3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl
new file mode 100644
index 0000000..4802fc0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_a8549b() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a8549b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a8549b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a8549b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf62eca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a8549b() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a8549b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a8549b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf62eca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_a8549b() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_a8549b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_a8549b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.glsl
new file mode 100644
index 0000000..9450309
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_a8549b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_a8549b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_a8549b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_a8549b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.msl
new file mode 100644
index 0000000..320e53b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_a8549b(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_a8549b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_a8549b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_a8549b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.spvasm
new file mode 100644
index 0000000..50e205b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_a8549b "textureLoad_a8549b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_a8549b = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_a8549b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.wgsl
new file mode 100644
index 0000000..2169aa6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/a8549b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, read>;
+
+fn textureLoad_a8549b() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_a8549b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_a8549b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_a8549b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl
new file mode 100644
index 0000000..a9afa7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_aa8a0d() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aa8a0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aa8a0d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f6c0da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aa8a0d() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aa8a0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aa8a0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f6c0da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aa8a0d() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aa8a0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aa8a0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.glsl
new file mode 100644
index 0000000..36b0a6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aa8a0d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aa8a0d() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aa8a0d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.msl
new file mode 100644
index 0000000..da1e465
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aa8a0d(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aa8a0d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aa8a0d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aa8a0d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.spvasm
new file mode 100644
index 0000000..1eb2d10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aa8a0d "textureLoad_aa8a0d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aa8a0d = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_aa8a0d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b87be4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aa8a0d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, read>;
+
+fn textureLoad_aa8a0d() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aa8a0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aa8a0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aa8a0d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl
new file mode 100644
index 0000000..49c9939
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32sint, read>, coords: vec2<i32>, array_index: u32) -> vec4<i32>
+fn textureLoad_aae7f6() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aae7f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aae7f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aae7f6();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c482a88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aae7f6() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aae7f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aae7f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c482a88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aae7f6() {
+  int4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aae7f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aae7f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.glsl
new file mode 100644
index 0000000..f49fd3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aae7f6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aae7f6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_aae7f6() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aae7f6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.msl
new file mode 100644
index 0000000..f29670f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aae7f6(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_aae7f6(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aae7f6(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aae7f6(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.spvasm
new file mode 100644
index 0000000..104f9ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aae7f6 "textureLoad_aae7f6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %35 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aae7f6 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %27 %28 %29
+         %21 = OpImageRead %v4int %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %39 = OpLoad %v4int %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_aae7f6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.wgsl
new file mode 100644
index 0000000..35e6a48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aae7f6.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureLoad_aae7f6() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aae7f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aae7f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aae7f6();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl
new file mode 100644
index 0000000..9042f1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_ac64f7() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ac64f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ac64f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ac64f7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..797860e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ac64f7() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ac64f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ac64f7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..797860e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ac64f7() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ac64f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ac64f7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.glsl
new file mode 100644
index 0000000..e9f7ebf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ac64f7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ac64f7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ac64f7() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ac64f7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.msl
new file mode 100644
index 0000000..a12299d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ac64f7(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_ac64f7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ac64f7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ac64f7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.spvasm
new file mode 100644
index 0000000..a16ba5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ac64f7 "textureLoad_ac64f7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ac64f7 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_ac64f7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.wgsl
new file mode 100644
index 0000000..636c3d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ac64f7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_ac64f7() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ac64f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ac64f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ac64f7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl
new file mode 100644
index 0000000..94cb003
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_aeae73() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aeae73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aeae73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aeae73();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..71f1bbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aeae73() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aeae73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aeae73();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71f1bbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aeae73() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aeae73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aeae73();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.glsl
new file mode 100644
index 0000000..62a0db5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aeae73();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aeae73();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aeae73() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aeae73();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.msl
new file mode 100644
index 0000000..5f54c05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aeae73(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aeae73(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aeae73(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aeae73(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.spvasm
new file mode 100644
index 0000000..cdf6aa2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aeae73 "textureLoad_aeae73"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aeae73 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %27 %28 %29
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_aeae73
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.wgsl
new file mode 100644
index 0000000..3078362
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aeae73.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureLoad_aeae73() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aeae73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aeae73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aeae73();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl
new file mode 100644
index 0000000..5135407
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16uint, read>, coords: u32) -> vec4<u32>
+fn textureLoad_aebc09() {
+  var res: vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aebc09();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aebc09();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aebc09();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5c24e79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aebc09() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aebc09();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aebc09();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5c24e79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_aebc09() {
+  uint4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_aebc09();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_aebc09();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.glsl
new file mode 100644
index 0000000..5bd1f59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_aebc09();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_aebc09();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_aebc09() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_aebc09();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.msl
new file mode 100644
index 0000000..8fcfe5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_aebc09(texture1d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_aebc09(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_aebc09(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_aebc09(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.spvasm
new file mode 100644
index 0000000..f51c9df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_aebc09 "textureLoad_aebc09"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %26 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_aebc09 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %uint_1
+               OpStore %res %21
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %30 = OpLoad %v4uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_aebc09
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.wgsl
new file mode 100644
index 0000000..ebe2d91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/aebc09.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, read>;
+
+fn textureLoad_aebc09() {
+  var res : vec4<u32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_aebc09();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_aebc09();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_aebc09();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl
new file mode 100644
index 0000000..6050a6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_b1bf79() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b1bf79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b1bf79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b1bf79();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d42f0f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b1bf79() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b1bf79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b1bf79();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d42f0f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b1bf79() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b1bf79();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b1bf79();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.glsl
new file mode 100644
index 0000000..08b494f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b1bf79();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b1bf79();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b1bf79() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b1bf79();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.msl
new file mode 100644
index 0000000..a7ebd27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b1bf79(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_b1bf79(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b1bf79(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b1bf79(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.spvasm
new file mode 100644
index 0000000..90bff8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b1bf79 "textureLoad_b1bf79"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b1bf79 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_b1bf79
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.wgsl
new file mode 100644
index 0000000..9acb7dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b1bf79.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, read>;
+
+fn textureLoad_b1bf79() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b1bf79();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b1bf79();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b1bf79();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl
new file mode 100644
index 0000000..962ee20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_b24d27() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b24d27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b24d27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b24d27();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..51ecb94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b24d27() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b24d27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b24d27();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..51ecb94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b24d27() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b24d27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b24d27();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.glsl
new file mode 100644
index 0000000..f9f300f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b24d27();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b24d27();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_b24d27() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b24d27();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.msl
new file mode 100644
index 0000000..9456478
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b24d27(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_b24d27(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b24d27(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b24d27(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.spvasm
new file mode 100644
index 0000000..b92e065
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b24d27 "textureLoad_b24d27"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b24d27 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_b24d27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.wgsl
new file mode 100644
index 0000000..455e0d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b24d27.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, read>;
+
+fn textureLoad_b24d27() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b24d27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b24d27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b24d27();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl
new file mode 100644
index 0000000..1741a3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<r32float, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_b58c6d() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b58c6d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b58c6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b58c6d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fe01baf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b58c6d() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b58c6d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b58c6d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fe01baf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b58c6d() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b58c6d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b58c6d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.glsl
new file mode 100644
index 0000000..3d97976
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b58c6d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b58c6d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b58c6d() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b58c6d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.msl
new file mode 100644
index 0000000..7b16ea9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b58c6d(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b58c6d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b58c6d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b58c6d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c11a44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b58c6d "textureLoad_b58c6d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b58c6d = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_b58c6d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.wgsl
new file mode 100644
index 0000000..976c539
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b58c6d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureLoad_b58c6d() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b58c6d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b58c6d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b58c6d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl
new file mode 100644
index 0000000..e0b458e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_b6c458() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b6c458();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b6c458();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b6c458();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d48cfad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b6c458() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b6c458();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b6c458();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d48cfad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b6c458() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b6c458();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b6c458();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.glsl
new file mode 100644
index 0000000..37048e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b6c458();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b6c458();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b6c458() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b6c458();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.msl
new file mode 100644
index 0000000..11e9ece
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b6c458(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_b6c458(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b6c458(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b6c458(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.spvasm
new file mode 100644
index 0000000..5edcf6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b6c458 "textureLoad_b6c458"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b6c458 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_b6c458
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.wgsl
new file mode 100644
index 0000000..a4afe78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b6c458.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, read>;
+
+fn textureLoad_b6c458() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b6c458();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b6c458();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b6c458();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl
new file mode 100644
index 0000000..df2bb6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<bgra8unorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_b7f74f() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b7f74f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b7f74f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b7f74f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2c3eddb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b7f74f() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b7f74f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b7f74f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2c3eddb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b7f74f() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b7f74f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b7f74f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.glsl
new file mode 100644
index 0000000..287f16a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b7f74f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b7f74f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b7f74f() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b7f74f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.msl
new file mode 100644
index 0000000..e5c1022
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b7f74f(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b7f74f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b7f74f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b7f74f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.spvasm
new file mode 100644
index 0000000..abe5cba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b7f74f "textureLoad_b7f74f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b7f74f = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_b7f74f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.wgsl
new file mode 100644
index 0000000..f6f8ef4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b7f74f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<bgra8unorm, read>;
+
+fn textureLoad_b7f74f() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b7f74f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b7f74f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b7f74f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl
new file mode 100644
index 0000000..30c074b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16float, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_b80e7e() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b80e7e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b80e7e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b80e7e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8cbde25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b80e7e() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b80e7e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b80e7e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8cbde25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b80e7e() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b80e7e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b80e7e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.glsl
new file mode 100644
index 0000000..64e49cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b80e7e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b80e7e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_b80e7e() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b80e7e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.msl
new file mode 100644
index 0000000..b9d2af5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b80e7e(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_b80e7e(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b80e7e(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b80e7e(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5e53483
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b80e7e "textureLoad_b80e7e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b80e7e = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_b80e7e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.wgsl
new file mode 100644
index 0000000..c8f1709
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b80e7e.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureLoad_b80e7e() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b80e7e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b80e7e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b80e7e();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl
new file mode 100644
index 0000000..783824d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_b94d15() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b94d15();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b94d15();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b94d15();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cbde804
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b94d15() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b94d15();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b94d15();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cbde804
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_b94d15() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_b94d15();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_b94d15();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.glsl
new file mode 100644
index 0000000..43fe15a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_b94d15();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_b94d15();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_b94d15() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_b94d15();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.msl
new file mode 100644
index 0000000..55711fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_b94d15(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_b94d15(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_b94d15(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_b94d15(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.spvasm
new file mode 100644
index 0000000..c68f848
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_b94d15 "textureLoad_b94d15"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_b94d15 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %28 %29 %30
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_b94d15
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.wgsl
new file mode 100644
index 0000000..f8c2b69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/b94d15.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_b94d15() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_b94d15();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_b94d15();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_b94d15();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl
new file mode 100644
index 0000000..636d0e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_bfd154() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bfd154();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bfd154();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bfd154();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..69bd3b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_bfd154() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bfd154();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bfd154();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..69bd3b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_bfd154() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_bfd154();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_bfd154();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.glsl
new file mode 100644
index 0000000..f9a85f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_bfd154();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_bfd154();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_bfd154() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_bfd154();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.msl
new file mode 100644
index 0000000..24ca335
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_bfd154(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_bfd154(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_bfd154(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_bfd154(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd9a839
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_bfd154 "textureLoad_bfd154"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_bfd154 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_bfd154
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.wgsl
new file mode 100644
index 0000000..9aacdf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/bfd154.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, read>;
+
+fn textureLoad_bfd154() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_bfd154();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_bfd154();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_bfd154();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl
new file mode 100644
index 0000000..9d31554
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_c02b74() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c02b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c02b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c02b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8790ce1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c02b74() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c02b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c02b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8790ce1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c02b74() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c02b74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c02b74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.glsl
new file mode 100644
index 0000000..8f1c61e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c02b74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c02b74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c02b74() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c02b74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.msl
new file mode 100644
index 0000000..0c0cc49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c02b74(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c02b74(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c02b74(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c02b74(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.spvasm
new file mode 100644
index 0000000..6618552
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c02b74 "textureLoad_c02b74"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c02b74 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_c02b74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c3696c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c02b74.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, read>;
+
+fn textureLoad_c02b74() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c02b74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c02b74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c02b74();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl
new file mode 100644
index 0000000..0b6ca6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_c07013() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c07013();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c07013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c07013();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..660efa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c07013() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c07013();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c07013();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..660efa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c07013() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c07013();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c07013();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.glsl
new file mode 100644
index 0000000..49e5fcf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c07013();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c07013();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c07013() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c07013();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.msl
new file mode 100644
index 0000000..c7f7f74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c07013(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c07013(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c07013(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c07013(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.spvasm
new file mode 100644
index 0000000..9d31450
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c07013 "textureLoad_c07013"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c07013 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_c07013
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_c07013
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_c07013
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.wgsl
new file mode 100644
index 0000000..8d17c1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c07013.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, read>;
+
+fn textureLoad_c07013() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c07013();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c07013();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c07013();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl
new file mode 100644
index 0000000..40cb88f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<u32>, array_index: i32) -> vec4<u32>
+fn textureLoad_c21b33() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c21b33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c21b33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c21b33();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a51ac9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c21b33() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c21b33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c21b33();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a51ac9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c21b33() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c21b33();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c21b33();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.glsl
new file mode 100644
index 0000000..f890dd4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c21b33();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c21b33();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c21b33() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c21b33();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.msl
new file mode 100644
index 0000000..d2019fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c21b33(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c21b33(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c21b33(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c21b33(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f5caf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c21b33 "textureLoad_c21b33"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c21b33 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpBitcast %uint %int_1
+         %32 = OpCompositeConstruct %v3uint %27 %28 %29
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_c21b33
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.wgsl
new file mode 100644
index 0000000..efb40f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c21b33.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_c21b33() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c21b33();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c21b33();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c21b33();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl
new file mode 100644
index 0000000..ccbecc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_c40dcb() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c40dcb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c40dcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c40dcb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..160e721
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c40dcb() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c40dcb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c40dcb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..160e721
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c40dcb() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c40dcb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c40dcb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.glsl
new file mode 100644
index 0000000..21b3aa9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c40dcb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c40dcb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c40dcb() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c40dcb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.msl
new file mode 100644
index 0000000..684ed3f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c40dcb(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c40dcb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c40dcb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c40dcb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.spvasm
new file mode 100644
index 0000000..8f8fb93
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c40dcb "textureLoad_c40dcb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c40dcb = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpCompositeConstruct %v3int %28 %29 %int_1
+         %21 = OpImageRead %v4uint %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_c40dcb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.wgsl
new file mode 100644
index 0000000..e931c8e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c40dcb.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_c40dcb() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c40dcb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c40dcb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c40dcb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl
new file mode 100644
index 0000000..7e76d01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_c456bc() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c456bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c456bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c456bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..96482b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c456bc() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c456bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c456bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..96482b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c456bc() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c456bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c456bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.glsl
new file mode 100644
index 0000000..0215c17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c456bc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c456bc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c456bc() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c456bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.msl
new file mode 100644
index 0000000..85046b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c456bc(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c456bc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c456bc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c456bc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..acbdce7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c456bc "textureLoad_c456bc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c456bc = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_c456bc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..8782917
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c456bc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, read>;
+
+fn textureLoad_c456bc() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c456bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c456bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c456bc();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl
new file mode 100644
index 0000000..f827258
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_c5791b() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c5791b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c5791b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c5791b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..356624cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c5791b() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c5791b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c5791b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..356624cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c5791b() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c5791b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c5791b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.glsl
new file mode 100644
index 0000000..30a985a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c5791b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c5791b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c5791b() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c5791b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.msl
new file mode 100644
index 0000000..c86162a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c5791b(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c5791b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c5791b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c5791b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.spvasm
new file mode 100644
index 0000000..670b4c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c5791b "textureLoad_c5791b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c5791b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_c5791b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.wgsl
new file mode 100644
index 0000000..54ad5bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c5791b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, read>;
+
+fn textureLoad_c5791b() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c5791b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c5791b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c5791b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl
new file mode 100644
index 0000000..1aa829c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32sint, read>, coords: vec2<u32>) -> vec4<i32>
+fn textureLoad_c66b20() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c66b20();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c66b20();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c66b20();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c6acf7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c66b20() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c66b20();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c66b20();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6acf7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c66b20() {
+  int4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c66b20();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c66b20();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.glsl
new file mode 100644
index 0000000..f044f81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c66b20();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c66b20();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c66b20() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c66b20();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.msl
new file mode 100644
index 0000000..2c2ac37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c66b20(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c66b20(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c66b20(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c66b20(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.spvasm
new file mode 100644
index 0000000..be01401
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c66b20 "textureLoad_c66b20"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c66b20 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_c66b20
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.wgsl
new file mode 100644
index 0000000..e7ee4d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c66b20.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, read>;
+
+fn textureLoad_c66b20() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c66b20();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c66b20();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c66b20();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl
new file mode 100644
index 0000000..5f16d8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_c7cbed() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c7cbed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c7cbed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c7cbed();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4510e4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c7cbed() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c7cbed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c7cbed();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4510e4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c7cbed() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c7cbed();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c7cbed();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.glsl
new file mode 100644
index 0000000..f9c4758
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c7cbed();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c7cbed();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_c7cbed() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c7cbed();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.msl
new file mode 100644
index 0000000..81ae303
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c7cbed(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_c7cbed(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c7cbed(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c7cbed(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.spvasm
new file mode 100644
index 0000000..13c59d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c7cbed "textureLoad_c7cbed"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c7cbed = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_c7cbed
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e807fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c7cbed.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, read>;
+
+fn textureLoad_c7cbed() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c7cbed();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c7cbed();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c7cbed();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl
new file mode 100644
index 0000000..82b9cbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<u32>, array_index: u32) -> vec4<u32>
+fn textureLoad_c8ed19() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c8ed19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c8ed19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c8ed19();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9f4cfdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c8ed19() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c8ed19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c8ed19();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9f4cfdd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c8ed19() {
+  uint4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c8ed19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c8ed19();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.glsl
new file mode 100644
index 0000000..e83f2ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c8ed19();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c8ed19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_c8ed19() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c8ed19();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.msl
new file mode 100644
index 0000000..7e0fd10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c8ed19(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_c8ed19(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c8ed19(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c8ed19(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.spvasm
new file mode 100644
index 0000000..81b02fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 51
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c8ed19 "textureLoad_c8ed19"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %32 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %37 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c8ed19 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %uint %26 0
+         %28 = OpCompositeExtract %uint %26 1
+         %29 = OpCompositeConstruct %v3uint %27 %28 %uint_1
+         %21 = OpImageRead %v4uint %22 %29
+               OpStore %res %21
+         %35 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %36 = OpLoad %v4uint %res
+               OpStore %35 %36
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %37
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %43
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_c8ed19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.wgsl
new file mode 100644
index 0000000..4df65bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c8ed19.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_c8ed19() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c8ed19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c8ed19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c8ed19();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl
new file mode 100644
index 0000000..ee1aed6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_c9cc40() {
+  var res: vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c9cc40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c9cc40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c9cc40();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..12522b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c9cc40() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c9cc40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c9cc40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..12522b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_c9cc40() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_c9cc40();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_c9cc40();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.glsl
new file mode 100644
index 0000000..e2a5f5d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_c9cc40();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_c9cc40();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_c9cc40() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_c9cc40();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.msl
new file mode 100644
index 0000000..1a9596b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_c9cc40(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_c9cc40(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_c9cc40(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_c9cc40(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6f17ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_c9cc40 "textureLoad_c9cc40"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_c9cc40 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_c9cc40
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.wgsl
new file mode 100644
index 0000000..0b9de80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/c9cc40.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, read>;
+
+fn textureLoad_c9cc40() {
+  var res : vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_c9cc40();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_c9cc40();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_c9cc40();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl
new file mode 100644
index 0000000..ea99c6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_cdd343() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_cdd343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_cdd343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_cdd343();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a8a5f50
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_cdd343() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_cdd343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_cdd343();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a8a5f50
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_cdd343() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_cdd343();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_cdd343();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.glsl
new file mode 100644
index 0000000..97fe26e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_cdd343();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_cdd343();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_cdd343() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_cdd343();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.msl
new file mode 100644
index 0000000..202762d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_cdd343(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_cdd343(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_cdd343(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_cdd343(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.spvasm
new file mode 100644
index 0000000..de82c68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.spvasm
@@ -0,0 +1,100 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_cdd343 "textureLoad_cdd343"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_cdd343 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %28 %29 %30
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_cdd343
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.wgsl
new file mode 100644
index 0000000..702727e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/cdd343.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureLoad_cdd343() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_cdd343();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_cdd343();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_cdd343();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl
new file mode 100644
index 0000000..6b7b7ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba32sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_d02afc() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d02afc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d02afc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d02afc();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c98b61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d02afc() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d02afc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d02afc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c98b61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d02afc() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d02afc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d02afc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.glsl
new file mode 100644
index 0000000..3a6c6cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d02afc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d02afc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d02afc() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d02afc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.msl
new file mode 100644
index 0000000..e90f6d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d02afc(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_d02afc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d02afc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d02afc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.spvasm
new file mode 100644
index 0000000..6e2f656
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d02afc "textureLoad_d02afc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d02afc = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_d02afc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.wgsl
new file mode 100644
index 0000000..40d67cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d02afc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, read>;
+
+fn textureLoad_d02afc() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d02afc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d02afc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d02afc();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl
new file mode 100644
index 0000000..e69c118
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<bgra8unorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_d357bb() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d357bb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d357bb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d357bb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c9089d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d357bb() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d357bb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d357bb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c9089d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d357bb() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d357bb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d357bb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.glsl
new file mode 100644
index 0000000..cca91be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d357bb();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d357bb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d357bb() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d357bb();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.msl
new file mode 100644
index 0000000..38f8356
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d357bb(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d357bb(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d357bb(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d357bb(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.spvasm
new file mode 100644
index 0000000..2855ddb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d357bb "textureLoad_d357bb"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d357bb = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_d357bb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.wgsl
new file mode 100644
index 0000000..161c37f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d357bb.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<bgra8unorm, read>;
+
+fn textureLoad_d357bb() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d357bb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d357bb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d357bb();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl
new file mode 100644
index 0000000..49a65bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_d4df19() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d4df19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d4df19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d4df19();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..11fd3ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d4df19() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d4df19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d4df19();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..11fd3ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d4df19() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d4df19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d4df19();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.glsl
new file mode 100644
index 0000000..3f2da2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d4df19();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d4df19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of uint'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d4df19() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d4df19();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of uint'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.msl
new file mode 100644
index 0000000..102e43b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d4df19(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_d4df19(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d4df19(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d4df19(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.spvasm
new file mode 100644
index 0000000..ccad0c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d4df19 "textureLoad_d4df19"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d4df19 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_d4df19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.wgsl
new file mode 100644
index 0000000..9a2a30f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d4df19.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, read>;
+
+fn textureLoad_d4df19() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d4df19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d4df19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d4df19();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl
new file mode 100644
index 0000000..aaa654b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_d5c48d() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d5c48d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d5c48d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d5c48d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9d61a55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d5c48d() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d5c48d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d5c48d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9d61a55
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d5c48d() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d5c48d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d5c48d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.glsl
new file mode 100644
index 0000000..172a204
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d5c48d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d5c48d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d5c48d() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d5c48d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.msl
new file mode 100644
index 0000000..2fd4f63
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d5c48d(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d5c48d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d5c48d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d5c48d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.spvasm
new file mode 100644
index 0000000..b6e7337
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d5c48d "textureLoad_d5c48d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d5c48d = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_d5c48d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.wgsl
new file mode 100644
index 0000000..d809e6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d5c48d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, read>;
+
+fn textureLoad_d5c48d() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d5c48d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d5c48d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d5c48d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl
new file mode 100644
index 0000000..127dedf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rg32float, read>, coords: i32) -> vec4<f32>
+fn textureLoad_d81c57() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d81c57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d81c57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d81c57();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e3380a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d81c57() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d81c57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d81c57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e3380a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d81c57() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d81c57();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d81c57();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.glsl
new file mode 100644
index 0000000..1642672
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d81c57();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d81c57();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_d81c57() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d81c57();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.msl
new file mode 100644
index 0000000..ee3dc64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d81c57(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_d81c57(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d81c57(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d81c57(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.spvasm
new file mode 100644
index 0000000..8341fd8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d81c57 "textureLoad_d81c57"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d81c57 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_d81c57
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.wgsl
new file mode 100644
index 0000000..5589b7c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d81c57.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, read>;
+
+fn textureLoad_d81c57() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d81c57();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d81c57();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d81c57();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl
new file mode 100644
index 0000000..8c11b26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_d85d61() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d85d61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d85d61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d85d61();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..27aca20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d85d61() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d85d61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d85d61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..27aca20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d85d61() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d85d61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d85d61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.glsl
new file mode 100644
index 0000000..e48bc08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d85d61();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d85d61();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_d85d61() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d85d61();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.msl
new file mode 100644
index 0000000..af22125
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d85d61(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_d85d61(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d85d61(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d85d61(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.spvasm
new file mode 100644
index 0000000..9efcf09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d85d61 "textureLoad_d85d61"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d85d61 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_d85d61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.wgsl
new file mode 100644
index 0000000..a31a5d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d85d61.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, read>;
+
+fn textureLoad_d85d61() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d85d61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d85d61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d85d61();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl
new file mode 100644
index 0000000..d3046f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_d8617f() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d8617f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d8617f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d8617f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3870ef4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d8617f() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d8617f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d8617f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3870ef4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_d8617f() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_d8617f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_d8617f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.glsl
new file mode 100644
index 0000000..59f483e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_d8617f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_d8617f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_d8617f() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_d8617f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.msl
new file mode 100644
index 0000000..da0a6ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_d8617f(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_d8617f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_d8617f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_d8617f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.spvasm
new file mode 100644
index 0000000..d878367
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.spvasm
@@ -0,0 +1,99 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_d8617f "textureLoad_d8617f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_d8617f = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpCompositeConstruct %v3int %27 %28 %int_1
+         %21 = OpImageRead %v4int %22 %29
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_d8617f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.wgsl
new file mode 100644
index 0000000..768f317
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/d8617f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureLoad_d8617f() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_d8617f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_d8617f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_d8617f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl
new file mode 100644
index 0000000..3e1e985
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_dbd554() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dbd554();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dbd554();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dbd554();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ce48956
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dbd554() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dbd554();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dbd554();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ce48956
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dbd554() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dbd554();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dbd554();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.glsl
new file mode 100644
index 0000000..8922837
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dbd554();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dbd554();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dbd554() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dbd554();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.msl
new file mode 100644
index 0000000..1c7269c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dbd554(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dbd554(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dbd554(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dbd554(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.spvasm
new file mode 100644
index 0000000..5977e3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dbd554 "textureLoad_dbd554"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dbd554 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_dbd554
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.wgsl
new file mode 100644
index 0000000..860733e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dbd554.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, read>;
+
+fn textureLoad_dbd554() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dbd554();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dbd554();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dbd554();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl
new file mode 100644
index 0000000..4552e26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32float, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_dd8776() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dd8776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dd8776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dd8776();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4226407
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dd8776() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dd8776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dd8776();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4226407
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dd8776() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dd8776();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dd8776();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.glsl
new file mode 100644
index 0000000..670333e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dd8776();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dd8776();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_dd8776() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dd8776();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.msl
new file mode 100644
index 0000000..63e01fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dd8776(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_dd8776(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dd8776(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dd8776(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcd73f92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dd8776 "textureLoad_dd8776"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dd8776 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_dd8776
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.wgsl
new file mode 100644
index 0000000..fc7d78c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dd8776.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureLoad_dd8776() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dd8776();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dd8776();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dd8776();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl
new file mode 100644
index 0000000..5f19e58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_ddeed3() {
+  var res: vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ddeed3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ddeed3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ddeed3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0532087
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ddeed3() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ddeed3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ddeed3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0532087
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ddeed3() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ddeed3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ddeed3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.glsl
new file mode 100644
index 0000000..b074e89
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ddeed3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ddeed3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ddeed3() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ddeed3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.msl
new file mode 100644
index 0000000..a880f54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ddeed3(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_ddeed3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ddeed3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ddeed3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.spvasm
new file mode 100644
index 0000000..8207341
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ddeed3 "textureLoad_ddeed3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ddeed3 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_ddeed3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.wgsl
new file mode 100644
index 0000000..b8a3265
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ddeed3.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, read>;
+
+fn textureLoad_ddeed3() {
+  var res : vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ddeed3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ddeed3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ddeed3();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl
new file mode 100644
index 0000000..a4251c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_dee8e7() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dee8e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dee8e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dee8e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bc8b33b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dee8e7() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dee8e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dee8e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bc8b33b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dee8e7() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dee8e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dee8e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.glsl
new file mode 100644
index 0000000..b40d302
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dee8e7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dee8e7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dee8e7() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dee8e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.msl
new file mode 100644
index 0000000..4c7a8ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dee8e7(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dee8e7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dee8e7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dee8e7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3a46db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dee8e7 "textureLoad_dee8e7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dee8e7 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_dee8e7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..70294f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dee8e7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, read>;
+
+fn textureLoad_dee8e7() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dee8e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dee8e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dee8e7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl
new file mode 100644
index 0000000..1095b9c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8sint, read>, coords: vec2<u32>, array_index: u32) -> vec4<i32>
+fn textureLoad_dfdf3b() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dfdf3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dfdf3b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..56a5ad0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dfdf3b() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dfdf3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dfdf3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56a5ad0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_dfdf3b() {
+  int4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_dfdf3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_dfdf3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.glsl
new file mode 100644
index 0000000..36fd844
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_dfdf3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_dfdf3b() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_dfdf3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.msl
new file mode 100644
index 0000000..8f66644
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_dfdf3b(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_dfdf3b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_dfdf3b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_dfdf3b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b55577a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_dfdf3b "textureLoad_dfdf3b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %27 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %33 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_dfdf3b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %uint %27 0
+         %29 = OpCompositeExtract %uint %27 1
+         %30 = OpCompositeConstruct %v3uint %28 %29 %uint_1
+         %21 = OpImageRead %v4int %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_dfdf3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..b2d5126
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/dfdf3b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureLoad_dfdf3b() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_dfdf3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_dfdf3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_dfdf3b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl
new file mode 100644
index 0000000..e890c4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_e2292f() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e2292f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e2292f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e2292f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8714fb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e2292f() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e2292f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e2292f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8714fb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e2292f() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e2292f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e2292f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.glsl
new file mode 100644
index 0000000..af23fc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e2292f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e2292f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e2292f() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e2292f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.msl
new file mode 100644
index 0000000..4f6d076
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e2292f(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_e2292f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e2292f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e2292f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.spvasm
new file mode 100644
index 0000000..270f901
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e2292f "textureLoad_e2292f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e2292f = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %uint_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_e2292f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.wgsl
new file mode 100644
index 0000000..4f55941
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e2292f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, read>;
+
+fn textureLoad_e2292f() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e2292f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e2292f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e2292f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl
new file mode 100644
index 0000000..88aecd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<r32float, read>, coords: vec3<u32>) -> vec4<f32>
+fn textureLoad_e3b08b() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e3b08b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e3b08b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e3b08b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4b9d917
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e3b08b() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e3b08b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e3b08b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4b9d917
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e3b08b() {
+  float4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e3b08b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e3b08b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.glsl
new file mode 100644
index 0000000..9928d54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e3b08b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e3b08b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e3b08b() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e3b08b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of float'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.msl
new file mode 100644
index 0000000..01fea24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e3b08b(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e3b08b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e3b08b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e3b08b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.spvasm
new file mode 100644
index 0000000..261f06e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e3b08b "textureLoad_e3b08b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e3b08b = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_e3b08b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c8c3247
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e3b08b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, read>;
+
+fn textureLoad_e3b08b() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e3b08b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e3b08b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e3b08b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl
new file mode 100644
index 0000000..32bc2e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<bgra8unorm, read>, coords: vec2<u32>, array_index: i32) -> vec4<f32>
+fn textureLoad_e57e92() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e57e92();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e57e92();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e57e92();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0187c80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e57e92() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e57e92();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e57e92();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0187c80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e57e92() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, uint(1)), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e57e92();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e57e92();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.glsl
new file mode 100644
index 0000000..ecde1d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e57e92();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e57e92();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e57e92() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), uint(1))));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e57e92();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.msl
new file mode 100644
index 0000000..03cf833
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e57e92(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e57e92(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e57e92(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e57e92(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.spvasm
new file mode 100644
index 0000000..779bdff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e57e92 "textureLoad_e57e92"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e57e92 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpBitcast %uint %int_1
+         %31 = OpCompositeConstruct %v3uint %26 %27 %28
+         %19 = OpImageRead %v4float %20 %31
+               OpStore %res %19
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %37 = OpLoad %v4float %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_e57e92
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.wgsl
new file mode 100644
index 0000000..9fc6d1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e57e92.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureLoad_e57e92() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e57e92();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e57e92();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e57e92();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl
new file mode 100644
index 0000000..163ceb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32uint, read>, coords: vec3<u32>) -> vec4<u32>
+fn textureLoad_e59fdf() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e59fdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e59fdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e59fdf();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6bf9c26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e59fdf() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e59fdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e59fdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6bf9c26
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e59fdf() {
+  uint4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e59fdf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e59fdf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.glsl
new file mode 100644
index 0000000..b95dde9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e59fdf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e59fdf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_e59fdf() {
+  uvec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e59fdf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.msl
new file mode 100644
index 0000000..b50f2c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e59fdf(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_e59fdf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e59fdf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e59fdf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.spvasm
new file mode 100644
index 0000000..038233b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e59fdf "textureLoad_e59fdf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e59fdf = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_e59fdf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fd2781
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e59fdf.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, read>;
+
+fn textureLoad_e59fdf() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e59fdf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e59fdf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e59fdf();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl
new file mode 100644
index 0000000..dbaf1fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32sint, read>, coords: vec3<i32>) -> vec4<i32>
+fn textureLoad_e65916() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e65916();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e65916();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e65916();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..de2f62e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e65916() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e65916();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e65916();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..de2f62e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e65916() {
+  int4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e65916();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e65916();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.glsl
new file mode 100644
index 0000000..5aa4d80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e65916();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e65916();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_e65916() {
+  ivec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e65916();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.msl
new file mode 100644
index 0000000..f77b9e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e65916(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_e65916(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e65916(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e65916(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.spvasm
new file mode 100644
index 0000000..1ba8596
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e65916 "textureLoad_e65916"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e65916 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_e65916
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_e65916
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_e65916
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.wgsl
new file mode 100644
index 0000000..e7ff033
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e65916.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, read>;
+
+fn textureLoad_e65916() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e65916();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e65916();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e65916();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl
new file mode 100644
index 0000000..2dcd9f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16float, read>, coords: vec2<i32>) -> vec4<f32>
+fn textureLoad_e893d7() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e893d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e893d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e893d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f39e0b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e893d7() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e893d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e893d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f39e0b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e893d7() {
+  float4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e893d7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e893d7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.glsl
new file mode 100644
index 0000000..ab7566b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e893d7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e893d7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e893d7() {
+  vec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e893d7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.msl
new file mode 100644
index 0000000..cf24e6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e893d7(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e893d7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e893d7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e893d7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.spvasm
new file mode 100644
index 0000000..7863d58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e893d7 "textureLoad_e893d7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e893d7 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_e893d7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.wgsl
new file mode 100644
index 0000000..2adb0f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e893d7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, read>;
+
+fn textureLoad_e893d7() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e893d7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e893d7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e893d7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl
new file mode 100644
index 0000000..d374f9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8unorm, read>, coords: u32) -> vec4<f32>
+fn textureLoad_e92dd0() {
+  var res: vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e92dd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e92dd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e92dd0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e61230
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e92dd0() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e92dd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e92dd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e61230
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_e92dd0() {
+  float4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_e92dd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_e92dd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.glsl
new file mode 100644
index 0000000..17ac9b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_e92dd0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_e92dd0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_e92dd0() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_e92dd0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.msl
new file mode 100644
index 0000000..b05a771
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_e92dd0(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_e92dd0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_e92dd0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_e92dd0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.spvasm
new file mode 100644
index 0000000..a2841c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.spvasm
@@ -0,0 +1,90 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_e92dd0 "textureLoad_e92dd0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_e92dd0 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %uint_1
+               OpStore %res %19
+         %27 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %28 = OpLoad %v4float %res
+               OpStore %27 %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_e92dd0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.wgsl
new file mode 100644
index 0000000..7f76c59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/e92dd0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, read>;
+
+fn textureLoad_e92dd0() {
+  var res : vec4<f32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_e92dd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_e92dd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_e92dd0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl
new file mode 100644
index 0000000..d3ce2fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba32float, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_ea2abd() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ea2abd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ea2abd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ea2abd();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d8e9472
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ea2abd() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ea2abd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ea2abd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8e9472
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ea2abd() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ea2abd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ea2abd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.glsl
new file mode 100644
index 0000000..9096fda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ea2abd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ea2abd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_ea2abd() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ea2abd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.msl
new file mode 100644
index 0000000..a7ae74c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ea2abd(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_ea2abd(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ea2abd(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ea2abd(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.spvasm
new file mode 100644
index 0000000..6235026
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ea2abd "textureLoad_ea2abd"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ea2abd = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_ea2abd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.wgsl
new file mode 100644
index 0000000..34771b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ea2abd.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, read>;
+
+fn textureLoad_ea2abd() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ea2abd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ea2abd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ea2abd();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl
new file mode 100644
index 0000000..907ff04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<r32sint, read>, coords: vec2<i32>) -> vec4<i32>
+fn textureLoad_eb573b() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eb573b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eb573b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eb573b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..17a1022
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eb573b() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eb573b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eb573b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..17a1022
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eb573b() {
+  int4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eb573b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eb573b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.glsl
new file mode 100644
index 0000000..7973532
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_eb573b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_eb573b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_eb573b() {
+  ivec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_eb573b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.msl
new file mode 100644
index 0000000..f307a6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_eb573b(texture2d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_eb573b(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_eb573b(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_eb573b(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.spvasm
new file mode 100644
index 0000000..3352b77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_eb573b "textureLoad_eb573b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %28 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_eb573b = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %25
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_eb573b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.wgsl
new file mode 100644
index 0000000..12ad118
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eb573b.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, read>;
+
+fn textureLoad_eb573b() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eb573b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eb573b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eb573b();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl
new file mode 100644
index 0000000..b74af34
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba16uint, read>, coords: vec2<i32>) -> vec4<u32>
+fn textureLoad_ecc823() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ecc823();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ecc823();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ecc823();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3725e1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ecc823() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ecc823();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ecc823();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3725e1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ecc823() {
+  uint4 res = arg_0.Load(int3((1).xx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ecc823();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ecc823();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.glsl
new file mode 100644
index 0000000..52adc97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ecc823();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ecc823();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ecc823() {
+  uvec4 res = texelFetch(arg_0, ivec2(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ecc823();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.msl
new file mode 100644
index 0000000..997ee49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ecc823(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_ecc823(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ecc823(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ecc823(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.spvasm
new file mode 100644
index 0000000..04c59dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ecc823 "textureLoad_ecc823"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ecc823 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_ecc823
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.wgsl
new file mode 100644
index 0000000..76c76fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ecc823.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, read>;
+
+fn textureLoad_ecc823() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ecc823();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ecc823();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ecc823();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl
new file mode 100644
index 0000000..7806e29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16sint, read>, coords: vec3<u32>) -> vec4<i32>
+fn textureLoad_ee33c5() {
+  var res: vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ee33c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ee33c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ee33c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..269bbd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ee33c5() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ee33c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ee33c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..269bbd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ee33c5() {
+  int4 res = arg_0.Load(uint4((1u).xxx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ee33c5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ee33c5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.glsl
new file mode 100644
index 0000000..d07cd76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ee33c5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ee33c5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_ee33c5() {
+  ivec4 res = texelFetch(arg_0, ivec3(uvec3(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ee33c5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.msl
new file mode 100644
index 0000000..9d2173e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ee33c5(texture3d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint3(uint3(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_ee33c5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ee33c5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ee33c5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.spvasm
new file mode 100644
index 0000000..f4b8df5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ee33c5 "textureLoad_ee33c5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %uint_1 = OpConstant %uint 1
+         %26 = OpConstantComposite %v3uint %uint_1 %uint_1 %uint_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %29 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ee33c5 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %33 = OpLoad %v4int %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_ee33c5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.wgsl
new file mode 100644
index 0000000..836f315
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ee33c5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, read>;
+
+fn textureLoad_ee33c5() {
+  var res : vec4<i32> = textureLoad(arg_0, vec3<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ee33c5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ee33c5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ee33c5();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl
new file mode 100644
index 0000000..3831a16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rg32uint, read>, coords: vec2<i32>, array_index: u32) -> vec4<u32>
+fn textureLoad_eecf7d() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eecf7d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eecf7d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eecf7d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..37e3c27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eecf7d() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eecf7d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eecf7d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..37e3c27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_eecf7d() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, int(1u)), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_eecf7d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_eecf7d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.glsl
new file mode 100644
index 0000000..4f71623
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_eecf7d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_eecf7d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_eecf7d() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), int(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_eecf7d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.msl
new file mode 100644
index 0000000..e36cbcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_eecf7d(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_eecf7d(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_eecf7d(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_eecf7d(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.spvasm
new file mode 100644
index 0000000..a68ee6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.spvasm
@@ -0,0 +1,101 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 54
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_eecf7d "textureLoad_eecf7d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %35 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %40 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_eecf7d = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %35
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpBitcast %int %uint_1
+         %32 = OpCompositeConstruct %v3int %28 %29 %30
+         %21 = OpImageRead %v4uint %22 %32
+               OpStore %res %21
+         %38 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %39 = OpLoad %v4uint %res
+               OpStore %38 %39
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %40
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %46
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %49 = OpLabel
+         %50 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %52 = OpLabel
+         %53 = OpFunctionCall %void %textureLoad_eecf7d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.wgsl
new file mode 100644
index 0000000..491a20a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/eecf7d.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureLoad_eecf7d() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_eecf7d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_eecf7d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_eecf7d();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl
new file mode 100644
index 0000000..2fd7149
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_ef5405() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ef5405();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ef5405();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ef5405();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e3f980d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ef5405() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ef5405();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ef5405();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e3f980d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_ef5405() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_ef5405();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_ef5405();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.glsl
new file mode 100644
index 0000000..4834cf2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_ef5405();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_ef5405();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_ef5405() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_ef5405();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.msl
new file mode 100644
index 0000000..3418b15
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_ef5405(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_ef5405(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_ef5405(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_ef5405(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.spvasm
new file mode 100644
index 0000000..e611fd3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_ef5405 "textureLoad_ef5405"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_ef5405 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_ef5405
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.wgsl
new file mode 100644
index 0000000..5190a7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/ef5405.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, read>;
+
+fn textureLoad_ef5405() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_ef5405();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_ef5405();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_ef5405();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl
new file mode 100644
index 0000000..57f95ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_efa787() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_efa787();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_efa787();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_efa787();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cf17acb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_efa787() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_efa787();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_efa787();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cf17acb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_efa787() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_efa787();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_efa787();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.glsl
new file mode 100644
index 0000000..cef0a18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_efa787();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_efa787();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_efa787() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_efa787();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.msl
new file mode 100644
index 0000000..0e2f88d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_efa787(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_efa787(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_efa787(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_efa787(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8da8d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_efa787 "textureLoad_efa787"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_efa787 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_efa787
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_efa787
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_efa787
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.wgsl
new file mode 100644
index 0000000..80c71bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/efa787.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_efa787() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_efa787();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_efa787();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_efa787();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl
new file mode 100644
index 0000000..f337722
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<r32sint, read>, coords: i32) -> vec4<i32>
+fn textureLoad_f06b69() {
+  var res: vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f06b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f06b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f06b69();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e40183e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f06b69() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f06b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f06b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e40183e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f06b69() {
+  int4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f06b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f06b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.glsl
new file mode 100644
index 0000000..54d7dc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.glsl
@@ -0,0 +1,93 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f06b69();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f06b69();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:10: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:10: '=' :  cannot convert from ' const float' to ' temp mediump 4-component vector of int'
+ERROR: 0:10: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f06b69() {
+  ivec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f06b69();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:9: 'texelFetch' : no matching overloaded function found 
+ERROR: 0:9: '=' :  cannot convert from ' const float' to ' temp highp 4-component vector of int'
+ERROR: 0:9: '' : compilation terminated 
+ERROR: 3 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.msl
new file mode 100644
index 0000000..bb30a66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f06b69(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f06b69(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f06b69(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f06b69(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.spvasm
new file mode 100644
index 0000000..3671726
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f06b69 "textureLoad_f06b69"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %26 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f06b69 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %26
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %int_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f06b69
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.wgsl
new file mode 100644
index 0000000..dd92354
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f06b69.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, read>;
+
+fn textureLoad_f06b69() {
+  var res : vec4<i32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f06b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f06b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f06b69();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl
new file mode 100644
index 0000000..460aac6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8unorm, read>, coords: vec2<u32>) -> vec4<f32>
+fn textureLoad_f2a7ff() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f2a7ff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f2a7ff();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c0cb0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f2a7ff() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f2a7ff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f2a7ff();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c0cb0ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f2a7ff() {
+  float4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f2a7ff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f2a7ff();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.glsl
new file mode 100644
index 0000000..e387067
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f2a7ff();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f2a7ff() {
+  vec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f2a7ff();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.msl
new file mode 100644
index 0000000..8efcdf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f2a7ff(texture2d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f2a7ff(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f2a7ff(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f2a7ff(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.spvasm
new file mode 100644
index 0000000..317a1b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f2a7ff "textureLoad_f2a7ff"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %24 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f2a7ff = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %29 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %30 = OpLoad %v4float %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_f2a7ff
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.wgsl
new file mode 100644
index 0000000..a5a9a57
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f2a7ff.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, read>;
+
+fn textureLoad_f2a7ff() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f2a7ff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f2a7ff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f2a7ff();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl
new file mode 100644
index 0000000..a2e9e59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_f35ac7() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f35ac7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f35ac7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f35ac7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e1455fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f35ac7() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f35ac7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f35ac7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e1455fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f35ac7() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f35ac7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f35ac7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.glsl
new file mode 100644
index 0000000..afdd4c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f35ac7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f35ac7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f35ac7() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f35ac7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.msl
new file mode 100644
index 0000000..8d64360
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f35ac7(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f35ac7(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f35ac7(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f35ac7(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1c06cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f35ac7 "textureLoad_f35ac7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f35ac7 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %uint_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f35ac7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.wgsl
new file mode 100644
index 0000000..2bfd5ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f35ac7.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, read>;
+
+fn textureLoad_f35ac7() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f35ac7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f35ac7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f35ac7();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl
new file mode 100644
index 0000000..efb6c84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8unorm, read>, coords: vec2<i32>, array_index: i32) -> vec4<f32>
+fn textureLoad_f379e2() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f379e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f379e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f379e2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e52dbbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f379e2() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f379e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f379e2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e52dbbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f379e2() {
+  float4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f379e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f379e2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.glsl
new file mode 100644
index 0000000..06bf75a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f379e2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f379e2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f379e2() {
+  vec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f379e2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.msl
new file mode 100644
index 0000000..aa477c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f379e2(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f379e2(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f379e2(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f379e2(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.spvasm
new file mode 100644
index 0000000..9da737e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.spvasm
@@ -0,0 +1,96 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 50
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f379e2 "textureLoad_f379e2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %25 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %36 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f379e2 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %int %25 0
+         %27 = OpCompositeExtract %int %25 1
+         %28 = OpCompositeConstruct %v3int %26 %27 %int_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %34 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %35 = OpLoad %v4float %res
+               OpStore %34 %35
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %36
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %42
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %48 = OpLabel
+         %49 = OpFunctionCall %void %textureLoad_f379e2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.wgsl
new file mode 100644
index 0000000..309b4d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f379e2.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureLoad_f379e2() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f379e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f379e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f379e2();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl
new file mode 100644
index 0000000..cc4f377
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16uint, read>, coords: vec3<i32>) -> vec4<u32>
+fn textureLoad_f56e6f() {
+  var res: vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f56e6f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f56e6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f56e6f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d7bbe6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f56e6f() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f56e6f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f56e6f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3d7bbe6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f56e6f() {
+  uint4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f56e6f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f56e6f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.glsl
new file mode 100644
index 0000000..1b2a937
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f56e6f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f56e6f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_f56e6f() {
+  uvec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f56e6f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.msl
new file mode 100644
index 0000000..ae3efee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f56e6f(texture3d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_f56e6f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f56e6f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f56e6f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.spvasm
new file mode 100644
index 0000000..b3fac80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 48
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f56e6f "textureLoad_f56e6f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %29 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %34 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f56e6f = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %29
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %26
+               OpStore %res %21
+         %32 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %33 = OpLoad %v4uint %res
+               OpStore %32 %33
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %34
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %39 = OpLabel
+         %40 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %40
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %46 = OpLabel
+         %47 = OpFunctionCall %void %textureLoad_f56e6f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.wgsl
new file mode 100644
index 0000000..776d227
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f56e6f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, read>;
+
+fn textureLoad_f56e6f() {
+  var res : vec4<u32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f56e6f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f56e6f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f56e6f();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl
new file mode 100644
index 0000000..be8f1a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rg32float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_f74bd8() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f74bd8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f74bd8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f74bd8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..91e637c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f74bd8() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f74bd8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f74bd8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..91e637c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f74bd8() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f74bd8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f74bd8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.glsl
new file mode 100644
index 0000000..6e6d8e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f74bd8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f74bd8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f74bd8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f74bd8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.msl
new file mode 100644
index 0000000..d622f51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f74bd8(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f74bd8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f74bd8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f74bd8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.spvasm
new file mode 100644
index 0000000..7020ca1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f74bd8 "textureLoad_f74bd8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f74bd8 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f74bd8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.wgsl
new file mode 100644
index 0000000..5e74036
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f74bd8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, read>;
+
+fn textureLoad_f74bd8() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f74bd8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f74bd8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f74bd8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl
new file mode 100644
index 0000000..7c5f14d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8snorm, read>, coords: vec2<u32>, array_index: u32) -> vec4<f32>
+fn textureLoad_f7f936() {
+  var res: vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f7f936();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f7f936();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f7f936();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..46f4c03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f7f936() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f7f936();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f7f936();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..46f4c03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f7f936() {
+  float4 res = arg_0.Load(uint4(uint3((1u).xx, 1u), uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f7f936();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f7f936();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.glsl
new file mode 100644
index 0000000..0ccfd64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f7f936();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f7f936();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f7f936() {
+  vec4 res = texelFetch(arg_0, ivec3(uvec3(uvec2(1u), 1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f7f936();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.msl
new file mode 100644
index 0000000..9e65876
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f7f936(texture2d_array<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint2(uint2(1u)), 1u);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f7f936(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f7f936(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f7f936(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.spvasm
new file mode 100644
index 0000000..440c859
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.spvasm
@@ -0,0 +1,95 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 49
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f7f936 "textureLoad_f7f936"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %35 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f7f936 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %26 = OpCompositeExtract %uint %25 0
+         %27 = OpCompositeExtract %uint %25 1
+         %28 = OpCompositeConstruct %v3uint %26 %27 %uint_1
+         %19 = OpImageRead %v4float %20 %28
+               OpStore %res %19
+         %33 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %34 = OpLoad %v4float %res
+               OpStore %33 %34
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %35
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %40 = OpLabel
+         %41 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %41
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_f7f936
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd868ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f7f936.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureLoad_f7f936() {
+  var res : vec4<f32> = textureLoad(arg_0, vec2<u32>(1u), 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f7f936();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f7f936();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f7f936();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl
new file mode 100644
index 0000000..128d00a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<bgra8unorm, read>;
+
+// fn textureLoad(texture: texture_storage_3d<bgra8unorm, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_f8a2e8() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f8a2e8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f8a2e8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0eafd02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f8a2e8() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f8a2e8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f8a2e8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0eafd02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f8a2e8() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f8a2e8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f8a2e8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.glsl
new file mode 100644
index 0000000..a5c90ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f8a2e8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_f8a2e8() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f8a2e8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.msl
new file mode 100644
index 0000000..a94bd00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f8a2e8(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_f8a2e8(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f8a2e8(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f8a2e8(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d3a544
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f8a2e8 "textureLoad_f8a2e8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f8a2e8 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f8a2e8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.wgsl
new file mode 100644
index 0000000..91bd2de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f8a2e8.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<bgra8unorm, read>;
+
+fn textureLoad_f8a2e8() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f8a2e8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f8a2e8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f8a2e8();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl
new file mode 100644
index 0000000..2ba5b4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba16sint, read>, coords: u32) -> vec4<i32>
+fn textureLoad_f9eaaf() {
+  var res: vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f9eaaf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f9eaaf();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..410342b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f9eaaf() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f9eaaf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f9eaaf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..410342b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_f9eaaf() {
+  int4 res = arg_0.Load(uint2(1u, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_f9eaaf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_f9eaaf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.glsl
new file mode 100644
index 0000000..68f240f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_f9eaaf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_f9eaaf() {
+  ivec4 res = texelFetch(arg_0, ivec2(uvec2(1u, 0u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_f9eaaf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.msl
new file mode 100644
index 0000000..c9b9c47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_f9eaaf(texture1d<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint(1u));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_f9eaaf(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_f9eaaf(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_f9eaaf(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.spvasm
new file mode 100644
index 0000000..f6c926d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_f9eaaf "textureLoad_f9eaaf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %27 = OpConstantNull %v4int
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_f9eaaf = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %27
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4int %22 %uint_1
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %31 = OpLoad %v4int %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_f9eaaf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.wgsl
new file mode 100644
index 0000000..505bbed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/f9eaaf.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, read>;
+
+fn textureLoad_f9eaaf() {
+  var res : vec4<i32> = textureLoad(arg_0, 1u);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_f9eaaf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_f9eaaf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_f9eaaf();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl
new file mode 100644
index 0000000..5e7bc0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba16sint, read>, coords: vec2<i32>, array_index: i32) -> vec4<i32>
+fn textureLoad_fc6d36() {
+  var res: vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fc6d36();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fc6d36();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fc6d36();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8a090a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fc6d36() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fc6d36();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fc6d36();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8a090a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fc6d36() {
+  int4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fc6d36();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fc6d36();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.glsl
new file mode 100644
index 0000000..fae8933
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fc6d36();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fc6d36();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  ivec4 inner;
+} prevent_dce;
+
+void textureLoad_fc6d36() {
+  ivec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fc6d36();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.msl
new file mode 100644
index 0000000..a8ec6bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fc6d36(texture2d_array<int, access::read> tint_symbol_1, device int4* const tint_symbol_2) {
+  int4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device int4* const tint_symbol_4) {
+  textureLoad_fc6d36(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device int4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device int4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fc6d36(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device int4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fc6d36(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.spvasm
new file mode 100644
index 0000000..9770b88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fc6d36 "textureLoad_fc6d36"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+      %v4int = OpTypeVector %int 4
+%prevent_dce_block = OpTypeStruct %v4int
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %26 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4int = OpTypePointer Function %v4int
+         %32 = OpConstantNull %v4int
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fc6d36 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4int Function %32
+         %22 = OpLoad %11 %arg_0
+         %27 = OpCompositeExtract %int %26 0
+         %28 = OpCompositeExtract %int %26 1
+         %29 = OpCompositeConstruct %v3int %27 %28 %int_1
+         %21 = OpImageRead %v4int %22 %29
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4int %prevent_dce %uint_0
+         %37 = OpLoad %v4int %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_fc6d36
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d9a90c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fc6d36.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureLoad_fc6d36() {
+  var res : vec4<i32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<i32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fc6d36();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fc6d36();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fc6d36();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl
new file mode 100644
index 0000000..7f359c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d<rgba8uint, read>, coords: vec2<u32>) -> vec4<u32>
+fn textureLoad_fd6442() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fd6442();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fd6442();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fd6442();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6a5703d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fd6442() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fd6442();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fd6442();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a5703d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fd6442() {
+  uint4 res = arg_0.Load(uint3((1u).xx, uint(0)));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fd6442();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fd6442();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.glsl
new file mode 100644
index 0000000..d1ec69c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fd6442();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fd6442();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fd6442() {
+  uvec4 res = texelFetch(arg_0, ivec2(uvec2(1u)));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fd6442();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.msl
new file mode 100644
index 0000000..7030384
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fd6442(texture2d<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(uint2(1u)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_fd6442(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fd6442(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fd6442(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.spvasm
new file mode 100644
index 0000000..3c769b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fd6442 "textureLoad_fd6442"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %uint_1 = OpConstant %uint 1
+         %25 = OpConstantComposite %v2uint %uint_1 %uint_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %28 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fd6442 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %28
+         %22 = OpLoad %11 %arg_0
+         %21 = OpImageRead %v4uint %22 %25
+               OpStore %res %21
+         %31 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %32 = OpLoad %v4uint %res
+               OpStore %31 %32
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureLoad_fd6442
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.wgsl
new file mode 100644
index 0000000..82cd28e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fd6442.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, read>;
+
+fn textureLoad_fd6442() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<u32>(1u));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fd6442();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fd6442();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fd6442();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl
new file mode 100644
index 0000000..06826f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureLoad(texture: texture_storage_2d_array<rgba8uint, read>, coords: vec2<i32>, array_index: i32) -> vec4<u32>
+fn textureLoad_fdebd0() {
+  var res: vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fdebd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fdebd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fdebd0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..481cec9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fdebd0() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fdebd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fdebd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..481cec9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fdebd0() {
+  uint4 res = arg_0.Load(int4(int3((1).xx, 1), 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fdebd0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fdebd0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.glsl
new file mode 100644
index 0000000..b09177b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fdebd0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fdebd0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uvec4 inner;
+} prevent_dce;
+
+void textureLoad_fdebd0() {
+  uvec4 res = texelFetch(arg_0, ivec3(ivec2(1), 1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fdebd0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.msl
new file mode 100644
index 0000000..f791eb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fdebd0(texture2d_array<uint, access::read> tint_symbol_1, device uint4* const tint_symbol_2) {
+  uint4 res = tint_symbol_1.read(uint2(int2(1)), 1);
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint4* const tint_symbol_4) {
+  textureLoad_fdebd0(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fdebd0(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fdebd0(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.spvasm
new file mode 100644
index 0000000..2ea3be6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.spvasm
@@ -0,0 +1,98 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 52
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fdebd0 "textureLoad_fdebd0"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+     %v4uint = OpTypeVector %uint 4
+%prevent_dce_block = OpTypeStruct %v4uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %27 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v4uint = OpTypePointer Function %v4uint
+         %33 = OpConstantNull %v4uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
+         %38 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fdebd0 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_v4uint Function %33
+         %22 = OpLoad %11 %arg_0
+         %28 = OpCompositeExtract %int %27 0
+         %29 = OpCompositeExtract %int %27 1
+         %30 = OpCompositeConstruct %v3int %28 %29 %int_1
+         %21 = OpImageRead %v4uint %22 %30
+               OpStore %res %21
+         %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %prevent_dce %uint_0
+         %37 = OpLoad %v4uint %res
+               OpStore %36 %37
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %38
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %43 = OpLabel
+         %44 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %44
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %47 = OpLabel
+         %48 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %50 = OpLabel
+         %51 = OpFunctionCall %void %textureLoad_fdebd0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.wgsl
new file mode 100644
index 0000000..c751b64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fdebd0.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureLoad_fdebd0() {
+  var res : vec4<u32> = textureLoad(arg_0, vec2<i32>(1i), 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<u32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fdebd0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fdebd0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fdebd0();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl
new file mode 100644
index 0000000..ce94f05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, read>;
+
+// fn textureLoad(texture: texture_storage_1d<rgba8snorm, read>, coords: i32) -> vec4<f32>
+fn textureLoad_fe222a() {
+  var res: vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fe222a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fe222a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fe222a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68a7189
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fe222a() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fe222a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fe222a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68a7189
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_fe222a() {
+  float4 res = arg_0.Load(int2(1, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_fe222a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_fe222a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.glsl
new file mode 100644
index 0000000..4fe4c38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_fe222a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_fe222a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_fe222a() {
+  vec4 res = texelFetch(arg_0, ivec2(1, 0));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_fe222a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.msl
new file mode 100644
index 0000000..da2b9fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_fe222a(texture1d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint(1));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_fe222a(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_fe222a(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_fe222a(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.spvasm
new file mode 100644
index 0000000..e4e0781
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.spvasm
@@ -0,0 +1,91 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_fe222a "textureLoad_fe222a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_fe222a = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %int_1
+               OpStore %res %19
+         %28 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %29 = OpLoad %v4float %res
+               OpStore %28 %29
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureLoad_fe222a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.wgsl
new file mode 100644
index 0000000..f1360f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/fe222a.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, read>;
+
+fn textureLoad_fe222a() {
+  var res : vec4<f32> = textureLoad(arg_0, 1i);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_fe222a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_fe222a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_fe222a();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl
new file mode 100644
index 0000000..283a49a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, read>;
+
+// fn textureLoad(texture: texture_storage_3d<rgba16float, read>, coords: vec3<i32>) -> vec4<f32>
+fn textureLoad_feab99() {
+  var res: vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_feab99();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_feab99();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_feab99();
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d688a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_feab99() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_feab99();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_feab99();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6d688a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureLoad_feab99() {
+  float4 res = arg_0.Load(int4((1).xxx, 0));
+  prevent_dce.Store4(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureLoad_feab99();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureLoad_feab99();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.glsl
new file mode 100644
index 0000000..b1fd9c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureLoad_feab99();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureLoad_feab99();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image3D arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  vec4 inner;
+} prevent_dce;
+
+void textureLoad_feab99() {
+  vec4 res = texelFetch(arg_0, ivec3(1));
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureLoad_feab99();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.msl
new file mode 100644
index 0000000..efa6e39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureLoad_feab99(texture3d<float, access::read> tint_symbol_1, device float4* const tint_symbol_2) {
+  float4 res = tint_symbol_1.read(uint3(int3(1)));
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::read> tint_symbol_3, device float4* const tint_symbol_4) {
+  textureLoad_feab99(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::read> tint_symbol_5 [[texture(0)]], device float4* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::read> tint_symbol_7 [[texture(0)]], device float4* tint_symbol_8 [[buffer(0)]]) {
+  textureLoad_feab99(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::read> tint_symbol_9 [[texture(0)]], device float4* tint_symbol_10 [[buffer(0)]]) {
+  textureLoad_feab99(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.spvasm
new file mode 100644
index 0000000..842877d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureLoad_feab99 "textureLoad_feab99"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %v4float
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %15 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %24 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v4float = OpTypePointer Function %v4float
+       %uint = OpTypeInt 32 0
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_v4float = OpTypePointer StorageBuffer %v4float
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureLoad_feab99 = OpFunction %void None %15
+         %18 = OpLabel
+        %res = OpVariable %_ptr_Function_v4float Function %5
+         %20 = OpLoad %11 %arg_0
+         %19 = OpImageRead %v4float %20 %24
+               OpStore %res %19
+         %30 = OpAccessChain %_ptr_StorageBuffer_v4float %prevent_dce %uint_0
+         %31 = OpLoad %v4float %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureLoad_feab99
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %15
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %15
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureLoad_feab99
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %15
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureLoad_feab99
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.wgsl
new file mode 100644
index 0000000..5138381
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureLoad/feab99.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, read>;
+
+fn textureLoad_feab99() {
+  var res : vec4<f32> = textureLoad(arg_0, vec3<i32>(1i));
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : vec4<f32>;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureLoad_feab99();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureLoad_feab99();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureLoad_feab99();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl
new file mode 100644
index 0000000..17fb9c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32float, read>) -> u32
+fn textureNumLayers_0fe8dc() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_0fe8dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_0fe8dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_0fe8dc();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7c1e510
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_0fe8dc() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_0fe8dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_0fe8dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_0fe8dc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7c1e510
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_0fe8dc() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_0fe8dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_0fe8dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_0fe8dc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.glsl
new file mode 100644
index 0000000..8829b71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_0fe8dc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_0fe8dc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_0fe8dc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_0fe8dc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_0fe8dc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_0fe8dc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.msl
new file mode 100644
index 0000000..6aac9de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_0fe8dc(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_0fe8dc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_0fe8dc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_0fe8dc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.spvasm
new file mode 100644
index 0000000..d5b89ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_0fe8dc "textureNumLayers_0fe8dc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_0fe8dc = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_0fe8dc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_0fe8dc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_0fe8dc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.wgsl
new file mode 100644
index 0000000..98a4c35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/0fe8dc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, read>;
+
+fn textureNumLayers_0fe8dc() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_0fe8dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_0fe8dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_0fe8dc();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl
new file mode 100644
index 0000000..786867f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32sint, read>) -> u32
+fn textureNumLayers_26c9f9() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_26c9f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_26c9f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_26c9f9();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..038078c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_26c9f9() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_26c9f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_26c9f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_26c9f9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..038078c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_26c9f9() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_26c9f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_26c9f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_26c9f9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.glsl
new file mode 100644
index 0000000..fe3021e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_26c9f9() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_26c9f9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_26c9f9() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_26c9f9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_26c9f9() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_26c9f9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.msl
new file mode 100644
index 0000000..4d00f64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_26c9f9(texture2d_array<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_26c9f9(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_26c9f9(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_26c9f9(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.spvasm
new file mode 100644
index 0000000..906f9e5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_26c9f9 "textureNumLayers_26c9f9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_26c9f9 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpCompositeExtract %uint %22 2
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %31 = OpLoad %uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureNumLayers_26c9f9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureNumLayers_26c9f9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureNumLayers_26c9f9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.wgsl
new file mode 100644
index 0000000..d12dac7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/26c9f9.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, read>;
+
+fn textureNumLayers_26c9f9() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_26c9f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_26c9f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_26c9f9();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl
new file mode 100644
index 0000000..4625639
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32uint, read>) -> u32
+fn textureNumLayers_2d95ea() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_2d95ea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_2d95ea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_2d95ea();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ec8d5c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_2d95ea() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_2d95ea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_2d95ea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_2d95ea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ec8d5c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_2d95ea() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_2d95ea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_2d95ea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_2d95ea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.glsl
new file mode 100644
index 0000000..a63d9c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_2d95ea() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_2d95ea();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_2d95ea() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_2d95ea();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_2d95ea() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_2d95ea();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.msl
new file mode 100644
index 0000000..1793011
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_2d95ea(texture2d_array<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_2d95ea(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_2d95ea(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_2d95ea(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.spvasm
new file mode 100644
index 0000000..e0a5777
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_2d95ea "textureNumLayers_2d95ea"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_2d95ea = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_2d95ea
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_2d95ea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_2d95ea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d58be1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/2d95ea.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, read>;
+
+fn textureNumLayers_2d95ea() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_2d95ea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_2d95ea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_2d95ea();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl
new file mode 100644
index 0000000..518a4dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32float, read>) -> u32
+fn textureNumLayers_379cc5() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_379cc5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_379cc5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_379cc5();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2d2a160
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_379cc5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_379cc5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_379cc5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_379cc5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2d2a160
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_379cc5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_379cc5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_379cc5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_379cc5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.glsl
new file mode 100644
index 0000000..a4f87b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_379cc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_379cc5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_379cc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_379cc5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_379cc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_379cc5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.msl
new file mode 100644
index 0000000..adb5a44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_379cc5(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_379cc5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_379cc5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_379cc5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.spvasm
new file mode 100644
index 0000000..2efd81e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_379cc5 "textureNumLayers_379cc5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_379cc5 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_379cc5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_379cc5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_379cc5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.wgsl
new file mode 100644
index 0000000..a600b79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/379cc5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, read>;
+
+fn textureNumLayers_379cc5() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_379cc5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_379cc5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_379cc5();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl
new file mode 100644
index 0000000..3d9a2a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8sint, read>) -> u32
+fn textureNumLayers_3ad143() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_3ad143();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_3ad143();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_3ad143();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45923b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_3ad143() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_3ad143();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_3ad143();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_3ad143();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45923b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_3ad143() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_3ad143();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_3ad143();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_3ad143();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.glsl
new file mode 100644
index 0000000..c4fc135
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3ad143() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_3ad143();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3ad143() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_3ad143();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3ad143() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_3ad143();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.msl
new file mode 100644
index 0000000..4d68d88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_3ad143(texture2d_array<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_3ad143(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_3ad143(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_3ad143(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.spvasm
new file mode 100644
index 0000000..ec9797e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_3ad143 "textureNumLayers_3ad143"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_3ad143 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpCompositeExtract %uint %22 2
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %31 = OpLoad %uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureNumLayers_3ad143
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureNumLayers_3ad143
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureNumLayers_3ad143
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb0a5a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3ad143.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, read>;
+
+fn textureNumLayers_3ad143() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_3ad143();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_3ad143();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_3ad143();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl
new file mode 100644
index 0000000..437e105
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8unorm, read>) -> u32
+fn textureNumLayers_3eff89() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_3eff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_3eff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_3eff89();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..510d7d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_3eff89() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_3eff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_3eff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_3eff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..510d7d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_3eff89() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_3eff89();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_3eff89();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_3eff89();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.glsl
new file mode 100644
index 0000000..f03a3ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3eff89() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_3eff89();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3eff89() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_3eff89();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_3eff89() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_3eff89();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.msl
new file mode 100644
index 0000000..354a71d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_3eff89(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_3eff89(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_3eff89(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_3eff89(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d5cf17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_3eff89 "textureNumLayers_3eff89"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_3eff89 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_3eff89
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_3eff89
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_3eff89
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.wgsl
new file mode 100644
index 0000000..4cd1f2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/3eff89.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, read>;
+
+fn textureNumLayers_3eff89() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_3eff89();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_3eff89();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_3eff89();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl
new file mode 100644
index 0000000..b43ff0e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<bgra8unorm, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<bgra8unorm, read>) -> u32
+fn textureNumLayers_485774() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_485774();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_485774();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_485774();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..50dcf17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_485774() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_485774();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_485774();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_485774();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..50dcf17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_485774() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_485774();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_485774();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_485774();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.glsl
new file mode 100644
index 0000000..c78c973
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_485774() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_485774();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_485774() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_485774();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_485774() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_485774();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.msl
new file mode 100644
index 0000000..819649b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_485774(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_485774(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_485774(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_485774(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.spvasm
new file mode 100644
index 0000000..d823359
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_485774 "textureNumLayers_485774"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_485774 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_485774
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_485774
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_485774
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.wgsl
new file mode 100644
index 0000000..0218d05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/485774.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<bgra8unorm, read>;
+
+fn textureNumLayers_485774() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_485774();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_485774();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_485774();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl
new file mode 100644
index 0000000..3d78db1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32sint, read>) -> u32
+fn textureNumLayers_4adaad() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_4adaad();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_4adaad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_4adaad();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f95ad80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_4adaad() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_4adaad();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_4adaad();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_4adaad();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f95ad80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_4adaad() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_4adaad();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_4adaad();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_4adaad();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.glsl
new file mode 100644
index 0000000..bce8848
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_4adaad() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_4adaad();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_4adaad() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_4adaad();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_4adaad() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_4adaad();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.msl
new file mode 100644
index 0000000..9b3717e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_4adaad(texture2d_array<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_4adaad(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_4adaad(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_4adaad(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.spvasm
new file mode 100644
index 0000000..7cf7ffc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_4adaad "textureNumLayers_4adaad"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_4adaad = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpCompositeExtract %uint %22 2
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %31 = OpLoad %uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureNumLayers_4adaad
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureNumLayers_4adaad
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureNumLayers_4adaad
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.wgsl
new file mode 100644
index 0000000..c556fc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/4adaad.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, read>;
+
+fn textureNumLayers_4adaad() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_4adaad();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_4adaad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_4adaad();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl
new file mode 100644
index 0000000..f957b79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16sint, read>) -> u32
+fn textureNumLayers_52dfc5() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_52dfc5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_52dfc5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_52dfc5();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ce39fe9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_52dfc5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_52dfc5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_52dfc5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_52dfc5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ce39fe9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_52dfc5() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_52dfc5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_52dfc5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_52dfc5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.glsl
new file mode 100644
index 0000000..1e85984
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_52dfc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_52dfc5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_52dfc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_52dfc5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_52dfc5() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_52dfc5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16i' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.msl
new file mode 100644
index 0000000..ee2aa11
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_52dfc5(texture2d_array<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_52dfc5(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_52dfc5(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_52dfc5(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.spvasm
new file mode 100644
index 0000000..1cb6705
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_52dfc5 "textureNumLayers_52dfc5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_52dfc5 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpCompositeExtract %uint %22 2
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %31 = OpLoad %uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureNumLayers_52dfc5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureNumLayers_52dfc5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureNumLayers_52dfc5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.wgsl
new file mode 100644
index 0000000..1089459
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/52dfc5.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, read>;
+
+fn textureNumLayers_52dfc5() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_52dfc5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_52dfc5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_52dfc5();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl
new file mode 100644
index 0000000..3e733c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16uint, read>) -> u32
+fn textureNumLayers_555f67() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_555f67();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_555f67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_555f67();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6f92f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_555f67() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_555f67();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_555f67();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_555f67();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6f92f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_555f67() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_555f67();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_555f67();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_555f67();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.glsl
new file mode 100644
index 0000000..333a772
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_555f67() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_555f67();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_555f67() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_555f67();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_555f67() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_555f67();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.msl
new file mode 100644
index 0000000..6d78ad6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_555f67(texture2d_array<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_555f67(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_555f67(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_555f67(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.spvasm
new file mode 100644
index 0000000..0ea8cdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_555f67 "textureNumLayers_555f67"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_555f67 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_555f67
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_555f67
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_555f67
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.wgsl
new file mode 100644
index 0000000..d854343
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/555f67.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, read>;
+
+fn textureNumLayers_555f67() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_555f67();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_555f67();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_555f67();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl
new file mode 100644
index 0000000..ad35d6b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<r32uint, read>) -> u32
+fn textureNumLayers_5f20d1() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_5f20d1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_5f20d1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_5f20d1();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b544a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_5f20d1() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_5f20d1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_5f20d1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_5f20d1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b544a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_5f20d1() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_5f20d1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_5f20d1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_5f20d1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.glsl
new file mode 100644
index 0000000..4f519d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_5f20d1() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_5f20d1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision highp float;
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_5f20d1() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_5f20d1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_5f20d1() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_5f20d1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.msl
new file mode 100644
index 0000000..9c1b49b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_5f20d1(texture2d_array<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_5f20d1(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_5f20d1(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_5f20d1(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.spvasm
new file mode 100644
index 0000000..d94d406
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_5f20d1 "textureNumLayers_5f20d1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_5f20d1 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_5f20d1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_5f20d1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_5f20d1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e59c46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/5f20d1.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, read>;
+
+fn textureNumLayers_5f20d1() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_5f20d1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_5f20d1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_5f20d1();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl
new file mode 100644
index 0000000..88c3b28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8snorm, read>) -> u32
+fn textureNumLayers_7895f4() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_7895f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_7895f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_7895f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9f2e891
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_7895f4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_7895f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_7895f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_7895f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9f2e891
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_7895f4() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_7895f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_7895f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_7895f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.glsl
new file mode 100644
index 0000000..4e081ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_7895f4() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_7895f4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_7895f4() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_7895f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_7895f4() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_7895f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8_snorm' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.msl
new file mode 100644
index 0000000..f10c2ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_7895f4(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_7895f4(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_7895f4(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_7895f4(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..e784c5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_7895f4 "textureNumLayers_7895f4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_7895f4 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_7895f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_7895f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_7895f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..d65c187
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/7895f4.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, read>;
+
+fn textureNumLayers_7895f4() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_7895f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_7895f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_7895f4();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl
new file mode 100644
index 0000000..3fddd14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32float, read>) -> u32
+fn textureNumLayers_90b8cc() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_90b8cc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_90b8cc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_90b8cc();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..456d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_90b8cc() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_90b8cc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_90b8cc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_90b8cc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..456d4cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_90b8cc() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_90b8cc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_90b8cc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_90b8cc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.glsl
new file mode 100644
index 0000000..9328703
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_90b8cc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_90b8cc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_90b8cc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_90b8cc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_90b8cc() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_90b8cc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.msl
new file mode 100644
index 0000000..68d4ef1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_90b8cc(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_90b8cc(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_90b8cc(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_90b8cc(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.spvasm
new file mode 100644
index 0000000..dc179ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.spvasm
@@ -0,0 +1,93 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_90b8cc "textureNumLayers_90b8cc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_90b8cc = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_90b8cc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_90b8cc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_90b8cc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.wgsl
new file mode 100644
index 0000000..b790fd2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/90b8cc.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, read>;
+
+fn textureNumLayers_90b8cc() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_90b8cc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_90b8cc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_90b8cc();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl
new file mode 100644
index 0000000..ab9e7f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba32uint, read>) -> u32
+fn textureNumLayers_9c60e3() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_9c60e3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_9c60e3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_9c60e3();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9182309
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_9c60e3() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_9c60e3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_9c60e3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_9c60e3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9182309
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_9c60e3() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_9c60e3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_9c60e3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_9c60e3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.glsl
new file mode 100644
index 0000000..52c985d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_9c60e3() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_9c60e3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_9c60e3() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_9c60e3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_9c60e3() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_9c60e3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba32ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.msl
new file mode 100644
index 0000000..aef15a9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_9c60e3(texture2d_array<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_9c60e3(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_9c60e3(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_9c60e3(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.spvasm
new file mode 100644
index 0000000..8b4883b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_9c60e3 "textureNumLayers_9c60e3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_9c60e3 = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_9c60e3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_9c60e3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_9c60e3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1d4558
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/9c60e3.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, read>;
+
+fn textureNumLayers_9c60e3() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_9c60e3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_9c60e3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_9c60e3();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl
new file mode 100644
index 0000000..c962cf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rg32sint, read>) -> u32
+fn textureNumLayers_bf2f76() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_bf2f76();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_bf2f76();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_bf2f76();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..663e444
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_bf2f76() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_bf2f76();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_bf2f76();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_bf2f76();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..663e444
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_bf2f76() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_bf2f76();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_bf2f76();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_bf2f76();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.glsl
new file mode 100644
index 0000000..4f834b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.glsl
@@ -0,0 +1,90 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_bf2f76() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_bf2f76();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_bf2f76() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_bf2f76();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp iimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_bf2f76() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_bf2f76();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.msl
new file mode 100644
index 0000000..3b11317
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_bf2f76(texture2d_array<int, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_bf2f76(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_bf2f76(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_bf2f76(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.spvasm
new file mode 100644
index 0000000..25ea7d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.spvasm
@@ -0,0 +1,94 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 46
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_bf2f76 "textureNumLayers_bf2f76"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %17 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %32 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_bf2f76 = OpFunction %void None %17
+         %20 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %27
+         %24 = OpLoad %11 %arg_0
+         %22 = OpImageQuerySize %v3uint %24
+         %21 = OpCompositeExtract %uint %22 2
+               OpStore %res %21
+         %30 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %31 = OpLoad %uint %res
+               OpStore %30 %31
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %32
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureNumLayers_bf2f76
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %17
+         %37 = OpLabel
+         %38 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %38
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %17
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureNumLayers_bf2f76
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %17
+         %44 = OpLabel
+         %45 = OpFunctionCall %void %textureNumLayers_bf2f76
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.wgsl
new file mode 100644
index 0000000..c45e919
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/bf2f76.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, read>;
+
+fn textureNumLayers_bf2f76() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_bf2f76();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_bf2f76();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_bf2f76();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl
new file mode 100644
index 0000000..82b1a2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba8uint, read>) -> u32
+fn textureNumLayers_d3e21f() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_d3e21f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_d3e21f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_d3e21f();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4df96f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_d3e21f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_d3e21f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_d3e21f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_d3e21f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4df96f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_d3e21f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_d3e21f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_d3e21f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_d3e21f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.glsl
new file mode 100644
index 0000000..77a2f8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_d3e21f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_d3e21f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_d3e21f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_d3e21f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp uimage2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_d3e21f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_d3e21f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba8ui' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.msl
new file mode 100644
index 0000000..a12821e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_d3e21f(texture2d_array<uint, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_d3e21f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_d3e21f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_d3e21f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d9c943
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_d3e21f "textureNumLayers_d3e21f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_d3e21f = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_d3e21f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_d3e21f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_d3e21f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.wgsl
new file mode 100644
index 0000000..66ec478
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/d3e21f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, read>;
+
+fn textureNumLayers_d3e21f() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_d3e21f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_d3e21f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_d3e21f();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl
new file mode 100644
index 0000000..c78318c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl
@@ -0,0 +1,48 @@
+// Copyright 2023 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+
+enable chromium_experimental_read_write_storage_texture;
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, read>;
+
+// fn textureNumLayers(texture: texture_storage_2d_array<rgba16float, read>) -> u32
+fn textureNumLayers_f1783f() {
+  var res: u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_f1783f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_f1783f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_f1783f();
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1227a33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_f1783f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_f1783f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_f1783f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_f1783f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1227a33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+RWByteAddressBuffer prevent_dce : register(u0, space2);
+
+void textureNumLayers_f1783f() {
+  uint3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint res = tint_tmp.z;
+  prevent_dce.Store(0u, asuint(res));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureNumLayers_f1783f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureNumLayers_f1783f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureNumLayers_f1783f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.glsl
new file mode 100644
index 0000000..d22ea52
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.glsl
@@ -0,0 +1,87 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_f1783f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+vec4 vertex_main() {
+  textureNumLayers_f1783f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision highp float;
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_f1783f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void fragment_main() {
+  textureNumLayers_f1783f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp image2DArray arg_0;
+layout(binding = 0, std430) buffer prevent_dce_block_ssbo {
+  uint inner;
+} prevent_dce;
+
+void textureNumLayers_f1783f() {
+  uint res = uint(imageSize(arg_0).z);
+  prevent_dce.inner = res;
+}
+
+void compute_main() {
+  textureNumLayers_f1783f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'rgba16f' : format requires readonly or writeonly memory qualifier 
+ERROR: 1 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.msl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.msl
new file mode 100644
index 0000000..9d18251
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureNumLayers_f1783f(texture2d_array<float, access::read> tint_symbol_1, device uint* const tint_symbol_2) {
+  uint res = tint_symbol_1.get_array_size();
+  *(tint_symbol_2) = res;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::read> tint_symbol_3, device uint* const tint_symbol_4) {
+  textureNumLayers_f1783f(tint_symbol_3, tint_symbol_4);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::read> tint_symbol_5 [[texture(0)]], device uint* tint_symbol_6 [[buffer(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_5, tint_symbol_6);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::read> tint_symbol_7 [[texture(0)]], device uint* tint_symbol_8 [[buffer(0)]]) {
+  textureNumLayers_f1783f(tint_symbol_7, tint_symbol_8);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::read> tint_symbol_9 [[texture(0)]], device uint* tint_symbol_10 [[buffer(0)]]) {
+  textureNumLayers_f1783f(tint_symbol_9, tint_symbol_10);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.spvasm
new file mode 100644
index 0000000..076c9df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.spvasm
@@ -0,0 +1,92 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %prevent_dce_block "prevent_dce_block"
+               OpMemberName %prevent_dce_block 0 "inner"
+               OpName %prevent_dce "prevent_dce"
+               OpName %textureNumLayers_f1783f "textureNumLayers_f1783f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonWritable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+               OpDecorate %prevent_dce_block Block
+               OpMemberDecorate %prevent_dce_block 0 Offset 0
+               OpDecorate %prevent_dce DescriptorSet 2
+               OpDecorate %prevent_dce Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%prevent_dce_block = OpTypeStruct %uint
+%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
+%prevent_dce = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
+       %void = OpTypeVoid
+         %16 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %26 = OpConstantNull %uint
+     %uint_0 = OpConstant %uint 0
+%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureNumLayers_f1783f = OpFunction %void None %16
+         %19 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %26
+         %23 = OpLoad %11 %arg_0
+         %21 = OpImageQuerySize %v3uint %23
+         %20 = OpCompositeExtract %uint %21 2
+               OpStore %res %20
+         %29 = OpAccessChain %_ptr_StorageBuffer_uint %prevent_dce %uint_0
+         %30 = OpLoad %uint %res
+               OpStore %29 %30
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureNumLayers_f1783f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %16
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %16
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureNumLayers_f1783f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %16
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureNumLayers_f1783f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9fc058
--- /dev/null
+++ b/test/tint/builtins/gen/literal/textureNumLayers/f1783f.wgsl.expected.wgsl
@@ -0,0 +1,26 @@
+enable chromium_experimental_read_write_storage_texture;
+
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, read>;
+
+fn textureNumLayers_f1783f() {
+  var res : u32 = textureNumLayers(arg_0);
+  prevent_dce = res;
+}
+
+@group(2) @binding(0) var<storage, read_write> prevent_dce : u32;
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureNumLayers_f1783f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureNumLayers_f1783f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureNumLayers_f1783f();
+}