tint: End-to-end tests for f16 built-in

This patch add Tint end-to-end tests for built-ins using f16 types.

Bug: tint:1473, tint:1502
Change-Id: I09db6e0b7e90541fb246e11d475e27be96a6d07e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97340
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl
new file mode 100644
index 0000000..9319b46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn abs(vec<3, f16>) -> vec<3, f16>
+fn abs_421ca3() {
+  var res: vec3<f16> = abs(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_421ca3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_421ca3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_421ca3();
+}
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..21a367b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void abs_421ca3() {
+  vector<float16_t, 3> res = abs((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_421ca3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_421ca3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_421ca3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ca0d46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void abs_421ca3() {
+  vector<float16_t, 3> res = abs((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_421ca3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_421ca3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_421ca3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D461B57CF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl
new file mode 100644
index 0000000..7a0603d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_421ca3() {
+  f16vec3 res = abs(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  abs_421ca3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void abs_421ca3() {
+  f16vec3 res = abs(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  abs_421ca3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_421ca3() {
+  f16vec3 res = abs(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  abs_421ca3();
+}
+
+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/abs/421ca3.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl
new file mode 100644
index 0000000..24f22ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_421ca3() {
+  half3 res = fabs(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  abs_421ca3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  abs_421ca3();
+  return;
+}
+
+kernel void compute_main() {
+  abs_421ca3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm
new file mode 100644
index 0000000..4dc29a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %abs_421ca3 "abs_421ca3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_421ca3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 FAbs %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %abs_421ca3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %abs_421ca3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %abs_421ca3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl
new file mode 100644
index 0000000..e3f2507
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/421ca3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn abs_421ca3() {
+  var res : vec3<f16> = abs(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_421ca3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_421ca3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_421ca3();
+}
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl
new file mode 100644
index 0000000..eaefc98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn abs(vec<4, f16>) -> vec<4, f16>
+fn abs_538d29() {
+  var res: vec4<f16> = abs(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_538d29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_538d29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_538d29();
+}
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1ce3e01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void abs_538d29() {
+  vector<float16_t, 4> res = abs((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_538d29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_538d29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_538d29();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d6ca9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void abs_538d29() {
+  vector<float16_t, 4> res = abs((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_538d29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_538d29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_538d29();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C4B2837D80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl
new file mode 100644
index 0000000..64b283b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_538d29() {
+  f16vec4 res = abs(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  abs_538d29();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void abs_538d29() {
+  f16vec4 res = abs(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  abs_538d29();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_538d29() {
+  f16vec4 res = abs(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  abs_538d29();
+}
+
+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/abs/538d29.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl
new file mode 100644
index 0000000..867e989
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_538d29() {
+  half4 res = fabs(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  abs_538d29();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  abs_538d29();
+  return;
+}
+
+kernel void compute_main() {
+  abs_538d29();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm
new file mode 100644
index 0000000..d3446768
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %abs_538d29 "abs_538d29"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_538d29 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 FAbs %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %abs_538d29
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %abs_538d29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %abs_538d29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl
new file mode 100644
index 0000000..5501b23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/538d29.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn abs_538d29() {
+  var res : vec4<f16> = abs(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_538d29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_538d29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_538d29();
+}
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl
new file mode 100644
index 0000000..d6c5261
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn abs(vec<2, f16>) -> vec<2, f16>
+fn abs_5ae4fe() {
+  var res: vec2<f16> = abs(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_5ae4fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_5ae4fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_5ae4fe();
+}
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8ecbd1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void abs_5ae4fe() {
+  vector<float16_t, 2> res = abs((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_5ae4fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_5ae4fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_5ae4fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..427ca6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void abs_5ae4fe() {
+  vector<float16_t, 2> res = abs((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_5ae4fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_5ae4fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_5ae4fe();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026FB61B87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl
new file mode 100644
index 0000000..e38ffb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_5ae4fe() {
+  f16vec2 res = abs(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  abs_5ae4fe();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void abs_5ae4fe() {
+  f16vec2 res = abs(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  abs_5ae4fe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_5ae4fe() {
+  f16vec2 res = abs(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  abs_5ae4fe();
+}
+
+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/abs/5ae4fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl
new file mode 100644
index 0000000..3048925
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_5ae4fe() {
+  half2 res = fabs(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  abs_5ae4fe();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  abs_5ae4fe();
+  return;
+}
+
+kernel void compute_main() {
+  abs_5ae4fe();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..0827248
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %abs_5ae4fe "abs_5ae4fe"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_5ae4fe = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 FAbs %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %abs_5ae4fe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %abs_5ae4fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %abs_5ae4fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..c1e8f24
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/5ae4fe.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn abs_5ae4fe() {
+  var res : vec2<f16> = abs(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_5ae4fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_5ae4fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_5ae4fe();
+}
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl
new file mode 100644
index 0000000..63cc56d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn abs(f16) -> f16
+fn abs_fd247f() {
+  var res: f16 = abs(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_fd247f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_fd247f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_fd247f();
+}
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6f68c08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void abs_fd247f() {
+  float16_t res = abs(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_fd247f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_fd247f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_fd247f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a341373
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void abs_fd247f() {
+  float16_t res = abs(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  abs_fd247f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  abs_fd247f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  abs_fd247f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C7205F8830(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl
new file mode 100644
index 0000000..2c864eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_fd247f() {
+  float16_t res = abs(0.0hf);
+}
+
+vec4 vertex_main() {
+  abs_fd247f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void abs_fd247f() {
+  float16_t res = abs(0.0hf);
+}
+
+void fragment_main() {
+  abs_fd247f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void abs_fd247f() {
+  float16_t res = abs(0.0hf);
+}
+
+void compute_main() {
+  abs_fd247f();
+}
+
+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/abs/fd247f.wgsl.expected.msl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl
new file mode 100644
index 0000000..6c6c738
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void abs_fd247f() {
+  half res = fabs(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  abs_fd247f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  abs_fd247f();
+  return;
+}
+
+kernel void compute_main() {
+  abs_fd247f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm
new file mode 100644
index 0000000..3472743
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %abs_fd247f "abs_fd247f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %abs_fd247f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 FAbs %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %abs_fd247f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %abs_fd247f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %abs_fd247f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl
new file mode 100644
index 0000000..28cbd46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/abs/fd247f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn abs_fd247f() {
+  var res : f16 = abs(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  abs_fd247f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  abs_fd247f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  abs_fd247f();
+}
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl
new file mode 100644
index 0000000..35e62ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acos(vec<2, f16>) -> vec<2, f16>
+fn acos_004aff() {
+  var res: vec2<f16> = acos(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_004aff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_004aff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_004aff();
+}
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..92b5765
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void acos_004aff() {
+  vector<float16_t, 2> res = acos((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_004aff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_004aff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_004aff();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e66364b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void acos_004aff() {
+  vector<float16_t, 2> res = acos((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_004aff();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_004aff();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_004aff();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F5C6E5B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl
new file mode 100644
index 0000000..c4dd057
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_004aff() {
+  f16vec2 res = acos(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  acos_004aff();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void acos_004aff() {
+  f16vec2 res = acos(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  acos_004aff();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_004aff() {
+  f16vec2 res = acos(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  acos_004aff();
+}
+
+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/acos/004aff.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl
new file mode 100644
index 0000000..4d9f5a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_004aff() {
+  half2 res = acos(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acos_004aff();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acos_004aff();
+  return;
+}
+
+kernel void compute_main() {
+  acos_004aff();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm
new file mode 100644
index 0000000..cbde032
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %acos_004aff "acos_004aff"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_004aff = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Acos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %acos_004aff
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %acos_004aff
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %acos_004aff
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl
new file mode 100644
index 0000000..57a6cb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/004aff.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acos_004aff() {
+  var res : vec2<f16> = acos(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_004aff();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_004aff();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_004aff();
+}
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl b/test/tint/builtins/gen/literal/acos/203628.wgsl
new file mode 100644
index 0000000..e5f2df8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acos(vec<4, f16>) -> vec<4, f16>
+fn acos_203628() {
+  var res: vec4<f16> = acos(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_203628();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_203628();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_203628();
+}
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..886ea95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void acos_203628() {
+  vector<float16_t, 4> res = acos((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_203628();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_203628();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_203628();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3ee115e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void acos_203628() {
+  vector<float16_t, 4> res = acos((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_203628();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_203628();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_203628();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019D14DE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl
new file mode 100644
index 0000000..0dbc198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_203628() {
+  f16vec4 res = acos(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  acos_203628();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void acos_203628() {
+  f16vec4 res = acos(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  acos_203628();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_203628() {
+  f16vec4 res = acos(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  acos_203628();
+}
+
+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/acos/203628.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl
new file mode 100644
index 0000000..4aeebba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_203628() {
+  half4 res = acos(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acos_203628();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acos_203628();
+  return;
+}
+
+kernel void compute_main() {
+  acos_203628();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm
new file mode 100644
index 0000000..7807c72
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %acos_203628 "acos_203628"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_203628 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Acos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %acos_203628
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %acos_203628
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %acos_203628
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl
new file mode 100644
index 0000000..ebbc42e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/203628.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acos_203628() {
+  var res : vec4<f16> = acos(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_203628();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_203628();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_203628();
+}
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl
new file mode 100644
index 0000000..959d129
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acos(f16) -> f16
+fn acos_303e3d() {
+  var res: f16 = acos(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_303e3d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_303e3d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_303e3d();
+}
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87a3b3a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void acos_303e3d() {
+  float16_t res = acos(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_303e3d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_303e3d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_303e3d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa8c371
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void acos_303e3d() {
+  float16_t res = acos(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_303e3d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_303e3d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_303e3d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021AE9120540(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl
new file mode 100644
index 0000000..757f182
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_303e3d() {
+  float16_t res = acos(0.0hf);
+}
+
+vec4 vertex_main() {
+  acos_303e3d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void acos_303e3d() {
+  float16_t res = acos(0.0hf);
+}
+
+void fragment_main() {
+  acos_303e3d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_303e3d() {
+  float16_t res = acos(0.0hf);
+}
+
+void compute_main() {
+  acos_303e3d();
+}
+
+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/acos/303e3d.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl
new file mode 100644
index 0000000..913e3fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_303e3d() {
+  half res = acos(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acos_303e3d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acos_303e3d();
+  return;
+}
+
+kernel void compute_main() {
+  acos_303e3d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm
new file mode 100644
index 0000000..9df9a98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %acos_303e3d "acos_303e3d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_303e3d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Acos %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %acos_303e3d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %acos_303e3d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %acos_303e3d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl
new file mode 100644
index 0000000..d9f5be3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/303e3d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acos_303e3d() {
+  var res : f16 = acos(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_303e3d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_303e3d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_303e3d();
+}
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl
new file mode 100644
index 0000000..9195ffb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acos(vec<3, f16>) -> vec<3, f16>
+fn acos_f47057() {
+  var res: vec3<f16> = acos(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_f47057();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_f47057();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_f47057();
+}
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7cf8ba2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void acos_f47057() {
+  vector<float16_t, 3> res = acos((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_f47057();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_f47057();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_f47057();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38dd9cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void acos_f47057() {
+  vector<float16_t, 3> res = acos((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acos_f47057();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acos_f47057();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acos_f47057();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020584057560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl
new file mode 100644
index 0000000..4e2cbd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_f47057() {
+  f16vec3 res = acos(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  acos_f47057();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void acos_f47057() {
+  f16vec3 res = acos(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  acos_f47057();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void acos_f47057() {
+  f16vec3 res = acos(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  acos_f47057();
+}
+
+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/acos/f47057.wgsl.expected.msl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl
new file mode 100644
index 0000000..e74d29b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void acos_f47057() {
+  half3 res = acos(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acos_f47057();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acos_f47057();
+  return;
+}
+
+kernel void compute_main() {
+  acos_f47057();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm
new file mode 100644
index 0000000..00895bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %acos_f47057 "acos_f47057"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%acos_f47057 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Acos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %acos_f47057
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %acos_f47057
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %acos_f47057
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe4125d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acos/f47057.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acos_f47057() {
+  var res : vec3<f16> = acos(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acos_f47057();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acos_f47057();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acos_f47057();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl
new file mode 100644
index 0000000..a4b0dab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acosh(vec<2, f16>) -> vec<2, f16>
+fn acosh_5f49d8() {
+  var res: vec2<f16> = acosh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_5f49d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_5f49d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_5f49d8();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ba3054
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 2> tint_acosh(vector<float16_t, 2> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_5f49d8() {
+  vector<float16_t, 2> res = tint_acosh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_5f49d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_5f49d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_5f49d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..44e42cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 2> tint_acosh(vector<float16_t, 2> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_5f49d8() {
+  vector<float16_t, 2> res = tint_acosh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_5f49d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_5f49d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_5f49d8();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001641C7488B0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl
new file mode 100644
index 0000000..1297122
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_acosh(f16vec2 x) {
+  return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
+}
+
+void acosh_5f49d8() {
+  f16vec2 res = tint_acosh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  acosh_5f49d8();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec2 tint_acosh(f16vec2 x) {
+  return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
+}
+
+void acosh_5f49d8() {
+  f16vec2 res = tint_acosh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  acosh_5f49d8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_acosh(f16vec2 x) {
+  return mix(acosh(x), f16vec2(0.0hf), lessThan(x, f16vec2(1.0hf)));
+}
+
+void acosh_5f49d8() {
+  f16vec2 res = tint_acosh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  acosh_5f49d8();
+}
+
+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/acosh/5f49d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl
new file mode 100644
index 0000000..9245c57
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half2 tint_acosh(half2 x) {
+  return select(acosh(x), half2(0.0h), (x < half2(1.0h)));
+}
+
+void acosh_5f49d8() {
+  half2 res = tint_acosh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acosh_5f49d8();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acosh_5f49d8();
+  return;
+}
+
+kernel void compute_main() {
+  acosh_5f49d8();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..79bf1ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_acosh "tint_acosh"
+               OpName %x "x"
+               OpName %acosh_5f49d8 "acosh_5f49d8"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+          %9 = OpTypeFunction %v2half %v2half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+         %21 = OpConstantNull %v2half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_acosh = OpFunction %v2half None %9
+          %x = OpFunctionParameter %v2half
+         %14 = OpLabel
+         %18 = OpFOrdLessThan %v2bool %x %17
+         %22 = OpExtInst %v2half %23 Acosh %x
+         %15 = OpSelect %v2half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%acosh_5f49d8 = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %21
+         %28 = OpFunctionCall %v2half %tint_acosh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %acosh_5f49d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %acosh_5f49d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %acosh_5f49d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..54e3b93
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/5f49d8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acosh_5f49d8() {
+  var res : vec2<f16> = acosh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_5f49d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_5f49d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_5f49d8();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl
new file mode 100644
index 0000000..9b93d25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acosh(f16) -> f16
+fn acosh_a37dfe() {
+  var res: f16 = acosh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_a37dfe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_a37dfe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_a37dfe();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0a48295
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+float16_t tint_acosh(float16_t x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_a37dfe() {
+  float16_t res = tint_acosh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_a37dfe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_a37dfe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_a37dfe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89d2293
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+float16_t tint_acosh(float16_t x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_a37dfe() {
+  float16_t res = tint_acosh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_a37dfe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_a37dfe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_a37dfe();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000285D7A33130(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl
new file mode 100644
index 0000000..e7752e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_acosh(float16_t x) {
+  return ((x < 1.0hf) ? 0.0hf : acosh(x));
+}
+
+void acosh_a37dfe() {
+  float16_t res = tint_acosh(0.0hf);
+}
+
+vec4 vertex_main() {
+  acosh_a37dfe();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+float16_t tint_acosh(float16_t x) {
+  return ((x < 1.0hf) ? 0.0hf : acosh(x));
+}
+
+void acosh_a37dfe() {
+  float16_t res = tint_acosh(0.0hf);
+}
+
+void fragment_main() {
+  acosh_a37dfe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_acosh(float16_t x) {
+  return ((x < 1.0hf) ? 0.0hf : acosh(x));
+}
+
+void acosh_a37dfe() {
+  float16_t res = tint_acosh(0.0hf);
+}
+
+void compute_main() {
+  acosh_a37dfe();
+}
+
+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/acosh/a37dfe.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl
new file mode 100644
index 0000000..09a8e2d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half tint_acosh(half x) {
+  return select(acosh(x), 0.0h, (x < 1.0h));
+}
+
+void acosh_a37dfe() {
+  half res = tint_acosh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acosh_a37dfe();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acosh_a37dfe();
+  return;
+}
+
+kernel void compute_main() {
+  acosh_a37dfe();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm
new file mode 100644
index 0000000..e5071ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %20 = OpExtInstImport "GLSL.std.450"
+               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 %tint_acosh "tint_acosh"
+               OpName %x "x"
+               OpName %acosh_a37dfe "acosh_a37dfe"
+               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
+      %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
+       %half = OpTypeFloat 16
+          %9 = OpTypeFunction %half %half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+       %bool = OpTypeBool
+         %18 = OpConstantNull %half
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_Function_half = OpTypePointer Function %half
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_acosh = OpFunction %half None %9
+          %x = OpFunctionParameter %half
+         %13 = OpLabel
+         %16 = OpFOrdLessThan %bool %x %half_0x1p_0
+         %19 = OpExtInst %half %20 Acosh %x
+         %14 = OpSelect %half %16 %18 %19
+               OpReturnValue %14
+               OpFunctionEnd
+%acosh_a37dfe = OpFunction %void None %21
+         %24 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %18
+         %25 = OpFunctionCall %half %tint_acosh %18
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %acosh_a37dfe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %21
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %acosh_a37dfe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %acosh_a37dfe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl
new file mode 100644
index 0000000..983b91c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/a37dfe.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acosh_a37dfe() {
+  var res : f16 = acosh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_a37dfe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_a37dfe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_a37dfe();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl
new file mode 100644
index 0000000..4f64c07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acosh(vec<4, f16>) -> vec<4, f16>
+fn acosh_de60d8() {
+  var res: vec4<f16> = acosh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_de60d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_de60d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_de60d8();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5de3f3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 4> tint_acosh(vector<float16_t, 4> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_de60d8() {
+  vector<float16_t, 4> res = tint_acosh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_de60d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_de60d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_de60d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3c8ea41
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 4> tint_acosh(vector<float16_t, 4> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_de60d8() {
+  vector<float16_t, 4> res = tint_acosh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_de60d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_de60d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_de60d8();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027AF4D645C0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl
new file mode 100644
index 0000000..439999f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_acosh(f16vec4 x) {
+  return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
+}
+
+void acosh_de60d8() {
+  f16vec4 res = tint_acosh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  acosh_de60d8();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec4 tint_acosh(f16vec4 x) {
+  return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
+}
+
+void acosh_de60d8() {
+  f16vec4 res = tint_acosh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  acosh_de60d8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_acosh(f16vec4 x) {
+  return mix(acosh(x), f16vec4(0.0hf), lessThan(x, f16vec4(1.0hf)));
+}
+
+void acosh_de60d8() {
+  f16vec4 res = tint_acosh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  acosh_de60d8();
+}
+
+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/acosh/de60d8.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl
new file mode 100644
index 0000000..39b26d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half4 tint_acosh(half4 x) {
+  return select(acosh(x), half4(0.0h), (x < half4(1.0h)));
+}
+
+void acosh_de60d8() {
+  half4 res = tint_acosh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acosh_de60d8();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acosh_de60d8();
+  return;
+}
+
+kernel void compute_main() {
+  acosh_de60d8();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..220c72a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_acosh "tint_acosh"
+               OpName %x "x"
+               OpName %acosh_de60d8 "acosh_de60d8"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+          %9 = OpTypeFunction %v4half %v4half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+         %21 = OpConstantNull %v4half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_acosh = OpFunction %v4half None %9
+          %x = OpFunctionParameter %v4half
+         %14 = OpLabel
+         %18 = OpFOrdLessThan %v4bool %x %17
+         %22 = OpExtInst %v4half %23 Acosh %x
+         %15 = OpSelect %v4half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%acosh_de60d8 = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %21
+         %28 = OpFunctionCall %v4half %tint_acosh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %acosh_de60d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %acosh_de60d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %acosh_de60d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..1fdbcb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/de60d8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acosh_de60d8() {
+  var res : vec4<f16> = acosh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_de60d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_de60d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_de60d8();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl
new file mode 100644
index 0000000..40db5d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn acosh(vec<3, f16>) -> vec<3, f16>
+fn acosh_f56574() {
+  var res: vec3<f16> = acosh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_f56574();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_f56574();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_f56574();
+}
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..72b7eb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 3> tint_acosh(vector<float16_t, 3> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_f56574() {
+  vector<float16_t, 3> res = tint_acosh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_f56574();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_f56574();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_f56574();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a35e840b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 3> tint_acosh(vector<float16_t, 3> x) {
+  return log((x + sqrt(((x * x) - float16_t(1.0h)))));
+}
+
+void acosh_f56574() {
+  vector<float16_t, 3> res = tint_acosh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  acosh_f56574();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  acosh_f56574();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  acosh_f56574();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221246484D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl
new file mode 100644
index 0000000..20527af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_acosh(f16vec3 x) {
+  return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
+}
+
+void acosh_f56574() {
+  f16vec3 res = tint_acosh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  acosh_f56574();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec3 tint_acosh(f16vec3 x) {
+  return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
+}
+
+void acosh_f56574() {
+  f16vec3 res = tint_acosh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  acosh_f56574();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_acosh(f16vec3 x) {
+  return mix(acosh(x), f16vec3(0.0hf), lessThan(x, f16vec3(1.0hf)));
+}
+
+void acosh_f56574() {
+  f16vec3 res = tint_acosh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  acosh_f56574();
+}
+
+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/acosh/f56574.wgsl.expected.msl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl
new file mode 100644
index 0000000..df354ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half3 tint_acosh(half3 x) {
+  return select(acosh(x), half3(0.0h), (x < half3(1.0h)));
+}
+
+void acosh_f56574() {
+  half3 res = tint_acosh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  acosh_f56574();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  acosh_f56574();
+  return;
+}
+
+kernel void compute_main() {
+  acosh_f56574();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1bec97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_acosh "tint_acosh"
+               OpName %x "x"
+               OpName %acosh_f56574 "acosh_f56574"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+          %9 = OpTypeFunction %v3half %v3half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+         %21 = OpConstantNull %v3half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_acosh = OpFunction %v3half None %9
+          %x = OpFunctionParameter %v3half
+         %14 = OpLabel
+         %18 = OpFOrdLessThan %v3bool %x %17
+         %22 = OpExtInst %v3half %23 Acosh %x
+         %15 = OpSelect %v3half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%acosh_f56574 = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %21
+         %28 = OpFunctionCall %v3half %tint_acosh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %acosh_f56574
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %acosh_f56574
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %acosh_f56574
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl
new file mode 100644
index 0000000..2eff0f0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/acosh/f56574.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn acosh_f56574() {
+  var res : vec3<f16> = acosh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  acosh_f56574();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  acosh_f56574();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  acosh_f56574();
+}
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl
new file mode 100644
index 0000000..0a04948
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 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 f16;
+struct SB_RO {
+  arg_0: array<f16>,
+};
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+
+// fn arrayLength(ptr<storage, array<f16>, read>) -> u32
+fn arrayLength_8421b9() {
+  var res: u32 = arrayLength(&sb_ro.arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_8421b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  arrayLength_8421b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  arrayLength_8421b9();
+}
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.glsl
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.msl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.spvasm
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..233c92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/8421b9.wgsl.expected.wgsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/8421b9.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RO {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RO {
+^^^^^^
+
+gen/literal/arrayLength/8421b9.wgsl:28:42 note: see declaration of variable
+@group(0) @binding(1) var<storage, read> sb_ro : SB_RO;
+                                         ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl
new file mode 100644
index 0000000..e457a8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl
@@ -0,0 +1,49 @@
+// Copyright 2022 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 f16;
+struct SB_RW {
+  arg_0: array<f16>,
+};
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+
+// fn arrayLength(ptr<storage, array<f16>, read_write>) -> u32
+fn arrayLength_cbd6b5() {
+  var res: u32 = arrayLength(&sb_rw.arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  arrayLength_cbd6b5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  arrayLength_cbd6b5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  arrayLength_cbd6b5();
+}
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.glsl
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.glsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.msl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.spvasm
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
new file mode 100644
index 0000000..e0a5253
--- /dev/null
+++ b/test/tint/builtins/gen/literal/arrayLength/cbd6b5.wgsl.expected.wgsl
@@ -0,0 +1,17 @@
+SKIP: FAILED
+
+gen/literal/arrayLength/cbd6b5.wgsl:26:10 error: using f16 types in 'storage' storage class is not implemented yet
+  arg_0: array<f16>,
+         ^^^^^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:25:1 note: see layout of struct:
+/*           align(2) size(2) */ struct SB_RW {
+/* offset(0) align(2) size(2) */   arg_0 : array<f16>;
+/*                            */ };
+struct SB_RW {
+^^^^^^
+
+gen/literal/arrayLength/cbd6b5.wgsl:28:48 note: see declaration of variable
+@group(0) @binding(0) var<storage, read_write> sb_rw : SB_RW;
+                                               ^^^^^
+
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl
new file mode 100644
index 0000000..83b5763
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asin(f16) -> f16
+fn asin_11dfda() {
+  var res: f16 = asin(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_11dfda();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_11dfda();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_11dfda();
+}
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9ae29a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void asin_11dfda() {
+  float16_t res = asin(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_11dfda();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_11dfda();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_11dfda();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e6aa1fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void asin_11dfda() {
+  float16_t res = asin(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_11dfda();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_11dfda();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_11dfda();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FA9E277D20(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl
new file mode 100644
index 0000000..798e3f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_11dfda() {
+  float16_t res = asin(0.0hf);
+}
+
+vec4 vertex_main() {
+  asin_11dfda();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asin_11dfda() {
+  float16_t res = asin(0.0hf);
+}
+
+void fragment_main() {
+  asin_11dfda();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_11dfda() {
+  float16_t res = asin(0.0hf);
+}
+
+void compute_main() {
+  asin_11dfda();
+}
+
+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/asin/11dfda.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl
new file mode 100644
index 0000000..6db79be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_11dfda() {
+  half res = asin(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asin_11dfda();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asin_11dfda();
+  return;
+}
+
+kernel void compute_main() {
+  asin_11dfda();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm
new file mode 100644
index 0000000..27644d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %asin_11dfda "asin_11dfda"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_11dfda = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Asin %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %asin_11dfda
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %asin_11dfda
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %asin_11dfda
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1b5976
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/11dfda.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asin_11dfda() {
+  var res : f16 = asin(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_11dfda();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_11dfda();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_11dfda();
+}
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl
new file mode 100644
index 0000000..d21bfd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asin(vec<3, f16>) -> vec<3, f16>
+fn asin_2d8e29() {
+  var res: vec3<f16> = asin(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_2d8e29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_2d8e29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_2d8e29();
+}
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..52b2e05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void asin_2d8e29() {
+  vector<float16_t, 3> res = asin((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_2d8e29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_2d8e29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_2d8e29();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3078022
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void asin_2d8e29() {
+  vector<float16_t, 3> res = asin((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_2d8e29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_2d8e29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_2d8e29();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000140BC7EE140(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl
new file mode 100644
index 0000000..fb569f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_2d8e29() {
+  f16vec3 res = asin(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  asin_2d8e29();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asin_2d8e29() {
+  f16vec3 res = asin(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  asin_2d8e29();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_2d8e29() {
+  f16vec3 res = asin(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  asin_2d8e29();
+}
+
+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/asin/2d8e29.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl
new file mode 100644
index 0000000..708107e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_2d8e29() {
+  half3 res = asin(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asin_2d8e29();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asin_2d8e29();
+  return;
+}
+
+kernel void compute_main() {
+  asin_2d8e29();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm
new file mode 100644
index 0000000..1f23d53
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asin_2d8e29 "asin_2d8e29"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_2d8e29 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Asin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asin_2d8e29
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asin_2d8e29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asin_2d8e29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f97bd2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/2d8e29.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asin_2d8e29() {
+  var res : vec3<f16> = asin(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_2d8e29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_2d8e29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_2d8e29();
+}
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl
new file mode 100644
index 0000000..44991ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asin(vec<4, f16>) -> vec<4, f16>
+fn asin_3cfbd4() {
+  var res: vec4<f16> = asin(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_3cfbd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_3cfbd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_3cfbd4();
+}
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..361aec8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void asin_3cfbd4() {
+  vector<float16_t, 4> res = asin((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_3cfbd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_3cfbd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_3cfbd4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d868fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void asin_3cfbd4() {
+  vector<float16_t, 4> res = asin((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_3cfbd4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_3cfbd4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_3cfbd4();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B4BDC88B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl
new file mode 100644
index 0000000..1ce2ff2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_3cfbd4() {
+  f16vec4 res = asin(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  asin_3cfbd4();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asin_3cfbd4() {
+  f16vec4 res = asin(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  asin_3cfbd4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_3cfbd4() {
+  f16vec4 res = asin(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  asin_3cfbd4();
+}
+
+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/asin/3cfbd4.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl
new file mode 100644
index 0000000..d06d2ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_3cfbd4() {
+  half4 res = asin(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asin_3cfbd4();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asin_3cfbd4();
+  return;
+}
+
+kernel void compute_main() {
+  asin_3cfbd4();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm
new file mode 100644
index 0000000..bdbb112
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asin_3cfbd4 "asin_3cfbd4"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_3cfbd4 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Asin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asin_3cfbd4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asin_3cfbd4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asin_3cfbd4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl
new file mode 100644
index 0000000..63c66a1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/3cfbd4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asin_3cfbd4() {
+  var res : vec4<f16> = asin(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_3cfbd4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_3cfbd4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_3cfbd4();
+}
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl
new file mode 100644
index 0000000..591bac3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asin(vec<2, f16>) -> vec<2, f16>
+fn asin_b4aced() {
+  var res: vec2<f16> = asin(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_b4aced();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_b4aced();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_b4aced();
+}
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ab5d608
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void asin_b4aced() {
+  vector<float16_t, 2> res = asin((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_b4aced();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_b4aced();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_b4aced();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c17039a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void asin_b4aced() {
+  vector<float16_t, 2> res = asin((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asin_b4aced();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asin_b4aced();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asin_b4aced();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000138E6B7E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl
new file mode 100644
index 0000000..29e01f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_b4aced() {
+  f16vec2 res = asin(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  asin_b4aced();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asin_b4aced() {
+  f16vec2 res = asin(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  asin_b4aced();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asin_b4aced() {
+  f16vec2 res = asin(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  asin_b4aced();
+}
+
+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/asin/b4aced.wgsl.expected.msl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl
new file mode 100644
index 0000000..81e1965
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asin_b4aced() {
+  half2 res = asin(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asin_b4aced();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asin_b4aced();
+  return;
+}
+
+kernel void compute_main() {
+  asin_b4aced();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm
new file mode 100644
index 0000000..2515d21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asin_b4aced "asin_b4aced"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asin_b4aced = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Asin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asin_b4aced
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asin_b4aced
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asin_b4aced
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl
new file mode 100644
index 0000000..545e7c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asin/b4aced.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asin_b4aced() {
+  var res : vec2<f16> = asin(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asin_b4aced();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asin_b4aced();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asin_b4aced();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl
new file mode 100644
index 0000000..884a6b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asinh(f16) -> f16
+fn asinh_468a48() {
+  var res: f16 = asinh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_468a48();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_468a48();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_468a48();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7080041
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+float16_t tint_sinh(float16_t x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_468a48() {
+  float16_t res = tint_sinh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_468a48();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_468a48();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_468a48();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c76be3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+float16_t tint_sinh(float16_t x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_468a48() {
+  float16_t res = tint_sinh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_468a48();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_468a48();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_468a48();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C0A8E8450(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl
new file mode 100644
index 0000000..f688b6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_468a48() {
+  float16_t res = asinh(0.0hf);
+}
+
+vec4 vertex_main() {
+  asinh_468a48();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asinh_468a48() {
+  float16_t res = asinh(0.0hf);
+}
+
+void fragment_main() {
+  asinh_468a48();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_468a48() {
+  float16_t res = asinh(0.0hf);
+}
+
+void compute_main() {
+  asinh_468a48();
+}
+
+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/asinh/468a48.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl
new file mode 100644
index 0000000..dab5282
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_468a48() {
+  half res = asinh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asinh_468a48();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asinh_468a48();
+  return;
+}
+
+kernel void compute_main() {
+  asinh_468a48();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm
new file mode 100644
index 0000000..6b2056f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %asinh_468a48 "asinh_468a48"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_468a48 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Asinh %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %asinh_468a48
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %asinh_468a48
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %asinh_468a48
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl
new file mode 100644
index 0000000..a546ede
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/468a48.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asinh_468a48() {
+  var res : f16 = asinh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_468a48();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_468a48();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_468a48();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl
new file mode 100644
index 0000000..dfa3c29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asinh(vec<4, f16>) -> vec<4, f16>
+fn asinh_95ab2b() {
+  var res: vec4<f16> = asinh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_95ab2b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_95ab2b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_95ab2b();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..05818ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 4> tint_sinh(vector<float16_t, 4> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_95ab2b() {
+  vector<float16_t, 4> res = tint_sinh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_95ab2b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_95ab2b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_95ab2b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d5bda99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 4> tint_sinh(vector<float16_t, 4> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_95ab2b() {
+  vector<float16_t, 4> res = tint_sinh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_95ab2b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_95ab2b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_95ab2b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017880279490(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl
new file mode 100644
index 0000000..363fcf6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_95ab2b() {
+  f16vec4 res = asinh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  asinh_95ab2b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asinh_95ab2b() {
+  f16vec4 res = asinh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  asinh_95ab2b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_95ab2b() {
+  f16vec4 res = asinh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  asinh_95ab2b();
+}
+
+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/asinh/95ab2b.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl
new file mode 100644
index 0000000..cd7195c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_95ab2b() {
+  half4 res = asinh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asinh_95ab2b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asinh_95ab2b();
+  return;
+}
+
+kernel void compute_main() {
+  asinh_95ab2b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm
new file mode 100644
index 0000000..53d1b94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asinh_95ab2b "asinh_95ab2b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_95ab2b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Asinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asinh_95ab2b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asinh_95ab2b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asinh_95ab2b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca02f94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/95ab2b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asinh_95ab2b() {
+  var res : vec4<f16> = asinh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_95ab2b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_95ab2b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_95ab2b();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl
new file mode 100644
index 0000000..fa045bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asinh(vec<2, f16>) -> vec<2, f16>
+fn asinh_ad8f8b() {
+  var res: vec2<f16> = asinh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_ad8f8b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_ad8f8b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_ad8f8b();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3a87d2d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 2> tint_sinh(vector<float16_t, 2> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_ad8f8b() {
+  vector<float16_t, 2> res = tint_sinh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_ad8f8b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_ad8f8b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_ad8f8b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d46056e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 2> tint_sinh(vector<float16_t, 2> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_ad8f8b() {
+  vector<float16_t, 2> res = tint_sinh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_ad8f8b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_ad8f8b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_ad8f8b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AC790D84D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl
new file mode 100644
index 0000000..1b02aa7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_ad8f8b() {
+  f16vec2 res = asinh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  asinh_ad8f8b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asinh_ad8f8b() {
+  f16vec2 res = asinh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  asinh_ad8f8b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_ad8f8b() {
+  f16vec2 res = asinh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  asinh_ad8f8b();
+}
+
+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/asinh/ad8f8b.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl
new file mode 100644
index 0000000..257acf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_ad8f8b() {
+  half2 res = asinh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asinh_ad8f8b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asinh_ad8f8b();
+  return;
+}
+
+kernel void compute_main() {
+  asinh_ad8f8b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm
new file mode 100644
index 0000000..af0d7e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asinh_ad8f8b "asinh_ad8f8b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_ad8f8b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Asinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asinh_ad8f8b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asinh_ad8f8b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asinh_ad8f8b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl
new file mode 100644
index 0000000..3bd274e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/ad8f8b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asinh_ad8f8b() {
+  var res : vec2<f16> = asinh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_ad8f8b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_ad8f8b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_ad8f8b();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl
new file mode 100644
index 0000000..67d2c9d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn asinh(vec<3, f16>) -> vec<3, f16>
+fn asinh_fb5e8c() {
+  var res: vec3<f16> = asinh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_fb5e8c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_fb5e8c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_fb5e8c();
+}
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..920c90e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 3> tint_sinh(vector<float16_t, 3> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_fb5e8c() {
+  vector<float16_t, 3> res = tint_sinh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_fb5e8c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_fb5e8c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_fb5e8c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d67e924
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 3> tint_sinh(vector<float16_t, 3> x) {
+  return log((x + sqrt(((x * x) + float16_t(1.0h)))));
+}
+
+void asinh_fb5e8c() {
+  vector<float16_t, 3> res = tint_sinh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  asinh_fb5e8c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  asinh_fb5e8c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  asinh_fb5e8c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E444F93560(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl
new file mode 100644
index 0000000..d489bf4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_fb5e8c() {
+  f16vec3 res = asinh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  asinh_fb5e8c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void asinh_fb5e8c() {
+  f16vec3 res = asinh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  asinh_fb5e8c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void asinh_fb5e8c() {
+  f16vec3 res = asinh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  asinh_fb5e8c();
+}
+
+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/asinh/fb5e8c.wgsl.expected.msl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl
new file mode 100644
index 0000000..3ff85f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void asinh_fb5e8c() {
+  half3 res = asinh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  asinh_fb5e8c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  asinh_fb5e8c();
+  return;
+}
+
+kernel void compute_main() {
+  asinh_fb5e8c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm
new file mode 100644
index 0000000..99ab3ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %asinh_fb5e8c "asinh_fb5e8c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%asinh_fb5e8c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Asinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %asinh_fb5e8c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %asinh_fb5e8c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %asinh_fb5e8c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl
new file mode 100644
index 0000000..953a9d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/asinh/fb5e8c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn asinh_fb5e8c() {
+  var res : vec3<f16> = asinh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  asinh_fb5e8c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  asinh_fb5e8c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  asinh_fb5e8c();
+}
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl
new file mode 100644
index 0000000..250ddc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan(vec<4, f16>) -> vec<4, f16>
+fn atan_19faea() {
+  var res: vec4<f16> = atan(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_19faea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_19faea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_19faea();
+}
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..32017a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan_19faea() {
+  vector<float16_t, 4> res = atan((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_19faea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_19faea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_19faea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..32fb21e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan_19faea() {
+  vector<float16_t, 4> res = atan((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_19faea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_19faea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_19faea();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002329F308C50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl
new file mode 100644
index 0000000..13299d8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_19faea() {
+  f16vec4 res = atan(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  atan_19faea();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan_19faea() {
+  f16vec4 res = atan(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  atan_19faea();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_19faea() {
+  f16vec4 res = atan(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  atan_19faea();
+}
+
+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/atan/19faea.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl
new file mode 100644
index 0000000..a52ea2c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_19faea() {
+  half4 res = atan(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan_19faea();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan_19faea();
+  return;
+}
+
+kernel void compute_main() {
+  atan_19faea();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm
new file mode 100644
index 0000000..38b784b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %atan_19faea "atan_19faea"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_19faea = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Atan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %atan_19faea
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %atan_19faea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %atan_19faea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl
new file mode 100644
index 0000000..ecac955
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/19faea.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan_19faea() {
+  var res : vec4<f16> = atan(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_19faea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_19faea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_19faea();
+}
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl
new file mode 100644
index 0000000..013ab6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan(vec<2, f16>) -> vec<2, f16>
+fn atan_1e1764() {
+  var res: vec2<f16> = atan(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_1e1764();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_1e1764();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_1e1764();
+}
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a1e7df0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan_1e1764() {
+  vector<float16_t, 2> res = atan((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_1e1764();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_1e1764();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_1e1764();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..98c9ee9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan_1e1764() {
+  vector<float16_t, 2> res = atan((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_1e1764();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_1e1764();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_1e1764();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C856E61160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl
new file mode 100644
index 0000000..5e93d9a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_1e1764() {
+  f16vec2 res = atan(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  atan_1e1764();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan_1e1764() {
+  f16vec2 res = atan(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  atan_1e1764();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_1e1764() {
+  f16vec2 res = atan(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  atan_1e1764();
+}
+
+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/atan/1e1764.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl
new file mode 100644
index 0000000..e16428d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_1e1764() {
+  half2 res = atan(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan_1e1764();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan_1e1764();
+  return;
+}
+
+kernel void compute_main() {
+  atan_1e1764();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm
new file mode 100644
index 0000000..f7715a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %atan_1e1764 "atan_1e1764"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_1e1764 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Atan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %atan_1e1764
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %atan_1e1764
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %atan_1e1764
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl
new file mode 100644
index 0000000..8278671
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/1e1764.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan_1e1764() {
+  var res : vec2<f16> = atan(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_1e1764();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_1e1764();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_1e1764();
+}
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl
new file mode 100644
index 0000000..766fcb3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan(vec<3, f16>) -> vec<3, f16>
+fn atan_a5f421() {
+  var res: vec3<f16> = atan(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_a5f421();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_a5f421();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_a5f421();
+}
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e5b84f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan_a5f421() {
+  vector<float16_t, 3> res = atan((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_a5f421();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_a5f421();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_a5f421();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..338d894
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan_a5f421() {
+  vector<float16_t, 3> res = atan((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_a5f421();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_a5f421();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_a5f421();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000186B9618C70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl
new file mode 100644
index 0000000..6d93eef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a5f421() {
+  f16vec3 res = atan(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  atan_a5f421();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan_a5f421() {
+  f16vec3 res = atan(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  atan_a5f421();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a5f421() {
+  f16vec3 res = atan(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  atan_a5f421();
+}
+
+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/atan/a5f421.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl
new file mode 100644
index 0000000..66c582a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_a5f421() {
+  half3 res = atan(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan_a5f421();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan_a5f421();
+  return;
+}
+
+kernel void compute_main() {
+  atan_a5f421();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa62fa2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %atan_a5f421 "atan_a5f421"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_a5f421 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Atan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %atan_a5f421
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %atan_a5f421
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %atan_a5f421
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl
new file mode 100644
index 0000000..356793c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a5f421.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan_a5f421() {
+  var res : vec3<f16> = atan(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_a5f421();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_a5f421();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_a5f421();
+}
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl
new file mode 100644
index 0000000..9467660
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan(f16) -> f16
+fn atan_a7ba61() {
+  var res: f16 = atan(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_a7ba61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_a7ba61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_a7ba61();
+}
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b97a99c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan_a7ba61() {
+  float16_t res = atan(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_a7ba61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_a7ba61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_a7ba61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e5a9a51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void atan_a7ba61() {
+  float16_t res = atan(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan_a7ba61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan_a7ba61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan_a7ba61();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211ADB21160(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl
new file mode 100644
index 0000000..d2732b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a7ba61() {
+  float16_t res = atan(0.0hf);
+}
+
+vec4 vertex_main() {
+  atan_a7ba61();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan_a7ba61() {
+  float16_t res = atan(0.0hf);
+}
+
+void fragment_main() {
+  atan_a7ba61();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan_a7ba61() {
+  float16_t res = atan(0.0hf);
+}
+
+void compute_main() {
+  atan_a7ba61();
+}
+
+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/atan/a7ba61.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl
new file mode 100644
index 0000000..b225ca0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan_a7ba61() {
+  half res = atan(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan_a7ba61();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan_a7ba61();
+  return;
+}
+
+kernel void compute_main() {
+  atan_a7ba61();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm
new file mode 100644
index 0000000..45a9b3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %atan_a7ba61 "atan_a7ba61"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan_a7ba61 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Atan %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %atan_a7ba61
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %atan_a7ba61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %atan_a7ba61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl
new file mode 100644
index 0000000..891c5e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan/a7ba61.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan_a7ba61() {
+  var res : f16 = atan(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan_a7ba61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan_a7ba61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan_a7ba61();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl
new file mode 100644
index 0000000..5a1889f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan2(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn atan2_21dfea() {
+  var res: vec3<f16> = atan2(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_21dfea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_21dfea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_21dfea();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f40c95d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan2_21dfea() {
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_21dfea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_21dfea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_21dfea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3c389fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan2_21dfea() {
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_21dfea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_21dfea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_21dfea();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020C31CCD060(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl
new file mode 100644
index 0000000..489c3b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_21dfea() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+vec4 vertex_main() {
+  atan2_21dfea();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan2_21dfea() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+void fragment_main() {
+  atan2_21dfea();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_21dfea() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+void compute_main() {
+  atan2_21dfea();
+}
+
+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/atan2/21dfea.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl
new file mode 100644
index 0000000..871202c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_21dfea() {
+  half3 res = half3(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan2_21dfea();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan2_21dfea();
+  return;
+}
+
+kernel void compute_main() {
+  atan2_21dfea();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm
new file mode 100644
index 0000000..25707d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %atan2_21dfea "atan2_21dfea"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %15 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_21dfea = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %atan2_21dfea
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %atan2_21dfea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %atan2_21dfea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl
new file mode 100644
index 0000000..a5251d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/21dfea.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan2_21dfea() {
+  var res : vec3<f16> = atan2(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_21dfea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_21dfea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_21dfea();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl
new file mode 100644
index 0000000..6a5abcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan2(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn atan2_93febc() {
+  var res: vec2<f16> = atan2(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_93febc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_93febc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_93febc();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..29acbb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan2_93febc() {
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_93febc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_93febc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_93febc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..251cb38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan2_93febc() {
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_93febc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_93febc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_93febc();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029435E06D30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl
new file mode 100644
index 0000000..1de833b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_93febc() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+vec4 vertex_main() {
+  atan2_93febc();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan2_93febc() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+void fragment_main() {
+  atan2_93febc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_93febc() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+void compute_main() {
+  atan2_93febc();
+}
+
+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/atan2/93febc.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl
new file mode 100644
index 0000000..7f6e188
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_93febc() {
+  half2 res = half2(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan2_93febc();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan2_93febc();
+  return;
+}
+
+kernel void compute_main() {
+  atan2_93febc();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm
new file mode 100644
index 0000000..4404d85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %atan2_93febc "atan2_93febc"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %15 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_93febc = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %atan2_93febc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %atan2_93febc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %atan2_93febc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl
new file mode 100644
index 0000000..23d923a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/93febc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan2_93febc() {
+  var res : vec2<f16> = atan2(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_93febc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_93febc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_93febc();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl
new file mode 100644
index 0000000..c22ba39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan2(f16, f16) -> f16
+fn atan2_ca698e() {
+  var res: f16 = atan2(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_ca698e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_ca698e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_ca698e();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68471d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan2_ca698e() {
+  float16_t res = float16_t(0.0h);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_ca698e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_ca698e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_ca698e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c13f773
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void atan2_ca698e() {
+  float16_t res = float16_t(0.0h);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_ca698e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_ca698e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_ca698e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000221D39B1200(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl
new file mode 100644
index 0000000..d310b70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_ca698e() {
+  float16_t res = 0.0hf;
+}
+
+vec4 vertex_main() {
+  atan2_ca698e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan2_ca698e() {
+  float16_t res = 0.0hf;
+}
+
+void fragment_main() {
+  atan2_ca698e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_ca698e() {
+  float16_t res = 0.0hf;
+}
+
+void compute_main() {
+  atan2_ca698e();
+}
+
+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/atan2/ca698e.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl
new file mode 100644
index 0000000..f4e7539
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_ca698e() {
+  half res = 0.0h;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan2_ca698e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan2_ca698e();
+  return;
+}
+
+kernel void compute_main() {
+  atan2_ca698e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm
new file mode 100644
index 0000000..63ae0e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.spvasm
@@ -0,0 +1,69 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %atan2_ca698e "atan2_ca698e"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %14 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %17 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_ca698e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %res %14
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %17
+         %19 = OpLabel
+         %20 = OpFunctionCall %void %atan2_ca698e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %22 = OpLabel
+         %23 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %23
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %atan2_ca698e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %atan2_ca698e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl
new file mode 100644
index 0000000..fe62d18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/ca698e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan2_ca698e() {
+  var res : f16 = atan2(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_ca698e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_ca698e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_ca698e();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl
new file mode 100644
index 0000000..bc8410c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atan2(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn atan2_d983ab() {
+  var res: vec4<f16> = atan2(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_d983ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_d983ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_d983ab();
+}
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7ee794
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void atan2_d983ab() {
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_d983ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_d983ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_d983ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c24da1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void atan2_d983ab() {
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atan2_d983ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atan2_d983ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atan2_d983ab();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000259F9C66DF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl
new file mode 100644
index 0000000..6f6529d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_d983ab() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+vec4 vertex_main() {
+  atan2_d983ab();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void atan2_d983ab() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+void fragment_main() {
+  atan2_d983ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void atan2_d983ab() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+void compute_main() {
+  atan2_d983ab();
+}
+
+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/atan2/d983ab.wgsl.expected.msl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl
new file mode 100644
index 0000000..227ba1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void atan2_d983ab() {
+  half4 res = half4(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atan2_d983ab();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atan2_d983ab();
+  return;
+}
+
+kernel void compute_main() {
+  atan2_d983ab();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..d6c52b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %atan2_d983ab "atan2_d983ab"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %15 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%atan2_d983ab = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %atan2_d983ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %atan2_d983ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %atan2_d983ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..50719cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atan2/d983ab.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atan2_d983ab() {
+  var res : vec4<f16> = atan2(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atan2_d983ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atan2_d983ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atan2_d983ab();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl
new file mode 100644
index 0000000..f828156
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atanh(vec<2, f16>) -> vec<2, f16>
+fn atanh_5bf88d() {
+  var res: vec2<f16> = atanh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_5bf88d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_5bf88d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_5bf88d();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..38fb4b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 2> tint_atanh(vector<float16_t, 2> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_5bf88d() {
+  vector<float16_t, 2> res = tint_atanh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_5bf88d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_5bf88d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_5bf88d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..73c6586
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 2> tint_atanh(vector<float16_t, 2> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_5bf88d() {
+  vector<float16_t, 2> res = tint_atanh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_5bf88d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_5bf88d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_5bf88d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F6B2FD2F70(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl
new file mode 100644
index 0000000..76ddf57
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_atanh(f16vec2 x) {
+  return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
+}
+
+void atanh_5bf88d() {
+  f16vec2 res = tint_atanh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  atanh_5bf88d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec2 tint_atanh(f16vec2 x) {
+  return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
+}
+
+void atanh_5bf88d() {
+  f16vec2 res = tint_atanh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  atanh_5bf88d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_atanh(f16vec2 x) {
+  return mix(atanh(x), f16vec2(0.0hf), greaterThanEqual(x, f16vec2(1.0hf)));
+}
+
+void atanh_5bf88d() {
+  f16vec2 res = tint_atanh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  atanh_5bf88d();
+}
+
+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/atanh/5bf88d.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl
new file mode 100644
index 0000000..3b4f0b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half2 tint_atanh(half2 x) {
+  return select(atanh(x), half2(0.0h), (x >= half2(1.0h)));
+}
+
+void atanh_5bf88d() {
+  half2 res = tint_atanh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atanh_5bf88d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atanh_5bf88d();
+  return;
+}
+
+kernel void compute_main() {
+  atanh_5bf88d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d87c640
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_atanh "tint_atanh"
+               OpName %x "x"
+               OpName %atanh_5bf88d "atanh_5bf88d"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+          %9 = OpTypeFunction %v2half %v2half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v2half %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+         %21 = OpConstantNull %v2half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_atanh = OpFunction %v2half None %9
+          %x = OpFunctionParameter %v2half
+         %14 = OpLabel
+         %18 = OpFOrdGreaterThanEqual %v2bool %x %17
+         %22 = OpExtInst %v2half %23 Atanh %x
+         %15 = OpSelect %v2half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%atanh_5bf88d = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %21
+         %28 = OpFunctionCall %v2half %tint_atanh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %atanh_5bf88d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %atanh_5bf88d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %atanh_5bf88d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl
new file mode 100644
index 0000000..b399e07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/5bf88d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atanh_5bf88d() {
+  var res : vec2<f16> = atanh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_5bf88d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_5bf88d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_5bf88d();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl
new file mode 100644
index 0000000..2fa4e3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atanh(f16) -> f16
+fn atanh_d2d8cd() {
+  var res: f16 = atanh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_d2d8cd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_d2d8cd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_d2d8cd();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b3c054
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+float16_t tint_atanh(float16_t x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_d2d8cd() {
+  float16_t res = tint_atanh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_d2d8cd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_d2d8cd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_d2d8cd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f0a2f1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+float16_t tint_atanh(float16_t x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_d2d8cd() {
+  float16_t res = tint_atanh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_d2d8cd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_d2d8cd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_d2d8cd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001760B391820(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl
new file mode 100644
index 0000000..3077ea8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_atanh(float16_t x) {
+  return ((x >= 1.0hf) ? 0.0hf : atanh(x));
+}
+
+void atanh_d2d8cd() {
+  float16_t res = tint_atanh(0.0hf);
+}
+
+vec4 vertex_main() {
+  atanh_d2d8cd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+float16_t tint_atanh(float16_t x) {
+  return ((x >= 1.0hf) ? 0.0hf : atanh(x));
+}
+
+void atanh_d2d8cd() {
+  float16_t res = tint_atanh(0.0hf);
+}
+
+void fragment_main() {
+  atanh_d2d8cd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_atanh(float16_t x) {
+  return ((x >= 1.0hf) ? 0.0hf : atanh(x));
+}
+
+void atanh_d2d8cd() {
+  float16_t res = tint_atanh(0.0hf);
+}
+
+void compute_main() {
+  atanh_d2d8cd();
+}
+
+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/atanh/d2d8cd.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl
new file mode 100644
index 0000000..80f097f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half tint_atanh(half x) {
+  return select(atanh(x), 0.0h, (x >= 1.0h));
+}
+
+void atanh_d2d8cd() {
+  half res = tint_atanh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atanh_d2d8cd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atanh_d2d8cd();
+  return;
+}
+
+kernel void compute_main() {
+  atanh_d2d8cd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm
new file mode 100644
index 0000000..82b8e8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %20 = OpExtInstImport "GLSL.std.450"
+               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 %tint_atanh "tint_atanh"
+               OpName %x "x"
+               OpName %atanh_d2d8cd "atanh_d2d8cd"
+               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
+      %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
+       %half = OpTypeFloat 16
+          %9 = OpTypeFunction %half %half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+       %bool = OpTypeBool
+         %18 = OpConstantNull %half
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+%_ptr_Function_half = OpTypePointer Function %half
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_atanh = OpFunction %half None %9
+          %x = OpFunctionParameter %half
+         %13 = OpLabel
+         %16 = OpFOrdGreaterThanEqual %bool %x %half_0x1p_0
+         %19 = OpExtInst %half %20 Atanh %x
+         %14 = OpSelect %half %16 %18 %19
+               OpReturnValue %14
+               OpFunctionEnd
+%atanh_d2d8cd = OpFunction %void None %21
+         %24 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %18
+         %25 = OpFunctionCall %half %tint_atanh %18
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %21
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %atanh_d2d8cd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl
new file mode 100644
index 0000000..7f12743
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/d2d8cd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atanh_d2d8cd() {
+  var res : f16 = atanh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_d2d8cd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_d2d8cd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_d2d8cd();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl
new file mode 100644
index 0000000..23c6e10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atanh(vec<4, f16>) -> vec<4, f16>
+fn atanh_e3b450() {
+  var res: vec4<f16> = atanh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_e3b450();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_e3b450();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_e3b450();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ecec215
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 4> tint_atanh(vector<float16_t, 4> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_e3b450() {
+  vector<float16_t, 4> res = tint_atanh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_e3b450();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_e3b450();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_e3b450();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..96b829b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 4> tint_atanh(vector<float16_t, 4> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_e3b450() {
+  vector<float16_t, 4> res = tint_atanh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_e3b450();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_e3b450();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_e3b450();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176443384D0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl
new file mode 100644
index 0000000..32a26fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_atanh(f16vec4 x) {
+  return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
+}
+
+void atanh_e3b450() {
+  f16vec4 res = tint_atanh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  atanh_e3b450();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec4 tint_atanh(f16vec4 x) {
+  return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
+}
+
+void atanh_e3b450() {
+  f16vec4 res = tint_atanh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  atanh_e3b450();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_atanh(f16vec4 x) {
+  return mix(atanh(x), f16vec4(0.0hf), greaterThanEqual(x, f16vec4(1.0hf)));
+}
+
+void atanh_e3b450() {
+  f16vec4 res = tint_atanh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  atanh_e3b450();
+}
+
+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/atanh/e3b450.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl
new file mode 100644
index 0000000..8528cf7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half4 tint_atanh(half4 x) {
+  return select(atanh(x), half4(0.0h), (x >= half4(1.0h)));
+}
+
+void atanh_e3b450() {
+  half4 res = tint_atanh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atanh_e3b450();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atanh_e3b450();
+  return;
+}
+
+kernel void compute_main() {
+  atanh_e3b450();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm
new file mode 100644
index 0000000..7aba5f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_atanh "tint_atanh"
+               OpName %x "x"
+               OpName %atanh_e3b450 "atanh_e3b450"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+          %9 = OpTypeFunction %v4half %v4half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v4half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+         %21 = OpConstantNull %v4half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_atanh = OpFunction %v4half None %9
+          %x = OpFunctionParameter %v4half
+         %14 = OpLabel
+         %18 = OpFOrdGreaterThanEqual %v4bool %x %17
+         %22 = OpExtInst %v4half %23 Atanh %x
+         %15 = OpSelect %v4half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%atanh_e3b450 = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %21
+         %28 = OpFunctionCall %v4half %tint_atanh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %atanh_e3b450
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %atanh_e3b450
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %atanh_e3b450
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl
new file mode 100644
index 0000000..d0a8577
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/e3b450.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atanh_e3b450() {
+  var res : vec4<f16> = atanh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_e3b450();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_e3b450();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_e3b450();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl
new file mode 100644
index 0000000..708c3b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn atanh(vec<3, f16>) -> vec<3, f16>
+fn atanh_ec4b06() {
+  var res: vec3<f16> = atanh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_ec4b06();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_ec4b06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_ec4b06();
+}
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0b739c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 3> tint_atanh(vector<float16_t, 3> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_ec4b06() {
+  vector<float16_t, 3> res = tint_atanh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_ec4b06();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_ec4b06();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_ec4b06();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..46881a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 3> tint_atanh(vector<float16_t, 3> x) {
+  return (log(((float16_t(1.0h) + x) / (float16_t(1.0h) - x))) * float16_t(0.5h));
+}
+
+void atanh_ec4b06() {
+  vector<float16_t, 3> res = tint_atanh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  atanh_ec4b06();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  atanh_ec4b06();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  atanh_ec4b06();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001899EE63220(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl
new file mode 100644
index 0000000..6c8e11b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.glsl
@@ -0,0 +1,64 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_atanh(f16vec3 x) {
+  return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
+}
+
+void atanh_ec4b06() {
+  f16vec3 res = tint_atanh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  atanh_ec4b06();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec3 tint_atanh(f16vec3 x) {
+  return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
+}
+
+void atanh_ec4b06() {
+  f16vec3 res = tint_atanh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  atanh_ec4b06();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_atanh(f16vec3 x) {
+  return mix(atanh(x), f16vec3(0.0hf), greaterThanEqual(x, f16vec3(1.0hf)));
+}
+
+void atanh_ec4b06() {
+  f16vec3 res = tint_atanh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  atanh_ec4b06();
+}
+
+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/atanh/ec4b06.wgsl.expected.msl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl
new file mode 100644
index 0000000..e42af54
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.msl
@@ -0,0 +1,37 @@
+#include <metal_stdlib>
+
+using namespace metal;
+half3 tint_atanh(half3 x) {
+  return select(atanh(x), half3(0.0h), (x >= half3(1.0h)));
+}
+
+void atanh_ec4b06() {
+  half3 res = tint_atanh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  atanh_ec4b06();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  atanh_ec4b06();
+  return;
+}
+
+kernel void compute_main() {
+  atanh_ec4b06();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8bdc5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.spvasm
@@ -0,0 +1,87 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %23 = OpExtInstImport "GLSL.std.450"
+               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 %tint_atanh "tint_atanh"
+               OpName %x "x"
+               OpName %atanh_ec4b06 "atanh_ec4b06"
+               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
+      %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
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+          %9 = OpTypeFunction %v3half %v3half
+%half_0x1p_0 = OpConstant %half 0x1p+0
+         %17 = OpConstantComposite %v3half %half_0x1p_0 %half_0x1p_0 %half_0x1p_0
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+         %21 = OpConstantNull %v3half
+       %void = OpTypeVoid
+         %24 = OpTypeFunction %void
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tint_atanh = OpFunction %v3half None %9
+          %x = OpFunctionParameter %v3half
+         %14 = OpLabel
+         %18 = OpFOrdGreaterThanEqual %v3bool %x %17
+         %22 = OpExtInst %v3half %23 Atanh %x
+         %15 = OpSelect %v3half %18 %21 %22
+               OpReturnValue %15
+               OpFunctionEnd
+%atanh_ec4b06 = OpFunction %void None %24
+         %27 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %21
+         %28 = OpFunctionCall %v3half %tint_atanh %21
+               OpStore %res %28
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %atanh_ec4b06
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %24
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %24
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %atanh_ec4b06
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %24
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %atanh_ec4b06
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl
new file mode 100644
index 0000000..4570d2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/atanh/ec4b06.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn atanh_ec4b06() {
+  var res : vec3<f16> = atanh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  atanh_ec4b06();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  atanh_ec4b06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  atanh_ec4b06();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl
new file mode 100644
index 0000000..6705f27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ceil(vec<3, f16>) -> vec<3, f16>
+fn ceil_09bf52() {
+  var res: vec3<f16> = ceil(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_09bf52();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_09bf52();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_09bf52();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a2d17ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ceil_09bf52() {
+  vector<float16_t, 3> res = ceil((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_09bf52();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_09bf52();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_09bf52();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..21a195e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ceil_09bf52() {
+  vector<float16_t, 3> res = ceil((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_09bf52();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_09bf52();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_09bf52();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000013DAD2D1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl
new file mode 100644
index 0000000..5a83910
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_09bf52() {
+  f16vec3 res = ceil(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  ceil_09bf52();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ceil_09bf52() {
+  f16vec3 res = ceil(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  ceil_09bf52();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_09bf52() {
+  f16vec3 res = ceil(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  ceil_09bf52();
+}
+
+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/ceil/09bf52.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl
new file mode 100644
index 0000000..7d0d688
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_09bf52() {
+  half3 res = ceil(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ceil_09bf52();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ceil_09bf52();
+  return;
+}
+
+kernel void compute_main() {
+  ceil_09bf52();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm
new file mode 100644
index 0000000..2b87105
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ceil_09bf52 "ceil_09bf52"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_09bf52 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Ceil %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %ceil_09bf52
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %ceil_09bf52
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ceil_09bf52
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d5fc84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/09bf52.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ceil_09bf52() {
+  var res : vec3<f16> = ceil(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_09bf52();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_09bf52();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_09bf52();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl
new file mode 100644
index 0000000..002bcdc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ceil(vec<2, f16>) -> vec<2, f16>
+fn ceil_18c240() {
+  var res: vec2<f16> = ceil(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_18c240();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_18c240();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_18c240();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0397f16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ceil_18c240() {
+  vector<float16_t, 2> res = ceil((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_18c240();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_18c240();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_18c240();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..59bf2e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ceil_18c240() {
+  vector<float16_t, 2> res = ceil((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_18c240();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_18c240();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_18c240();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024369541160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl
new file mode 100644
index 0000000..b4375a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_18c240() {
+  f16vec2 res = ceil(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  ceil_18c240();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ceil_18c240() {
+  f16vec2 res = ceil(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  ceil_18c240();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_18c240() {
+  f16vec2 res = ceil(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  ceil_18c240();
+}
+
+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/ceil/18c240.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl
new file mode 100644
index 0000000..b656d4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_18c240() {
+  half2 res = ceil(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ceil_18c240();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ceil_18c240();
+  return;
+}
+
+kernel void compute_main() {
+  ceil_18c240();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm
new file mode 100644
index 0000000..757b0b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ceil_18c240 "ceil_18c240"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_18c240 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Ceil %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %ceil_18c240
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %ceil_18c240
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ceil_18c240
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl
new file mode 100644
index 0000000..dad05fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/18c240.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ceil_18c240() {
+  var res : vec2<f16> = ceil(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_18c240();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_18c240();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_18c240();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl
new file mode 100644
index 0000000..0e7ce3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ceil(vec<4, f16>) -> vec<4, f16>
+fn ceil_4bca2a() {
+  var res: vec4<f16> = ceil(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_4bca2a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_4bca2a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_4bca2a();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..10c1d29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ceil_4bca2a() {
+  vector<float16_t, 4> res = ceil((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_4bca2a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_4bca2a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_4bca2a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b9adc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ceil_4bca2a() {
+  vector<float16_t, 4> res = ceil((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_4bca2a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_4bca2a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_4bca2a();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016D987AB790(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl
new file mode 100644
index 0000000..4792e79
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_4bca2a() {
+  f16vec4 res = ceil(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  ceil_4bca2a();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ceil_4bca2a() {
+  f16vec4 res = ceil(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  ceil_4bca2a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_4bca2a() {
+  f16vec4 res = ceil(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  ceil_4bca2a();
+}
+
+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/ceil/4bca2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl
new file mode 100644
index 0000000..63fa1e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_4bca2a() {
+  half4 res = ceil(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ceil_4bca2a();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ceil_4bca2a();
+  return;
+}
+
+kernel void compute_main() {
+  ceil_4bca2a();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm
new file mode 100644
index 0000000..65f288b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ceil_4bca2a "ceil_4bca2a"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_4bca2a = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Ceil %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %ceil_4bca2a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %ceil_4bca2a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %ceil_4bca2a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl
new file mode 100644
index 0000000..881715f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/4bca2a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ceil_4bca2a() {
+  var res : vec4<f16> = ceil(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_4bca2a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_4bca2a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_4bca2a();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl
new file mode 100644
index 0000000..439e88e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ceil(f16) -> f16
+fn ceil_f3f889() {
+  var res: f16 = ceil(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_f3f889();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_f3f889();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_f3f889();
+}
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b9cee87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ceil_f3f889() {
+  float16_t res = ceil(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_f3f889();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_f3f889();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_f3f889();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b743e2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void ceil_f3f889() {
+  float16_t res = ceil(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ceil_f3f889();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ceil_f3f889();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ceil_f3f889();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190A1B47CF0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl
new file mode 100644
index 0000000..c34111a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_f3f889() {
+  float16_t res = ceil(0.0hf);
+}
+
+vec4 vertex_main() {
+  ceil_f3f889();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ceil_f3f889() {
+  float16_t res = ceil(0.0hf);
+}
+
+void fragment_main() {
+  ceil_f3f889();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ceil_f3f889() {
+  float16_t res = ceil(0.0hf);
+}
+
+void compute_main() {
+  ceil_f3f889();
+}
+
+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/ceil/f3f889.wgsl.expected.msl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl
new file mode 100644
index 0000000..2bfecc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ceil_f3f889() {
+  half res = ceil(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ceil_f3f889();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ceil_f3f889();
+  return;
+}
+
+kernel void compute_main() {
+  ceil_f3f889();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm
new file mode 100644
index 0000000..b50e1ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %ceil_f3f889 "ceil_f3f889"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ceil_f3f889 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Ceil %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %ceil_f3f889
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %ceil_f3f889
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %ceil_f3f889
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl
new file mode 100644
index 0000000..288d3c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ceil/f3f889.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ceil_f3f889() {
+  var res : f16 = ceil(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ceil_f3f889();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ceil_f3f889();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ceil_f3f889();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl
new file mode 100644
index 0000000..fcb634e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn clamp(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn clamp_235b29() {
+  var res: vec2<f16> = clamp(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_235b29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_235b29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_235b29();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..02fc882
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void clamp_235b29() {
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_235b29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_235b29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_235b29();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8e4382
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void clamp_235b29() {
+  vector<float16_t, 2> res = (float16_t(0.0h)).xx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_235b29();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_235b29();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_235b29();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017FE0738160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl
new file mode 100644
index 0000000..3a90e73
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_235b29() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+vec4 vertex_main() {
+  clamp_235b29();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void clamp_235b29() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+void fragment_main() {
+  clamp_235b29();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_235b29() {
+  f16vec2 res = f16vec2(0.0hf);
+}
+
+void compute_main() {
+  clamp_235b29();
+}
+
+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/clamp/235b29.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl
new file mode 100644
index 0000000..cd5723f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_235b29() {
+  half2 res = half2(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  clamp_235b29();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  clamp_235b29();
+  return;
+}
+
+kernel void compute_main() {
+  clamp_235b29();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm
new file mode 100644
index 0000000..70a6d49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %clamp_235b29 "clamp_235b29"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %15 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_235b29 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %clamp_235b29
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %clamp_235b29
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %clamp_235b29
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba5303c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/235b29.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn clamp_235b29() {
+  var res : vec2<f16> = clamp(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_235b29();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_235b29();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_235b29();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl
new file mode 100644
index 0000000..9c5f382
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn clamp(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn clamp_2c251b() {
+  var res: vec4<f16> = clamp(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_2c251b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_2c251b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_2c251b();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..79e81c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void clamp_2c251b() {
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_2c251b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_2c251b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_2c251b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..20423bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void clamp_2c251b() {
+  vector<float16_t, 4> res = (float16_t(0.0h)).xxxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_2c251b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_2c251b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_2c251b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000225C8376D90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl
new file mode 100644
index 0000000..e1cfbbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_2c251b() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+vec4 vertex_main() {
+  clamp_2c251b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void clamp_2c251b() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+void fragment_main() {
+  clamp_2c251b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_2c251b() {
+  f16vec4 res = f16vec4(0.0hf);
+}
+
+void compute_main() {
+  clamp_2c251b();
+}
+
+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/clamp/2c251b.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl
new file mode 100644
index 0000000..5168d3d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_2c251b() {
+  half4 res = half4(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  clamp_2c251b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  clamp_2c251b();
+  return;
+}
+
+kernel void compute_main() {
+  clamp_2c251b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm
new file mode 100644
index 0000000..8c74f7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %clamp_2c251b "clamp_2c251b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %15 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_2c251b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %clamp_2c251b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %clamp_2c251b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %clamp_2c251b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl
new file mode 100644
index 0000000..15be6c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/2c251b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn clamp_2c251b() {
+  var res : vec4<f16> = clamp(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_2c251b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_2c251b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_2c251b();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl
new file mode 100644
index 0000000..b6f3eb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn clamp(f16, f16, f16) -> f16
+fn clamp_553ffb() {
+  var res: f16 = clamp(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_553ffb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_553ffb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_553ffb();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0343bfd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void clamp_553ffb() {
+  float16_t res = float16_t(0.0h);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_553ffb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_553ffb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_553ffb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b397e5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void clamp_553ffb() {
+  float16_t res = float16_t(0.0h);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_553ffb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_553ffb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_553ffb();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002581C620540(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl
new file mode 100644
index 0000000..060c13f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_553ffb() {
+  float16_t res = 0.0hf;
+}
+
+vec4 vertex_main() {
+  clamp_553ffb();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void clamp_553ffb() {
+  float16_t res = 0.0hf;
+}
+
+void fragment_main() {
+  clamp_553ffb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_553ffb() {
+  float16_t res = 0.0hf;
+}
+
+void compute_main() {
+  clamp_553ffb();
+}
+
+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/clamp/553ffb.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl
new file mode 100644
index 0000000..34e8f69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_553ffb() {
+  half res = 0.0h;
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  clamp_553ffb();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  clamp_553ffb();
+  return;
+}
+
+kernel void compute_main() {
+  clamp_553ffb();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm
new file mode 100644
index 0000000..c4abe0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.spvasm
@@ -0,0 +1,69 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 31
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %clamp_553ffb "clamp_553ffb"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %14 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %17 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_553ffb = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %14
+               OpStore %res %14
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %17
+         %19 = OpLabel
+         %20 = OpFunctionCall %void %clamp_553ffb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %22 = OpLabel
+         %23 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %23
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %clamp_553ffb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %clamp_553ffb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl
new file mode 100644
index 0000000..48f3ab3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/553ffb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn clamp_553ffb() {
+  var res : f16 = clamp(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_553ffb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_553ffb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_553ffb();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl
new file mode 100644
index 0000000..f03c28a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn clamp(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn clamp_b195eb() {
+  var res: vec3<f16> = clamp(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_b195eb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_b195eb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_b195eb();
+}
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c94442f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void clamp_b195eb() {
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_b195eb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_b195eb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_b195eb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..823e2b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void clamp_b195eb() {
+  vector<float16_t, 3> res = (float16_t(0.0h)).xxx;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  clamp_b195eb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  clamp_b195eb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  clamp_b195eb();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F44BFDB000(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl
new file mode 100644
index 0000000..500588f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_b195eb() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+vec4 vertex_main() {
+  clamp_b195eb();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void clamp_b195eb() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+void fragment_main() {
+  clamp_b195eb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void clamp_b195eb() {
+  f16vec3 res = f16vec3(0.0hf);
+}
+
+void compute_main() {
+  clamp_b195eb();
+}
+
+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/clamp/b195eb.wgsl.expected.msl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl
new file mode 100644
index 0000000..58d111a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void clamp_b195eb() {
+  half3 res = half3(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  clamp_b195eb();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  clamp_b195eb();
+  return;
+}
+
+kernel void compute_main() {
+  clamp_b195eb();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm
new file mode 100644
index 0000000..4beb74d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.spvasm
@@ -0,0 +1,70 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 32
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %clamp_b195eb "clamp_b195eb"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %15 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %18 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%clamp_b195eb = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %15
+               OpStore %res %15
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %18
+         %20 = OpLabel
+         %21 = OpFunctionCall %void %clamp_b195eb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %23 = OpLabel
+         %24 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %24
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %clamp_b195eb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %clamp_b195eb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd88ab4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/clamp/b195eb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn clamp_b195eb() {
+  var res : vec3<f16> = clamp(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  clamp_b195eb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  clamp_b195eb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  clamp_b195eb();
+}
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl
new file mode 100644
index 0000000..07bd888
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cos(vec<3, f16>) -> vec<3, f16>
+fn cos_0835a8() {
+  var res: vec3<f16> = cos(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_0835a8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_0835a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_0835a8();
+}
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ef1328a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cos_0835a8() {
+  vector<float16_t, 3> res = cos((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_0835a8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_0835a8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_0835a8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..966a5e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cos_0835a8() {
+  vector<float16_t, 3> res = cos((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_0835a8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_0835a8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_0835a8();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000012E9639AC20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl
new file mode 100644
index 0000000..f8f69c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0835a8() {
+  f16vec3 res = cos(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  cos_0835a8();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cos_0835a8() {
+  f16vec3 res = cos(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  cos_0835a8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0835a8() {
+  f16vec3 res = cos(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  cos_0835a8();
+}
+
+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/cos/0835a8.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl
new file mode 100644
index 0000000..790a32d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_0835a8() {
+  half3 res = cos(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cos_0835a8();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cos_0835a8();
+  return;
+}
+
+kernel void compute_main() {
+  cos_0835a8();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm
new file mode 100644
index 0000000..d151e5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cos_0835a8 "cos_0835a8"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_0835a8 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Cos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cos_0835a8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cos_0835a8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cos_0835a8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl
new file mode 100644
index 0000000..94f028a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0835a8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cos_0835a8() {
+  var res : vec3<f16> = cos(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_0835a8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_0835a8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_0835a8();
+}
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl
new file mode 100644
index 0000000..6bcbb87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cos(vec<4, f16>) -> vec<4, f16>
+fn cos_0a89f7() {
+  var res: vec4<f16> = cos(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_0a89f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_0a89f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_0a89f7();
+}
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a00fd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cos_0a89f7() {
+  vector<float16_t, 4> res = cos((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_0a89f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_0a89f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_0a89f7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8326494
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cos_0a89f7() {
+  vector<float16_t, 4> res = cos((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_0a89f7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_0a89f7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_0a89f7();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E7F3887E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl
new file mode 100644
index 0000000..9daaaff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0a89f7() {
+  f16vec4 res = cos(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  cos_0a89f7();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cos_0a89f7() {
+  f16vec4 res = cos(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  cos_0a89f7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_0a89f7() {
+  f16vec4 res = cos(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  cos_0a89f7();
+}
+
+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/cos/0a89f7.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl
new file mode 100644
index 0000000..fe465ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_0a89f7() {
+  half4 res = cos(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cos_0a89f7();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cos_0a89f7();
+  return;
+}
+
+kernel void compute_main() {
+  cos_0a89f7();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f96623
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cos_0a89f7 "cos_0a89f7"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_0a89f7 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Cos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cos_0a89f7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cos_0a89f7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cos_0a89f7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl
new file mode 100644
index 0000000..536f85f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/0a89f7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cos_0a89f7() {
+  var res : vec4<f16> = cos(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_0a89f7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_0a89f7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_0a89f7();
+}
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl
new file mode 100644
index 0000000..c233d3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cos(vec<2, f16>) -> vec<2, f16>
+fn cos_5bc2c6() {
+  var res: vec2<f16> = cos(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_5bc2c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_5bc2c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_5bc2c6();
+}
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a27a229
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cos_5bc2c6() {
+  vector<float16_t, 2> res = cos((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_5bc2c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_5bc2c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_5bc2c6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f3677ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cos_5bc2c6() {
+  vector<float16_t, 2> res = cos((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_5bc2c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_5bc2c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_5bc2c6();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024E8E5A87E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl
new file mode 100644
index 0000000..6da1c94
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_5bc2c6() {
+  f16vec2 res = cos(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  cos_5bc2c6();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cos_5bc2c6() {
+  f16vec2 res = cos(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  cos_5bc2c6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_5bc2c6() {
+  f16vec2 res = cos(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  cos_5bc2c6();
+}
+
+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/cos/5bc2c6.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl
new file mode 100644
index 0000000..91434e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_5bc2c6() {
+  half2 res = cos(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cos_5bc2c6();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cos_5bc2c6();
+  return;
+}
+
+kernel void compute_main() {
+  cos_5bc2c6();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm
new file mode 100644
index 0000000..278c3e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cos_5bc2c6 "cos_5bc2c6"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_5bc2c6 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Cos %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cos_5bc2c6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cos_5bc2c6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cos_5bc2c6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl
new file mode 100644
index 0000000..2010e95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/5bc2c6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cos_5bc2c6() {
+  var res : vec2<f16> = cos(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_5bc2c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_5bc2c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_5bc2c6();
+}
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl
new file mode 100644
index 0000000..630e2fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cos(f16) -> f16
+fn cos_fc047d() {
+  var res: f16 = cos(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_fc047d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_fc047d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_fc047d();
+}
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f240327
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cos_fc047d() {
+  float16_t res = cos(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_fc047d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_fc047d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_fc047d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e33a4d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void cos_fc047d() {
+  float16_t res = cos(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cos_fc047d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cos_fc047d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cos_fc047d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015329BF7D10(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl
new file mode 100644
index 0000000..01af81d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_fc047d() {
+  float16_t res = cos(0.0hf);
+}
+
+vec4 vertex_main() {
+  cos_fc047d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cos_fc047d() {
+  float16_t res = cos(0.0hf);
+}
+
+void fragment_main() {
+  cos_fc047d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cos_fc047d() {
+  float16_t res = cos(0.0hf);
+}
+
+void compute_main() {
+  cos_fc047d();
+}
+
+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/cos/fc047d.wgsl.expected.msl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl
new file mode 100644
index 0000000..e38b8e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cos_fc047d() {
+  half res = cos(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cos_fc047d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cos_fc047d();
+  return;
+}
+
+kernel void compute_main() {
+  cos_fc047d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d4c73fe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %cos_fc047d "cos_fc047d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %cos_fc047d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Cos %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %cos_fc047d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %cos_fc047d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %cos_fc047d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl
new file mode 100644
index 0000000..5671f4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cos/fc047d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cos_fc047d() {
+  var res : f16 = cos(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cos_fc047d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cos_fc047d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cos_fc047d();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl
new file mode 100644
index 0000000..a8fcdf8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cosh(f16) -> f16
+fn cosh_2ed778() {
+  var res: f16 = cosh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_2ed778();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_2ed778();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_2ed778();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f032f20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cosh_2ed778() {
+  float16_t res = cosh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_2ed778();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_2ed778();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_2ed778();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..423dd17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void cosh_2ed778() {
+  float16_t res = cosh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_2ed778();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_2ed778();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_2ed778();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F3BD88850(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl
new file mode 100644
index 0000000..798c9bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_2ed778() {
+  float16_t res = cosh(0.0hf);
+}
+
+vec4 vertex_main() {
+  cosh_2ed778();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cosh_2ed778() {
+  float16_t res = cosh(0.0hf);
+}
+
+void fragment_main() {
+  cosh_2ed778();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_2ed778() {
+  float16_t res = cosh(0.0hf);
+}
+
+void compute_main() {
+  cosh_2ed778();
+}
+
+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/cosh/2ed778.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl
new file mode 100644
index 0000000..5fa15c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_2ed778() {
+  half res = cosh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cosh_2ed778();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cosh_2ed778();
+  return;
+}
+
+kernel void compute_main() {
+  cosh_2ed778();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm
new file mode 100644
index 0000000..bba06a4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %cosh_2ed778 "cosh_2ed778"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_2ed778 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Cosh %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %cosh_2ed778
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %cosh_2ed778
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %cosh_2ed778
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl
new file mode 100644
index 0000000..00b8f27
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/2ed778.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cosh_2ed778() {
+  var res : f16 = cosh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_2ed778();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_2ed778();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_2ed778();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl
new file mode 100644
index 0000000..d1e959a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cosh(vec<4, f16>) -> vec<4, f16>
+fn cosh_3b7bbf() {
+  var res: vec4<f16> = cosh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_3b7bbf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_3b7bbf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_3b7bbf();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ede2f1a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cosh_3b7bbf() {
+  vector<float16_t, 4> res = cosh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_3b7bbf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_3b7bbf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_3b7bbf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2e19b88
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cosh_3b7bbf() {
+  vector<float16_t, 4> res = cosh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_3b7bbf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_3b7bbf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_3b7bbf();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020A6F400DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl
new file mode 100644
index 0000000..73e0dc9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_3b7bbf() {
+  f16vec4 res = cosh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  cosh_3b7bbf();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cosh_3b7bbf() {
+  f16vec4 res = cosh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  cosh_3b7bbf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_3b7bbf() {
+  f16vec4 res = cosh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  cosh_3b7bbf();
+}
+
+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/cosh/3b7bbf.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl
new file mode 100644
index 0000000..c0d6580
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_3b7bbf() {
+  half4 res = cosh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cosh_3b7bbf();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cosh_3b7bbf();
+  return;
+}
+
+kernel void compute_main() {
+  cosh_3b7bbf();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm
new file mode 100644
index 0000000..da245fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cosh_3b7bbf "cosh_3b7bbf"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_3b7bbf = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Cosh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cosh_3b7bbf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cosh_3b7bbf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cosh_3b7bbf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl
new file mode 100644
index 0000000..09eaede
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/3b7bbf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cosh_3b7bbf() {
+  var res : vec4<f16> = cosh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_3b7bbf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_3b7bbf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_3b7bbf();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl
new file mode 100644
index 0000000..a3d5505
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cosh(vec<2, f16>) -> vec<2, f16>
+fn cosh_43b672() {
+  var res: vec2<f16> = cosh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_43b672();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_43b672();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_43b672();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8b54430
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cosh_43b672() {
+  vector<float16_t, 2> res = cosh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_43b672();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_43b672();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_43b672();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1f7f46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cosh_43b672() {
+  vector<float16_t, 2> res = cosh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_43b672();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_43b672();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_43b672();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002ACB9EB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl
new file mode 100644
index 0000000..8b04b98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_43b672() {
+  f16vec2 res = cosh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  cosh_43b672();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cosh_43b672() {
+  f16vec2 res = cosh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  cosh_43b672();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_43b672() {
+  f16vec2 res = cosh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  cosh_43b672();
+}
+
+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/cosh/43b672.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl
new file mode 100644
index 0000000..697c079
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_43b672() {
+  half2 res = cosh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cosh_43b672();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cosh_43b672();
+  return;
+}
+
+kernel void compute_main() {
+  cosh_43b672();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm
new file mode 100644
index 0000000..76983ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cosh_43b672 "cosh_43b672"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_43b672 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Cosh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cosh_43b672
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cosh_43b672
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cosh_43b672
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl
new file mode 100644
index 0000000..6646f2d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/43b672.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cosh_43b672() {
+  var res : vec2<f16> = cosh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_43b672();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_43b672();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_43b672();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl
new file mode 100644
index 0000000..99a4004
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cosh(vec<3, f16>) -> vec<3, f16>
+fn cosh_b1b8a0() {
+  var res: vec3<f16> = cosh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_b1b8a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_b1b8a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_b1b8a0();
+}
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5be4cfe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cosh_b1b8a0() {
+  vector<float16_t, 3> res = cosh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_b1b8a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_b1b8a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_b1b8a0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f6e2ac1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cosh_b1b8a0() {
+  vector<float16_t, 3> res = cosh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cosh_b1b8a0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cosh_b1b8a0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cosh_b1b8a0();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D169B6EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl
new file mode 100644
index 0000000..995b0d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_b1b8a0() {
+  f16vec3 res = cosh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  cosh_b1b8a0();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cosh_b1b8a0() {
+  f16vec3 res = cosh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  cosh_b1b8a0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cosh_b1b8a0() {
+  f16vec3 res = cosh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  cosh_b1b8a0();
+}
+
+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/cosh/b1b8a0.wgsl.expected.msl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl
new file mode 100644
index 0000000..b426dbb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cosh_b1b8a0() {
+  half3 res = cosh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cosh_b1b8a0();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cosh_b1b8a0();
+  return;
+}
+
+kernel void compute_main() {
+  cosh_b1b8a0();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm
new file mode 100644
index 0000000..9a5a566
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cosh_b1b8a0 "cosh_b1b8a0"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cosh_b1b8a0 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Cosh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cosh_b1b8a0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cosh_b1b8a0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cosh_b1b8a0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl
new file mode 100644
index 0000000..bf06df5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cosh/b1b8a0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cosh_b1b8a0() {
+  var res : vec3<f16> = cosh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cosh_b1b8a0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cosh_b1b8a0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cosh_b1b8a0();
+}
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl
new file mode 100644
index 0000000..ba13074
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn cross(vec3<f16>, vec3<f16>) -> vec3<f16>
+fn cross_9857cb() {
+  var res: vec3<f16> = cross(vec3<f16>(), vec3<f16>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cross_9857cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cross_9857cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cross_9857cb();
+}
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..32fcd70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void cross_9857cb() {
+  vector<float16_t, 3> res = cross((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cross_9857cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cross_9857cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cross_9857cb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f6d21a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void cross_9857cb() {
+  vector<float16_t, 3> res = cross((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  cross_9857cb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  cross_9857cb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  cross_9857cb();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ABE1B9A830(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.glsl
new file mode 100644
index 0000000..dd0311f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cross_9857cb() {
+  f16vec3 res = cross(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  cross_9857cb();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void cross_9857cb() {
+  f16vec3 res = cross(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  cross_9857cb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void cross_9857cb() {
+  f16vec3 res = cross(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  cross_9857cb();
+}
+
+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/cross/9857cb.wgsl.expected.msl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.msl
new file mode 100644
index 0000000..3591ad2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void cross_9857cb() {
+  half3 res = cross(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  cross_9857cb();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  cross_9857cb();
+  return;
+}
+
+kernel void compute_main() {
+  cross_9857cb();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.spvasm
new file mode 100644
index 0000000..4552d8e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %cross_9857cb "cross_9857cb"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%cross_9857cb = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Cross %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %cross_9857cb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %cross_9857cb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %cross_9857cb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl
new file mode 100644
index 0000000..2d151e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/cross/9857cb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn cross_9857cb() {
+  var res : vec3<f16> = cross(vec3<f16>(), vec3<f16>());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  cross_9857cb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  cross_9857cb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  cross_9857cb();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl
new file mode 100644
index 0000000..f749565
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn degrees(vec<4, f16>) -> vec<4, f16>
+fn degrees_3055d3() {
+  var res: vec4<f16> = degrees(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_3055d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_3055d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_3055d3();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..196bdf5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 4> tint_degrees(vector<float16_t, 4> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_3055d3() {
+  vector<float16_t, 4> res = tint_degrees((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_3055d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_3055d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_3055d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..825ef73
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 4> tint_degrees(vector<float16_t, 4> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_3055d3() {
+  vector<float16_t, 4> res = tint_degrees((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_3055d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_3055d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_3055d3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020615990520(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl
new file mode 100644
index 0000000..a9e5f5d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_degrees(f16vec4 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_3055d3() {
+  f16vec4 res = tint_degrees(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  degrees_3055d3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec4 tint_degrees(f16vec4 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_3055d3() {
+  f16vec4 res = tint_degrees(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  degrees_3055d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_degrees(f16vec4 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_3055d3() {
+  f16vec4 res = tint_degrees(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  degrees_3055d3();
+}
+
+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/degrees/3055d3.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl
new file mode 100644
index 0000000..2075cbd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half4 tint_degrees(half4 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_3055d3() {
+  half4 res = tint_degrees(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  degrees_3055d3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  degrees_3055d3();
+  return;
+}
+
+kernel void compute_main() {
+  degrees_3055d3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d68e4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %degrees_3055d3 "degrees_3055d3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_3055d3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Degrees %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %degrees_3055d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %degrees_3055d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %degrees_3055d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..58d6ef5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/3055d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn degrees_3055d3() {
+  var res : vec4<f16> = degrees(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_3055d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_3055d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_3055d3();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl
new file mode 100644
index 0000000..cdd9a50
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn degrees(f16) -> f16
+fn degrees_5e9805() {
+  var res: f16 = degrees(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_5e9805();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_5e9805();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_5e9805();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..209c5b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  float16_t res = tint_degrees(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_5e9805();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_5e9805();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_5e9805();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7647535
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  float16_t res = tint_degrees(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_5e9805();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_5e9805();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_5e9805();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021D8DD40440(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl
new file mode 100644
index 0000000..1a87241
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_5e9805() {
+  float16_t res = tint_degrees(0.0hf);
+}
+
+vec4 vertex_main() {
+  degrees_5e9805();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_5e9805() {
+  float16_t res = tint_degrees(0.0hf);
+}
+
+void fragment_main() {
+  degrees_5e9805();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_degrees(float16_t param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_5e9805() {
+  float16_t res = tint_degrees(0.0hf);
+}
+
+void compute_main() {
+  degrees_5e9805();
+}
+
+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/degrees/5e9805.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl
new file mode 100644
index 0000000..1aacda2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half tint_degrees(half param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_5e9805() {
+  half res = tint_degrees(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  degrees_5e9805();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  degrees_5e9805();
+  return;
+}
+
+kernel void compute_main() {
+  degrees_5e9805();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm
new file mode 100644
index 0000000..028d4a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %degrees_5e9805 "degrees_5e9805"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_5e9805 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Degrees %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %degrees_5e9805
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %degrees_5e9805
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %degrees_5e9805
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl
new file mode 100644
index 0000000..647c580
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/5e9805.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn degrees_5e9805() {
+  var res : f16 = degrees(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_5e9805();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_5e9805();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_5e9805();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl
new file mode 100644
index 0000000..c30a280
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn degrees(vec<3, f16>) -> vec<3, f16>
+fn degrees_dfe8f4() {
+  var res: vec3<f16> = degrees(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_dfe8f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_dfe8f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_dfe8f4();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0dd63bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 3> tint_degrees(vector<float16_t, 3> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_dfe8f4() {
+  vector<float16_t, 3> res = tint_degrees((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_dfe8f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_dfe8f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_dfe8f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2e49c90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 3> tint_degrees(vector<float16_t, 3> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_dfe8f4() {
+  vector<float16_t, 3> res = tint_degrees((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_dfe8f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_dfe8f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_dfe8f4();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001BA47346FD0(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl
new file mode 100644
index 0000000..59962ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_degrees(f16vec3 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_dfe8f4() {
+  f16vec3 res = tint_degrees(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  degrees_dfe8f4();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec3 tint_degrees(f16vec3 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_dfe8f4() {
+  f16vec3 res = tint_degrees(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  degrees_dfe8f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_degrees(f16vec3 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_dfe8f4() {
+  f16vec3 res = tint_degrees(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  degrees_dfe8f4();
+}
+
+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/degrees/dfe8f4.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl
new file mode 100644
index 0000000..f6ef443
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half3 tint_degrees(half3 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_dfe8f4() {
+  half3 res = tint_degrees(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  degrees_dfe8f4();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  degrees_dfe8f4();
+  return;
+}
+
+kernel void compute_main() {
+  degrees_dfe8f4();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..fb059e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %degrees_dfe8f4 "degrees_dfe8f4"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_dfe8f4 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Degrees %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %degrees_dfe8f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %degrees_dfe8f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %degrees_dfe8f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..3d2cd7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/dfe8f4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn degrees_dfe8f4() {
+  var res : vec3<f16> = degrees(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_dfe8f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_dfe8f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_dfe8f4();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl
new file mode 100644
index 0000000..7cfc4a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn degrees(vec<2, f16>) -> vec<2, f16>
+fn degrees_f59715() {
+  var res: vec2<f16> = degrees(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_f59715();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_f59715();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_f59715();
+}
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8aac00f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 2> tint_degrees(vector<float16_t, 2> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_f59715() {
+  vector<float16_t, 2> res = tint_degrees((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_f59715();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_f59715();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_f59715();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5ada312
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 2> tint_degrees(vector<float16_t, 2> param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_f59715() {
+  vector<float16_t, 2> res = tint_degrees((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  degrees_f59715();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  degrees_f59715();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  degrees_f59715();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025AB33F0650(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl
new file mode 100644
index 0000000..99ed077
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_degrees(f16vec2 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_f59715() {
+  f16vec2 res = tint_degrees(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  degrees_f59715();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec2 tint_degrees(f16vec2 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_f59715() {
+  f16vec2 res = tint_degrees(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  degrees_f59715();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_degrees(f16vec2 param_0) {
+  return param_0 * 57.295779513082322865hf;
+}
+
+
+void degrees_f59715() {
+  f16vec2 res = tint_degrees(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  degrees_f59715();
+}
+
+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/degrees/f59715.wgsl.expected.msl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl
new file mode 100644
index 0000000..2c09325
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half2 tint_degrees(half2 param_0) {
+  return param_0 * 57.295779513082322865;
+}
+
+void degrees_f59715() {
+  half2 res = tint_degrees(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  degrees_f59715();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  degrees_f59715();
+  return;
+}
+
+kernel void compute_main() {
+  degrees_f59715();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm
new file mode 100644
index 0000000..d9b7fb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %degrees_f59715 "degrees_f59715"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%degrees_f59715 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Degrees %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %degrees_f59715
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %degrees_f59715
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %degrees_f59715
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl
new file mode 100644
index 0000000..b3b6057
--- /dev/null
+++ b/test/tint/builtins/gen/literal/degrees/f59715.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn degrees_f59715() {
+  var res : vec2<f16> = degrees(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  degrees_f59715();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  degrees_f59715();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  degrees_f59715();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl
new file mode 100644
index 0000000..9ff80ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn determinant(mat<4, 4, f16>) -> f16
+fn determinant_32bfde() {
+  var res: f16 = determinant(mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_32bfde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_32bfde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_32bfde();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..123af60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void determinant_32bfde() {
+  float16_t res = determinant(matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_32bfde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_32bfde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_32bfde();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..919bf99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void determinant_32bfde() {
+  float16_t res = determinant(matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_32bfde();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_32bfde();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_32bfde();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028760CE9820(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl
new file mode 100644
index 0000000..32fc171
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_32bfde() {
+  float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+vec4 vertex_main() {
+  determinant_32bfde();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void determinant_32bfde() {
+  float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void fragment_main() {
+  determinant_32bfde();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_32bfde() {
+  float16_t res = determinant(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void compute_main() {
+  determinant_32bfde();
+}
+
+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/determinant/32bfde.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl
new file mode 100644
index 0000000..0f0a75d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_32bfde() {
+  half res = determinant(half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  determinant_32bfde();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  determinant_32bfde();
+  return;
+}
+
+kernel void compute_main() {
+  determinant_32bfde();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3e9627
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %determinant_32bfde "determinant_32bfde"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+ %mat4v4half = OpTypeMatrix %v4half 4
+         %18 = OpConstantNull %mat4v4half
+%_ptr_Function_half = OpTypePointer Function %half
+         %21 = OpConstantNull %half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_32bfde = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %21
+         %13 = OpExtInst %half %15 Determinant %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %determinant_32bfde
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %determinant_32bfde
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_32bfde
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl
new file mode 100644
index 0000000..5d3cce9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/32bfde.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn determinant_32bfde() {
+  var res : f16 = determinant(mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_32bfde();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_32bfde();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_32bfde();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl
new file mode 100644
index 0000000..bb81d5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn determinant(mat<3, 3, f16>) -> f16
+fn determinant_d7c86f() {
+  var res: f16 = determinant(mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_d7c86f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_d7c86f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_d7c86f();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4971b2e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void determinant_d7c86f() {
+  float16_t res = determinant(matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_d7c86f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_d7c86f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_d7c86f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0b82260
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void determinant_d7c86f() {
+  float16_t res = determinant(matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_d7c86f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_d7c86f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_d7c86f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F01F7E050(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl
new file mode 100644
index 0000000..13f877c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_d7c86f() {
+  float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+vec4 vertex_main() {
+  determinant_d7c86f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void determinant_d7c86f() {
+  float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void fragment_main() {
+  determinant_d7c86f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_d7c86f() {
+  float16_t res = determinant(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void compute_main() {
+  determinant_d7c86f();
+}
+
+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/determinant/d7c86f.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl
new file mode 100644
index 0000000..cfb43b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_d7c86f() {
+  half res = determinant(half3x3(half3(0.0h), half3(0.0h), half3(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  determinant_d7c86f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  determinant_d7c86f();
+  return;
+}
+
+kernel void compute_main() {
+  determinant_d7c86f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm
new file mode 100644
index 0000000..e3ed5cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %determinant_d7c86f "determinant_d7c86f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+ %mat3v3half = OpTypeMatrix %v3half 3
+         %18 = OpConstantNull %mat3v3half
+%_ptr_Function_half = OpTypePointer Function %half
+         %21 = OpConstantNull %half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_d7c86f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %21
+         %13 = OpExtInst %half %15 Determinant %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %determinant_d7c86f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %determinant_d7c86f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_d7c86f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl
new file mode 100644
index 0000000..2623778
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/d7c86f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn determinant_d7c86f() {
+  var res : f16 = determinant(mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_d7c86f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_d7c86f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_d7c86f();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl
new file mode 100644
index 0000000..2b22f37
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn determinant(mat<2, 2, f16>) -> f16
+fn determinant_fc12a5() {
+  var res: f16 = determinant(mat2x2<f16>(f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_fc12a5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_fc12a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_fc12a5();
+}
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f1f2a23
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void determinant_fc12a5() {
+  float16_t res = determinant(matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_fc12a5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_fc12a5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_fc12a5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c7ad5c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void determinant_fc12a5() {
+  float16_t res = determinant(matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  determinant_fc12a5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  determinant_fc12a5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  determinant_fc12a5();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002949F67AAF0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl
new file mode 100644
index 0000000..5239eec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_fc12a5() {
+  float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+vec4 vertex_main() {
+  determinant_fc12a5();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void determinant_fc12a5() {
+  float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void fragment_main() {
+  determinant_fc12a5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void determinant_fc12a5() {
+  float16_t res = determinant(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void compute_main() {
+  determinant_fc12a5();
+}
+
+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/determinant/fc12a5.wgsl.expected.msl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl
new file mode 100644
index 0000000..ef6ccaf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void determinant_fc12a5() {
+  half res = determinant(half2x2(half2(0.0h), half2(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  determinant_fc12a5();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  determinant_fc12a5();
+  return;
+}
+
+kernel void compute_main() {
+  determinant_fc12a5();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm
new file mode 100644
index 0000000..7725163
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.spvasm
@@ -0,0 +1,74 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %determinant_fc12a5 "determinant_fc12a5"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+ %mat2v2half = OpTypeMatrix %v2half 2
+         %18 = OpConstantNull %mat2v2half
+%_ptr_Function_half = OpTypePointer Function %half
+         %21 = OpConstantNull %half
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%determinant_fc12a5 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %21
+         %13 = OpExtInst %half %15 Determinant %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %determinant_fc12a5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %determinant_fc12a5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %determinant_fc12a5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a10d8e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/determinant/fc12a5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn determinant_fc12a5() {
+  var res : f16 = determinant(mat2x2<f16>(f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  determinant_fc12a5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  determinant_fc12a5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  determinant_fc12a5();
+}
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl
new file mode 100644
index 0000000..1752332
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn distance(vec<4, f16>, vec<4, f16>) -> f16
+fn distance_7272f3() {
+  var res: f16 = distance(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_7272f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_7272f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_7272f3();
+}
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4e34e08
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void distance_7272f3() {
+  float16_t res = distance((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_7272f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_7272f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_7272f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..66ce4f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void distance_7272f3() {
+  float16_t res = distance((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_7272f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_7272f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_7272f3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002AF01F7D600(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl
new file mode 100644
index 0000000..3ecf59a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7272f3() {
+  float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  distance_7272f3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void distance_7272f3() {
+  float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  distance_7272f3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7272f3() {
+  float16_t res = distance(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  distance_7272f3();
+}
+
+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/distance/7272f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl
new file mode 100644
index 0000000..87c9be8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_7272f3() {
+  half res = distance(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  distance_7272f3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  distance_7272f3();
+  return;
+}
+
+kernel void compute_main() {
+  distance_7272f3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..491038e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %distance_7272f3 "distance_7272f3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_7272f3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Distance %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %distance_7272f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %distance_7272f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %distance_7272f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..5472c32
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7272f3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn distance_7272f3() {
+  var res : f16 = distance(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_7272f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_7272f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_7272f3();
+}
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl
new file mode 100644
index 0000000..a03bad7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn distance(f16, f16) -> f16
+fn distance_7d201f() {
+  var res: f16 = distance(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_7d201f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_7d201f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_7d201f();
+}
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..10efc6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void distance_7d201f() {
+  float16_t res = distance(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_7d201f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_7d201f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_7d201f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..653ef2c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void distance_7d201f() {
+  float16_t res = distance(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_7d201f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_7d201f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_7d201f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D5BC336FD0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl
new file mode 100644
index 0000000..30aee9f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7d201f() {
+  float16_t res = distance(0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  distance_7d201f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void distance_7d201f() {
+  float16_t res = distance(0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  distance_7d201f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_7d201f() {
+  float16_t res = distance(0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  distance_7d201f();
+}
+
+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/distance/7d201f.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl
new file mode 100644
index 0000000..e7baa97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_7d201f() {
+  half res = fabs(0.0h - 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  distance_7d201f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  distance_7d201f();
+  return;
+}
+
+kernel void compute_main() {
+  distance_7d201f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm
new file mode 100644
index 0000000..8a0a548
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %distance_7d201f "distance_7d201f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_7d201f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Distance %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %distance_7d201f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %distance_7d201f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %distance_7d201f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl
new file mode 100644
index 0000000..8de3851
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/7d201f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn distance_7d201f() {
+  var res : f16 = distance(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_7d201f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_7d201f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_7d201f();
+}
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl
new file mode 100644
index 0000000..affa3a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn distance(vec<2, f16>, vec<2, f16>) -> f16
+fn distance_892a5d() {
+  var res: f16 = distance(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_892a5d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_892a5d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_892a5d();
+}
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d35b147
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void distance_892a5d() {
+  float16_t res = distance((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_892a5d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_892a5d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_892a5d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..198576c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void distance_892a5d() {
+  float16_t res = distance((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_892a5d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_892a5d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_892a5d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000026F67541620(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl
new file mode 100644
index 0000000..6c6b752
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_892a5d() {
+  float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  distance_892a5d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void distance_892a5d() {
+  float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  distance_892a5d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_892a5d() {
+  float16_t res = distance(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  distance_892a5d();
+}
+
+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/distance/892a5d.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl
new file mode 100644
index 0000000..8977f67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_892a5d() {
+  half res = distance(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  distance_892a5d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  distance_892a5d();
+  return;
+}
+
+kernel void compute_main() {
+  distance_892a5d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm
new file mode 100644
index 0000000..8f00450
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %distance_892a5d "distance_892a5d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_892a5d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Distance %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %distance_892a5d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %distance_892a5d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %distance_892a5d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl
new file mode 100644
index 0000000..71ed2d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/892a5d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn distance_892a5d() {
+  var res : f16 = distance(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_892a5d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_892a5d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_892a5d();
+}
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl
new file mode 100644
index 0000000..80353c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn distance(vec<3, f16>, vec<3, f16>) -> f16
+fn distance_928fa0() {
+  var res: f16 = distance(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_928fa0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_928fa0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_928fa0();
+}
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c21d144
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void distance_928fa0() {
+  float16_t res = distance((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_928fa0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_928fa0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_928fa0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cd6b130
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void distance_928fa0() {
+  float16_t res = distance((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  distance_928fa0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  distance_928fa0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  distance_928fa0();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001ECED3C83A0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl
new file mode 100644
index 0000000..c68cb10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_928fa0() {
+  float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  distance_928fa0();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void distance_928fa0() {
+  float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  distance_928fa0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void distance_928fa0() {
+  float16_t res = distance(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  distance_928fa0();
+}
+
+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/distance/928fa0.wgsl.expected.msl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl
new file mode 100644
index 0000000..0e034ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void distance_928fa0() {
+  half res = distance(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  distance_928fa0();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  distance_928fa0();
+  return;
+}
+
+kernel void compute_main() {
+  distance_928fa0();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm
new file mode 100644
index 0000000..63605ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %distance_928fa0 "distance_928fa0"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%distance_928fa0 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Distance %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %distance_928fa0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %distance_928fa0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %distance_928fa0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl
new file mode 100644
index 0000000..81c6451
--- /dev/null
+++ b/test/tint/builtins/gen/literal/distance/928fa0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn distance_928fa0() {
+  var res : f16 = distance(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  distance_928fa0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  distance_928fa0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  distance_928fa0();
+}
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl
new file mode 100644
index 0000000..84f71c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn dot(vec<3, f16>, vec<3, f16>) -> f16
+fn dot_8e40f1() {
+  var res: f16 = dot(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_8e40f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_8e40f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_8e40f1();
+}
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6e108ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void dot_8e40f1() {
+  float16_t res = dot((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_8e40f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_8e40f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_8e40f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6a02e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void dot_8e40f1() {
+  float16_t res = dot((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_8e40f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_8e40f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_8e40f1();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E9C49996F0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl
new file mode 100644
index 0000000..4342194
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_8e40f1() {
+  float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  dot_8e40f1();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void dot_8e40f1() {
+  float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  dot_8e40f1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_8e40f1() {
+  float16_t res = dot(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  dot_8e40f1();
+}
+
+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/dot/8e40f1.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl
new file mode 100644
index 0000000..1c34dc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_8e40f1() {
+  half res = dot(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  dot_8e40f1();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  dot_8e40f1();
+  return;
+}
+
+kernel void compute_main() {
+  dot_8e40f1();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..7fc21ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %dot_8e40f1 "dot_8e40f1"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %16 = OpConstantNull %v3half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpConstantNull %half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_8e40f1 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %19
+         %13 = OpDot %half %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %dot_8e40f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %dot_8e40f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %dot_8e40f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..5b8c1a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/8e40f1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn dot_8e40f1() {
+  var res : f16 = dot(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_8e40f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_8e40f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_8e40f1();
+}
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl
new file mode 100644
index 0000000..e300f31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn dot(vec<2, f16>, vec<2, f16>) -> f16
+fn dot_cd5a04() {
+  var res: f16 = dot(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_cd5a04();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_cd5a04();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_cd5a04();
+}
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..04adad0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void dot_cd5a04() {
+  float16_t res = dot((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_cd5a04();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_cd5a04();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_cd5a04();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d48d74e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void dot_cd5a04() {
+  float16_t res = dot((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_cd5a04();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_cd5a04();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_cd5a04();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B52BF97850(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl
new file mode 100644
index 0000000..c14d0ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_cd5a04() {
+  float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  dot_cd5a04();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void dot_cd5a04() {
+  float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  dot_cd5a04();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_cd5a04() {
+  float16_t res = dot(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  dot_cd5a04();
+}
+
+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/dot/cd5a04.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl
new file mode 100644
index 0000000..243b15a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_cd5a04() {
+  half res = dot(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  dot_cd5a04();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  dot_cd5a04();
+  return;
+}
+
+kernel void compute_main() {
+  dot_cd5a04();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm
new file mode 100644
index 0000000..7fbae98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %dot_cd5a04 "dot_cd5a04"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %16 = OpConstantNull %v2half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpConstantNull %half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_cd5a04 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %19
+         %13 = OpDot %half %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %dot_cd5a04
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %dot_cd5a04
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %dot_cd5a04
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl
new file mode 100644
index 0000000..25778c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/cd5a04.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn dot_cd5a04() {
+  var res : f16 = dot(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_cd5a04();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_cd5a04();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_cd5a04();
+}
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl
new file mode 100644
index 0000000..39d1e51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn dot(vec<4, f16>, vec<4, f16>) -> f16
+fn dot_d0d179() {
+  var res: f16 = dot(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_d0d179();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_d0d179();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_d0d179();
+}
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f05dcec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void dot_d0d179() {
+  float16_t res = dot((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_d0d179();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_d0d179();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_d0d179();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7c95a5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void dot_d0d179() {
+  float16_t res = dot((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  dot_d0d179();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  dot_d0d179();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  dot_d0d179();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E77FD80D40(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl
new file mode 100644
index 0000000..90dbe8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_d0d179() {
+  float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  dot_d0d179();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void dot_d0d179() {
+  float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  dot_d0d179();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void dot_d0d179() {
+  float16_t res = dot(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  dot_d0d179();
+}
+
+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/dot/d0d179.wgsl.expected.msl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl
new file mode 100644
index 0000000..becad5b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void dot_d0d179() {
+  half res = dot(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  dot_d0d179();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  dot_d0d179();
+  return;
+}
+
+kernel void compute_main() {
+  dot_d0d179();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm
new file mode 100644
index 0000000..379f023
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %dot_d0d179 "dot_d0d179"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %16 = OpConstantNull %v4half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpConstantNull %half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %dot_d0d179 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %19
+         %13 = OpDot %half %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %dot_d0d179
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %dot_d0d179
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %dot_d0d179
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl
new file mode 100644
index 0000000..7e94f8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/dot/d0d179.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn dot_d0d179() {
+  var res : f16 = dot(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  dot_d0d179();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  dot_d0d179();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  dot_d0d179();
+}
diff --git a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
index 5692ea0..8ccdb8d 100644
--- a/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4I8Packed/881e62.wgsl.expected.fxc.hlsl
@@ -35,3 +35,6 @@
   dot4I8Packed_881e62();
   return;
 }
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000239A33210B0(3,10-56): error X3004: undeclared identifier 'dot4add_i8packed'
+
diff --git a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
index c371939..e84c3da 100644
--- a/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
+++ b/test/tint/builtins/gen/literal/dot4U8Packed/fbed7b.wgsl.expected.fxc.hlsl
@@ -35,3 +35,6 @@
   dot4U8Packed_fbed7b();
   return;
 }
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D2469D6CD0(3,10-56): error X3004: undeclared identifier 'dot4add_u8packed'
+
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl
new file mode 100644
index 0000000..04d8cc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp(vec<3, f16>) -> vec<3, f16>
+fn exp_13806d() {
+  var res: vec3<f16> = exp(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_13806d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_13806d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_13806d();
+}
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6d8ae98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp_13806d() {
+  vector<float16_t, 3> res = exp((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_13806d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_13806d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_13806d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5442169
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp_13806d() {
+  vector<float16_t, 3> res = exp((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_13806d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_13806d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_13806d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8343687E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl
new file mode 100644
index 0000000..e2a7b73
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_13806d() {
+  f16vec3 res = exp(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp_13806d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp_13806d() {
+  f16vec3 res = exp(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  exp_13806d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_13806d() {
+  f16vec3 res = exp(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  exp_13806d();
+}
+
+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/exp/13806d.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl
new file mode 100644
index 0000000..1f4af8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_13806d() {
+  half3 res = exp(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp_13806d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp_13806d();
+  return;
+}
+
+kernel void compute_main() {
+  exp_13806d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm
new file mode 100644
index 0000000..a3679ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp_13806d "exp_13806d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_13806d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Exp %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp_13806d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp_13806d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp_13806d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl
new file mode 100644
index 0000000..7ccb13f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/13806d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp_13806d() {
+  var res : vec3<f16> = exp(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_13806d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_13806d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_13806d();
+}
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl
new file mode 100644
index 0000000..d2d1bb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp(vec<2, f16>) -> vec<2, f16>
+fn exp_2e08e2() {
+  var res: vec2<f16> = exp(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_2e08e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_2e08e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_2e08e2();
+}
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..52dca1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp_2e08e2() {
+  vector<float16_t, 2> res = exp((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_2e08e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_2e08e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_2e08e2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..408ebd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp_2e08e2() {
+  vector<float16_t, 2> res = exp((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_2e08e2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_2e08e2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_2e08e2();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E5CBC9ECC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl
new file mode 100644
index 0000000..04a9c64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_2e08e2() {
+  f16vec2 res = exp(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp_2e08e2();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp_2e08e2() {
+  f16vec2 res = exp(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  exp_2e08e2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_2e08e2() {
+  f16vec2 res = exp(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  exp_2e08e2();
+}
+
+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/exp/2e08e2.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl
new file mode 100644
index 0000000..fd0c319
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_2e08e2() {
+  half2 res = exp(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp_2e08e2();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp_2e08e2();
+  return;
+}
+
+kernel void compute_main() {
+  exp_2e08e2();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm
new file mode 100644
index 0000000..9d11ae3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp_2e08e2 "exp_2e08e2"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_2e08e2 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Exp %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp_2e08e2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp_2e08e2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp_2e08e2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl
new file mode 100644
index 0000000..9962f0e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/2e08e2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp_2e08e2() {
+  var res : vec2<f16> = exp(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_2e08e2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_2e08e2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_2e08e2();
+}
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl
new file mode 100644
index 0000000..53ee480
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp(vec<4, f16>) -> vec<4, f16>
+fn exp_611a87() {
+  var res: vec4<f16> = exp(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_611a87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_611a87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_611a87();
+}
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..47b6a04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp_611a87() {
+  vector<float16_t, 4> res = exp((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_611a87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_611a87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_611a87();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0c0949d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp_611a87() {
+  vector<float16_t, 4> res = exp((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_611a87();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_611a87();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_611a87();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001865DDB0AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl
new file mode 100644
index 0000000..f5b6a25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_611a87() {
+  f16vec4 res = exp(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp_611a87();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp_611a87() {
+  f16vec4 res = exp(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  exp_611a87();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_611a87() {
+  f16vec4 res = exp(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  exp_611a87();
+}
+
+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/exp/611a87.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl
new file mode 100644
index 0000000..32163a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_611a87() {
+  half4 res = exp(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp_611a87();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp_611a87();
+  return;
+}
+
+kernel void compute_main() {
+  exp_611a87();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm
new file mode 100644
index 0000000..749740e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp_611a87 "exp_611a87"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_611a87 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Exp %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp_611a87
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp_611a87
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp_611a87
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl
new file mode 100644
index 0000000..63f247c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/611a87.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp_611a87() {
+  var res : vec4<f16> = exp(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_611a87();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_611a87();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_611a87();
+}
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl
new file mode 100644
index 0000000..6572643
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp(f16) -> f16
+fn exp_c18fe9() {
+  var res: f16 = exp(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_c18fe9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_c18fe9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_c18fe9();
+}
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..03ed79f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp_c18fe9() {
+  float16_t res = exp(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_c18fe9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_c18fe9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_c18fe9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..58c5737
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void exp_c18fe9() {
+  float16_t res = exp(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp_c18fe9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp_c18fe9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp_c18fe9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000189289FB7F0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl
new file mode 100644
index 0000000..a937a44
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_c18fe9() {
+  float16_t res = exp(0.0hf);
+}
+
+vec4 vertex_main() {
+  exp_c18fe9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp_c18fe9() {
+  float16_t res = exp(0.0hf);
+}
+
+void fragment_main() {
+  exp_c18fe9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp_c18fe9() {
+  float16_t res = exp(0.0hf);
+}
+
+void compute_main() {
+  exp_c18fe9();
+}
+
+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/exp/c18fe9.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl
new file mode 100644
index 0000000..d933e7b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp_c18fe9() {
+  half res = exp(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp_c18fe9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp_c18fe9();
+  return;
+}
+
+kernel void compute_main() {
+  exp_c18fe9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm
new file mode 100644
index 0000000..050b62d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %exp_c18fe9 "exp_c18fe9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %exp_c18fe9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Exp %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %exp_c18fe9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %exp_c18fe9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %exp_c18fe9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2dec57
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp/c18fe9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp_c18fe9() {
+  var res : f16 = exp(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp_c18fe9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp_c18fe9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp_c18fe9();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl
new file mode 100644
index 0000000..104c4bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp2(vec<2, f16>) -> vec<2, f16>
+fn exp2_151a4c() {
+  var res: vec2<f16> = exp2(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_151a4c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_151a4c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_151a4c();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a205613
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp2_151a4c() {
+  vector<float16_t, 2> res = exp2((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_151a4c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_151a4c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_151a4c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..88d2e16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp2_151a4c() {
+  vector<float16_t, 2> res = exp2((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_151a4c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_151a4c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_151a4c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4AAF5DCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl
new file mode 100644
index 0000000..78394dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_151a4c() {
+  f16vec2 res = exp2(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp2_151a4c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp2_151a4c() {
+  f16vec2 res = exp2(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  exp2_151a4c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_151a4c() {
+  f16vec2 res = exp2(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  exp2_151a4c();
+}
+
+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/exp2/151a4c.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl
new file mode 100644
index 0000000..e8e65ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_151a4c() {
+  half2 res = exp2(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp2_151a4c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp2_151a4c();
+  return;
+}
+
+kernel void compute_main() {
+  exp2_151a4c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b271fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp2_151a4c "exp2_151a4c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_151a4c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Exp2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp2_151a4c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp2_151a4c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp2_151a4c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl
new file mode 100644
index 0000000..698ac46
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/151a4c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp2_151a4c() {
+  var res : vec2<f16> = exp2(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_151a4c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_151a4c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_151a4c();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl
new file mode 100644
index 0000000..790a5b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp2(vec<3, f16>) -> vec<3, f16>
+fn exp2_751377() {
+  var res: vec3<f16> = exp2(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_751377();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_751377();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_751377();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..46be625
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp2_751377() {
+  vector<float16_t, 3> res = exp2((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_751377();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_751377();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_751377();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b4aa1cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp2_751377() {
+  vector<float16_t, 3> res = exp2((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_751377();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_751377();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_751377();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023A7CDE1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl
new file mode 100644
index 0000000..af02e20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_751377() {
+  f16vec3 res = exp2(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp2_751377();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp2_751377() {
+  f16vec3 res = exp2(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  exp2_751377();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_751377() {
+  f16vec3 res = exp2(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  exp2_751377();
+}
+
+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/exp2/751377.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl
new file mode 100644
index 0000000..201f1e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_751377() {
+  half3 res = exp2(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp2_751377();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp2_751377();
+  return;
+}
+
+kernel void compute_main() {
+  exp2_751377();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm
new file mode 100644
index 0000000..b255fb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp2_751377 "exp2_751377"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_751377 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Exp2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp2_751377
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp2_751377
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp2_751377
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl
new file mode 100644
index 0000000..5730ea2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/751377.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp2_751377() {
+  var res : vec3<f16> = exp2(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_751377();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_751377();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_751377();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl
new file mode 100644
index 0000000..74f45c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp2(f16) -> f16
+fn exp2_b408e4() {
+  var res: f16 = exp2(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_b408e4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_b408e4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_b408e4();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1161b51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp2_b408e4() {
+  float16_t res = exp2(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_b408e4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_b408e4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_b408e4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ed6bb8d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void exp2_b408e4() {
+  float16_t res = exp2(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_b408e4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_b408e4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_b408e4();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029A9E5D1160(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl
new file mode 100644
index 0000000..5c041fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_b408e4() {
+  float16_t res = exp2(0.0hf);
+}
+
+vec4 vertex_main() {
+  exp2_b408e4();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp2_b408e4() {
+  float16_t res = exp2(0.0hf);
+}
+
+void fragment_main() {
+  exp2_b408e4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_b408e4() {
+  float16_t res = exp2(0.0hf);
+}
+
+void compute_main() {
+  exp2_b408e4();
+}
+
+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/exp2/b408e4.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl
new file mode 100644
index 0000000..144f5ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_b408e4() {
+  half res = exp2(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp2_b408e4();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp2_b408e4();
+  return;
+}
+
+kernel void compute_main() {
+  exp2_b408e4();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm
new file mode 100644
index 0000000..00de130
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %exp2_b408e4 "exp2_b408e4"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_b408e4 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Exp2 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %exp2_b408e4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %exp2_b408e4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %exp2_b408e4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl
new file mode 100644
index 0000000..65c1649
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/b408e4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp2_b408e4() {
+  var res : f16 = exp2(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_b408e4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_b408e4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_b408e4();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl
new file mode 100644
index 0000000..4bbdb03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn exp2(vec<4, f16>) -> vec<4, f16>
+fn exp2_ffa827() {
+  var res: vec4<f16> = exp2(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_ffa827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_ffa827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_ffa827();
+}
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..744ae47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void exp2_ffa827() {
+  vector<float16_t, 4> res = exp2((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_ffa827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_ffa827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_ffa827();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0806afc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void exp2_ffa827() {
+  vector<float16_t, 4> res = exp2((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  exp2_ffa827();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  exp2_ffa827();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  exp2_ffa827();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D88F07E620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl
new file mode 100644
index 0000000..960c753
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_ffa827() {
+  f16vec4 res = exp2(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  exp2_ffa827();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void exp2_ffa827() {
+  f16vec4 res = exp2(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  exp2_ffa827();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void exp2_ffa827() {
+  f16vec4 res = exp2(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  exp2_ffa827();
+}
+
+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/exp2/ffa827.wgsl.expected.msl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl
new file mode 100644
index 0000000..add3f5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void exp2_ffa827() {
+  half4 res = exp2(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  exp2_ffa827();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  exp2_ffa827();
+  return;
+}
+
+kernel void compute_main() {
+  exp2_ffa827();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm
new file mode 100644
index 0000000..9520e91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %exp2_ffa827 "exp2_ffa827"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%exp2_ffa827 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Exp2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %exp2_ffa827
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %exp2_ffa827
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %exp2_ffa827
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl
new file mode 100644
index 0000000..230ad07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/exp2/ffa827.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn exp2_ffa827() {
+  var res : vec4<f16> = exp2(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  exp2_ffa827();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  exp2_ffa827();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  exp2_ffa827();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl
new file mode 100644
index 0000000..b790070
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn faceForward(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn faceForward_524986() {
+  var res: vec3<f16> = faceForward(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_524986();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_524986();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_524986();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9ff272
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void faceForward_524986() {
+  vector<float16_t, 3> res = faceforward((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_524986();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_524986();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_524986();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d7c9b48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void faceForward_524986() {
+  vector<float16_t, 3> res = faceforward((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_524986();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_524986();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_524986();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E4AB906E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl
new file mode 100644
index 0000000..7f22243
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_524986() {
+  f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  faceForward_524986();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void faceForward_524986() {
+  f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  faceForward_524986();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_524986() {
+  f16vec3 res = faceforward(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  faceForward_524986();
+}
+
+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/faceForward/524986.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl
new file mode 100644
index 0000000..39be077
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_524986() {
+  half3 res = faceforward(half3(0.0h), half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  faceForward_524986();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  faceForward_524986();
+  return;
+}
+
+kernel void compute_main() {
+  faceForward_524986();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm
new file mode 100644
index 0000000..e9ff4a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %faceForward_524986 "faceForward_524986"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_524986 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 FaceForward %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %faceForward_524986
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %faceForward_524986
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %faceForward_524986
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl
new file mode 100644
index 0000000..9c4ec2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/524986.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn faceForward_524986() {
+  var res : vec3<f16> = faceForward(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_524986();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_524986();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_524986();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl
new file mode 100644
index 0000000..fb1dcfb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn faceForward(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn faceForward_cc63dc() {
+  var res: vec4<f16> = faceForward(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_cc63dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_cc63dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_cc63dc();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b59f3b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void faceForward_cc63dc() {
+  vector<float16_t, 4> res = faceforward((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_cc63dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_cc63dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_cc63dc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b33b557
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void faceForward_cc63dc() {
+  vector<float16_t, 4> res = faceforward((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_cc63dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_cc63dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_cc63dc();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000029C52499560(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl
new file mode 100644
index 0000000..ab00ae1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_cc63dc() {
+  f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  faceForward_cc63dc();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void faceForward_cc63dc() {
+  f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  faceForward_cc63dc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_cc63dc() {
+  f16vec4 res = faceforward(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  faceForward_cc63dc();
+}
+
+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/faceForward/cc63dc.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl
new file mode 100644
index 0000000..982ab0a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_cc63dc() {
+  half4 res = faceforward(half4(0.0h), half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  faceForward_cc63dc();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  faceForward_cc63dc();
+  return;
+}
+
+kernel void compute_main() {
+  faceForward_cc63dc();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm
new file mode 100644
index 0000000..bfa79fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %faceForward_cc63dc "faceForward_cc63dc"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_cc63dc = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 FaceForward %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %faceForward_cc63dc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %faceForward_cc63dc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %faceForward_cc63dc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl
new file mode 100644
index 0000000..1fca871
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/cc63dc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn faceForward_cc63dc() {
+  var res : vec4<f16> = faceForward(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_cc63dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_cc63dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_cc63dc();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl
new file mode 100644
index 0000000..bf8db4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn faceForward(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn faceForward_fb0f2e() {
+  var res: vec2<f16> = faceForward(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_fb0f2e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_fb0f2e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_fb0f2e();
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a4205ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void faceForward_fb0f2e() {
+  vector<float16_t, 2> res = faceforward((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_fb0f2e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_fb0f2e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_fb0f2e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b647bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void faceForward_fb0f2e() {
+  vector<float16_t, 2> res = faceforward((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  faceForward_fb0f2e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  faceForward_fb0f2e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  faceForward_fb0f2e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153714C6E90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl
new file mode 100644
index 0000000..6682c02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_fb0f2e() {
+  f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  faceForward_fb0f2e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void faceForward_fb0f2e() {
+  f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  faceForward_fb0f2e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void faceForward_fb0f2e() {
+  f16vec2 res = faceforward(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  faceForward_fb0f2e();
+}
+
+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/faceForward/fb0f2e.wgsl.expected.msl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl
new file mode 100644
index 0000000..9c07359
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void faceForward_fb0f2e() {
+  half2 res = faceforward(half2(0.0h), half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  faceForward_fb0f2e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  faceForward_fb0f2e();
+  return;
+}
+
+kernel void compute_main() {
+  faceForward_fb0f2e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm
new file mode 100644
index 0000000..20da054
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %faceForward_fb0f2e "faceForward_fb0f2e"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%faceForward_fb0f2e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 FaceForward %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %faceForward_fb0f2e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %faceForward_fb0f2e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %faceForward_fb0f2e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl
new file mode 100644
index 0000000..96b39ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/faceForward/fb0f2e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn faceForward_fb0f2e() {
+  var res : vec2<f16> = faceForward(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  faceForward_fb0f2e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  faceForward_fb0f2e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  faceForward_fb0f2e();
+}
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl
new file mode 100644
index 0000000..bbe70ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn floor(vec<3, f16>) -> vec<3, f16>
+fn floor_3802c0() {
+  var res: vec3<f16> = floor(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_3802c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_3802c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_3802c0();
+}
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..abaa1f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void floor_3802c0() {
+  vector<float16_t, 3> res = floor((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_3802c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_3802c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_3802c0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2257a33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void floor_3802c0() {
+  vector<float16_t, 3> res = floor((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_3802c0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_3802c0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_3802c0();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024B0BC4CD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl
new file mode 100644
index 0000000..0ffee0a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_3802c0() {
+  f16vec3 res = floor(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  floor_3802c0();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void floor_3802c0() {
+  f16vec3 res = floor(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  floor_3802c0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_3802c0() {
+  f16vec3 res = floor(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  floor_3802c0();
+}
+
+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/floor/3802c0.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl
new file mode 100644
index 0000000..b74bfc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_3802c0() {
+  half3 res = floor(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  floor_3802c0();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  floor_3802c0();
+  return;
+}
+
+kernel void compute_main() {
+  floor_3802c0();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm
new file mode 100644
index 0000000..840d0b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %floor_3802c0 "floor_3802c0"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_3802c0 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Floor %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %floor_3802c0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %floor_3802c0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %floor_3802c0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl
new file mode 100644
index 0000000..454c669
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/3802c0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn floor_3802c0() {
+  var res : vec3<f16> = floor(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_3802c0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_3802c0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_3802c0();
+}
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl
new file mode 100644
index 0000000..77a94d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn floor(vec<2, f16>) -> vec<2, f16>
+fn floor_84658c() {
+  var res: vec2<f16> = floor(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_84658c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_84658c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_84658c();
+}
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9d9b33b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void floor_84658c() {
+  vector<float16_t, 2> res = floor((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_84658c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_84658c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_84658c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a7f1d04
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void floor_84658c() {
+  vector<float16_t, 2> res = floor((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_84658c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_84658c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_84658c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F339C96B50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl
new file mode 100644
index 0000000..5ce59ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_84658c() {
+  f16vec2 res = floor(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  floor_84658c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void floor_84658c() {
+  f16vec2 res = floor(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  floor_84658c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_84658c() {
+  f16vec2 res = floor(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  floor_84658c();
+}
+
+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/floor/84658c.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl
new file mode 100644
index 0000000..8167d86
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_84658c() {
+  half2 res = floor(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  floor_84658c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  floor_84658c();
+  return;
+}
+
+kernel void compute_main() {
+  floor_84658c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm
new file mode 100644
index 0000000..2ba5308
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %floor_84658c "floor_84658c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_84658c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Floor %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %floor_84658c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %floor_84658c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %floor_84658c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbf2ee4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/84658c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn floor_84658c() {
+  var res : vec2<f16> = floor(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_84658c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_84658c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_84658c();
+}
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl
new file mode 100644
index 0000000..f64f4ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn floor(vec<4, f16>) -> vec<4, f16>
+fn floor_a2d31b() {
+  var res: vec4<f16> = floor(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_a2d31b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_a2d31b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_a2d31b();
+}
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8df627e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void floor_a2d31b() {
+  vector<float16_t, 4> res = floor((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_a2d31b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_a2d31b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_a2d31b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2503575
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void floor_a2d31b() {
+  vector<float16_t, 4> res = floor((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_a2d31b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_a2d31b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_a2d31b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A78E20C3E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl
new file mode 100644
index 0000000..fa86b13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_a2d31b() {
+  f16vec4 res = floor(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  floor_a2d31b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void floor_a2d31b() {
+  f16vec4 res = floor(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  floor_a2d31b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_a2d31b() {
+  f16vec4 res = floor(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  floor_a2d31b();
+}
+
+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/floor/a2d31b.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl
new file mode 100644
index 0000000..11dab7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_a2d31b() {
+  half4 res = floor(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  floor_a2d31b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  floor_a2d31b();
+  return;
+}
+
+kernel void compute_main() {
+  floor_a2d31b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm
new file mode 100644
index 0000000..f54987e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %floor_a2d31b "floor_a2d31b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_a2d31b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Floor %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %floor_a2d31b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %floor_a2d31b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %floor_a2d31b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl
new file mode 100644
index 0000000..54977de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/a2d31b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn floor_a2d31b() {
+  var res : vec4<f16> = floor(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_a2d31b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_a2d31b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_a2d31b();
+}
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl
new file mode 100644
index 0000000..5defc31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn floor(f16) -> f16
+fn floor_b6e09c() {
+  var res: f16 = floor(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_b6e09c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_b6e09c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_b6e09c();
+}
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4e9023c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void floor_b6e09c() {
+  float16_t res = floor(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_b6e09c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_b6e09c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_b6e09c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b56d8ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void floor_b6e09c() {
+  float16_t res = floor(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  floor_b6e09c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  floor_b6e09c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  floor_b6e09c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002DCF5190520(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl
new file mode 100644
index 0000000..9e3b55d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_b6e09c() {
+  float16_t res = floor(0.0hf);
+}
+
+vec4 vertex_main() {
+  floor_b6e09c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void floor_b6e09c() {
+  float16_t res = floor(0.0hf);
+}
+
+void fragment_main() {
+  floor_b6e09c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void floor_b6e09c() {
+  float16_t res = floor(0.0hf);
+}
+
+void compute_main() {
+  floor_b6e09c();
+}
+
+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/floor/b6e09c.wgsl.expected.msl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl
new file mode 100644
index 0000000..5123ed2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void floor_b6e09c() {
+  half res = floor(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  floor_b6e09c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  floor_b6e09c();
+  return;
+}
+
+kernel void compute_main() {
+  floor_b6e09c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm
new file mode 100644
index 0000000..4d351dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %floor_b6e09c "floor_b6e09c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%floor_b6e09c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Floor %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %floor_b6e09c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %floor_b6e09c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %floor_b6e09c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl
new file mode 100644
index 0000000..59a04cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/floor/b6e09c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn floor_b6e09c() {
+  var res : f16 = floor(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  floor_b6e09c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  floor_b6e09c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  floor_b6e09c();
+}
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl
new file mode 100644
index 0000000..0254023
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fma(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn fma_ab7818() {
+  var res: vec4<f16> = fma(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_ab7818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_ab7818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_ab7818();
+}
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0621f2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fma_ab7818() {
+  vector<float16_t, 4> res = mad((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_ab7818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_ab7818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_ab7818();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4aee5ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fma_ab7818() {
+  vector<float16_t, 4> res = mad((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_ab7818();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_ab7818();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_ab7818();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000130923E6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl
new file mode 100644
index 0000000..ea53342
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_ab7818() {
+  f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf)));
+}
+
+vec4 vertex_main() {
+  fma_ab7818();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fma_ab7818() {
+  f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf)));
+}
+
+void fragment_main() {
+  fma_ab7818();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_ab7818() {
+  f16vec4 res = ((f16vec4(0.0hf)) * (f16vec4(0.0hf)) + (f16vec4(0.0hf)));
+}
+
+void compute_main() {
+  fma_ab7818();
+}
+
+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/fma/ab7818.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl
new file mode 100644
index 0000000..1e22223
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_ab7818() {
+  half4 res = fma(half4(0.0h), half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fma_ab7818();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fma_ab7818();
+  return;
+}
+
+kernel void compute_main() {
+  fma_ab7818();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm
new file mode 100644
index 0000000..a5bc45f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fma_ab7818 "fma_ab7818"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_ab7818 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Fma %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fma_ab7818
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fma_ab7818
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fma_ab7818
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl
new file mode 100644
index 0000000..0732ab8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/ab7818.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fma_ab7818() {
+  var res : vec4<f16> = fma(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_ab7818();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_ab7818();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_ab7818();
+}
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl
new file mode 100644
index 0000000..332799f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fma(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn fma_bf21b6() {
+  var res: vec2<f16> = fma(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_bf21b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_bf21b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_bf21b6();
+}
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..85963f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fma_bf21b6() {
+  vector<float16_t, 2> res = mad((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_bf21b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_bf21b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_bf21b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cad7d14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fma_bf21b6() {
+  vector<float16_t, 2> res = mad((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_bf21b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_bf21b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_bf21b6();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018F50BF5D50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl
new file mode 100644
index 0000000..576c850
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_bf21b6() {
+  f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf)));
+}
+
+vec4 vertex_main() {
+  fma_bf21b6();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fma_bf21b6() {
+  f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf)));
+}
+
+void fragment_main() {
+  fma_bf21b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_bf21b6() {
+  f16vec2 res = ((f16vec2(0.0hf)) * (f16vec2(0.0hf)) + (f16vec2(0.0hf)));
+}
+
+void compute_main() {
+  fma_bf21b6();
+}
+
+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/fma/bf21b6.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl
new file mode 100644
index 0000000..7d0d9df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_bf21b6() {
+  half2 res = fma(half2(0.0h), half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fma_bf21b6();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fma_bf21b6();
+  return;
+}
+
+kernel void compute_main() {
+  fma_bf21b6();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..4759d35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fma_bf21b6 "fma_bf21b6"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_bf21b6 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Fma %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fma_bf21b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fma_bf21b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fma_bf21b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..dcd733b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/bf21b6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fma_bf21b6() {
+  var res : vec2<f16> = fma(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_bf21b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_bf21b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_bf21b6();
+}
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl
new file mode 100644
index 0000000..5e605cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fma(f16, f16, f16) -> f16
+fn fma_c8abb3() {
+  var res: f16 = fma(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_c8abb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_c8abb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_c8abb3();
+}
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..02d0e31
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fma_c8abb3() {
+  float16_t res = mad(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_c8abb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_c8abb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_c8abb3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ce74e5a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void fma_c8abb3() {
+  float16_t res = mad(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_c8abb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_c8abb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_c8abb3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A4E652BA80(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl
new file mode 100644
index 0000000..86e6a49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_c8abb3() {
+  float16_t res = ((0.0hf) * (0.0hf) + (0.0hf));
+}
+
+vec4 vertex_main() {
+  fma_c8abb3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fma_c8abb3() {
+  float16_t res = ((0.0hf) * (0.0hf) + (0.0hf));
+}
+
+void fragment_main() {
+  fma_c8abb3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_c8abb3() {
+  float16_t res = ((0.0hf) * (0.0hf) + (0.0hf));
+}
+
+void compute_main() {
+  fma_c8abb3();
+}
+
+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/fma/c8abb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl
new file mode 100644
index 0000000..9222c9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_c8abb3() {
+  half res = fma(0.0h, 0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fma_c8abb3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fma_c8abb3();
+  return;
+}
+
+kernel void compute_main() {
+  fma_c8abb3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc7d248
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %fma_c8abb3 "fma_c8abb3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_c8abb3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Fma %16 %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %fma_c8abb3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %fma_c8abb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %fma_c8abb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..44eba43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/c8abb3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fma_c8abb3() {
+  var res : f16 = fma(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_c8abb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_c8abb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_c8abb3();
+}
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl
new file mode 100644
index 0000000..765d3e6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fma(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn fma_e7abdc() {
+  var res: vec3<f16> = fma(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_e7abdc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_e7abdc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_e7abdc();
+}
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ab1666
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fma_e7abdc() {
+  vector<float16_t, 3> res = mad((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_e7abdc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_e7abdc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_e7abdc();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2d0f609
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fma_e7abdc() {
+  vector<float16_t, 3> res = mad((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fma_e7abdc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fma_e7abdc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fma_e7abdc();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A860253980(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl
new file mode 100644
index 0000000..c4e4c74
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_e7abdc() {
+  f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf)));
+}
+
+vec4 vertex_main() {
+  fma_e7abdc();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fma_e7abdc() {
+  f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf)));
+}
+
+void fragment_main() {
+  fma_e7abdc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fma_e7abdc() {
+  f16vec3 res = ((f16vec3(0.0hf)) * (f16vec3(0.0hf)) + (f16vec3(0.0hf)));
+}
+
+void compute_main() {
+  fma_e7abdc();
+}
+
+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/fma/e7abdc.wgsl.expected.msl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl
new file mode 100644
index 0000000..3622508
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fma_e7abdc() {
+  half3 res = fma(half3(0.0h), half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fma_e7abdc();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fma_e7abdc();
+  return;
+}
+
+kernel void compute_main() {
+  fma_e7abdc();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm
new file mode 100644
index 0000000..daa3de5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fma_e7abdc "fma_e7abdc"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %fma_e7abdc = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Fma %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fma_e7abdc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fma_e7abdc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fma_e7abdc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl
new file mode 100644
index 0000000..45afac1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fma/e7abdc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fma_e7abdc() {
+  var res : vec3<f16> = fma(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fma_e7abdc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fma_e7abdc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fma_e7abdc();
+}
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl
new file mode 100644
index 0000000..df799a0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fract(vec<2, f16>) -> vec<2, f16>
+fn fract_181aa9() {
+  var res: vec2<f16> = fract(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_181aa9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_181aa9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_181aa9();
+}
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ff11d385
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fract_181aa9() {
+  vector<float16_t, 2> res = frac((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_181aa9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_181aa9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_181aa9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6bb42e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fract_181aa9() {
+  vector<float16_t, 2> res = frac((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_181aa9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_181aa9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_181aa9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021E70B80AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl
new file mode 100644
index 0000000..1e4d6bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_181aa9() {
+  f16vec2 res = fract(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  fract_181aa9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fract_181aa9() {
+  f16vec2 res = fract(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  fract_181aa9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_181aa9() {
+  f16vec2 res = fract(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  fract_181aa9();
+}
+
+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/fract/181aa9.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl
new file mode 100644
index 0000000..b807118
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_181aa9() {
+  half2 res = fract(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fract_181aa9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fract_181aa9();
+  return;
+}
+
+kernel void compute_main() {
+  fract_181aa9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm
new file mode 100644
index 0000000..1bd3c4f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fract_181aa9 "fract_181aa9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_181aa9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Fract %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fract_181aa9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fract_181aa9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fract_181aa9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl
new file mode 100644
index 0000000..fbad396
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/181aa9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fract_181aa9() {
+  var res : vec2<f16> = fract(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_181aa9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_181aa9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_181aa9();
+}
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl
new file mode 100644
index 0000000..5f4dd0e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fract(vec<4, f16>) -> vec<4, f16>
+fn fract_498c77() {
+  var res: vec4<f16> = fract(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_498c77();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_498c77();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_498c77();
+}
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b6fe7b1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fract_498c77() {
+  vector<float16_t, 4> res = frac((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_498c77();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_498c77();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_498c77();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..579a05a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fract_498c77() {
+  vector<float16_t, 4> res = frac((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_498c77();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_498c77();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_498c77();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000293E8528810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl
new file mode 100644
index 0000000..352a8ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_498c77() {
+  f16vec4 res = fract(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  fract_498c77();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fract_498c77() {
+  f16vec4 res = fract(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  fract_498c77();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_498c77() {
+  f16vec4 res = fract(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  fract_498c77();
+}
+
+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/fract/498c77.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl
new file mode 100644
index 0000000..02f42f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_498c77() {
+  half4 res = fract(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fract_498c77();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fract_498c77();
+  return;
+}
+
+kernel void compute_main() {
+  fract_498c77();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm
new file mode 100644
index 0000000..8ab3fda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fract_498c77 "fract_498c77"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_498c77 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Fract %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fract_498c77
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fract_498c77
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fract_498c77
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl
new file mode 100644
index 0000000..33a0794
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/498c77.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fract_498c77() {
+  var res : vec4<f16> = fract(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_498c77();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_498c77();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_498c77();
+}
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl
new file mode 100644
index 0000000..a2c98fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fract(vec<3, f16>) -> vec<3, f16>
+fn fract_958a1d() {
+  var res: vec3<f16> = fract(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_958a1d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_958a1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_958a1d();
+}
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0c8e9a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fract_958a1d() {
+  vector<float16_t, 3> res = frac((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_958a1d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_958a1d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_958a1d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f2fcd48
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void fract_958a1d() {
+  vector<float16_t, 3> res = frac((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_958a1d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_958a1d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_958a1d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001490DA5B940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl
new file mode 100644
index 0000000..19520f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_958a1d() {
+  f16vec3 res = fract(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  fract_958a1d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fract_958a1d() {
+  f16vec3 res = fract(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  fract_958a1d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_958a1d() {
+  f16vec3 res = fract(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  fract_958a1d();
+}
+
+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/fract/958a1d.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl
new file mode 100644
index 0000000..fb0e54a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_958a1d() {
+  half3 res = fract(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fract_958a1d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fract_958a1d();
+  return;
+}
+
+kernel void compute_main() {
+  fract_958a1d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea074c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %fract_958a1d "fract_958a1d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_958a1d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Fract %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %fract_958a1d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %fract_958a1d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %fract_958a1d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl
new file mode 100644
index 0000000..c5cafe6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/958a1d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fract_958a1d() {
+  var res : vec3<f16> = fract(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_958a1d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_958a1d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_958a1d();
+}
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl
new file mode 100644
index 0000000..e502ba9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn fract(f16) -> f16
+fn fract_eb38ce() {
+  var res: f16 = fract(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_eb38ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_eb38ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_eb38ce();
+}
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffebafe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void fract_eb38ce() {
+  float16_t res = frac(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_eb38ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_eb38ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_eb38ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4bccb6ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void fract_eb38ce() {
+  float16_t res = frac(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  fract_eb38ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  fract_eb38ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  fract_eb38ce();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000230E569A8C0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl
new file mode 100644
index 0000000..ba80d87
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_eb38ce() {
+  float16_t res = fract(0.0hf);
+}
+
+vec4 vertex_main() {
+  fract_eb38ce();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void fract_eb38ce() {
+  float16_t res = fract(0.0hf);
+}
+
+void fragment_main() {
+  fract_eb38ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void fract_eb38ce() {
+  float16_t res = fract(0.0hf);
+}
+
+void compute_main() {
+  fract_eb38ce();
+}
+
+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/fract/eb38ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl
new file mode 100644
index 0000000..7b6600f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void fract_eb38ce() {
+  half res = fract(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  fract_eb38ce();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  fract_eb38ce();
+  return;
+}
+
+kernel void compute_main() {
+  fract_eb38ce();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..0cb23c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %fract_eb38ce "fract_eb38ce"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%fract_eb38ce = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Fract %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %fract_eb38ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %fract_eb38ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %fract_eb38ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..11a5545
--- /dev/null
+++ b/test/tint/builtins/gen/literal/fract/eb38ce.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn fract_eb38ce() {
+  var res : f16 = fract(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  fract_eb38ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  fract_eb38ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  fract_eb38ce();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl
new file mode 100644
index 0000000..12ecb47
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn frexp(vec<4, f16>) -> __frexp_result_vec<4, f16>
+fn frexp_3dd21e() {
+  var res = frexp(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_3dd21e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_3dd21e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_3dd21e();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a2155f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+struct frexp_result_vec4_f16 {
+  vector<float16_t, 4> sig;
+  int4 exp;
+};
+frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) {
+  vector<float16_t, 4> exp;
+  vector<float16_t, 4> sig = frexp(param_0, exp);
+  frexp_result_vec4_f16 result = {sig, int4(exp)};
+  return result;
+}
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_3dd21e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_3dd21e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_3dd21e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45fbb59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+SKIP: FAILED
+
+struct frexp_result_vec4_f16 {
+  vector<float16_t, 4> sig;
+  int4 exp;
+};
+frexp_result_vec4_f16 tint_frexp(vector<float16_t, 4> param_0) {
+  vector<float16_t, 4> exp;
+  vector<float16_t, 4> sig = frexp(param_0, exp);
+  frexp_result_vec4_f16 result = {sig, int4(exp)};
+  return result;
+}
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_3dd21e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_3dd21e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_3dd21e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D4F5EB9720(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl
new file mode 100644
index 0000000..ba7ca1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec4_f16 {
+  f16vec4 sig;
+  ivec4 exp;
+};
+
+frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
+  frexp_result_vec4_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  frexp_3dd21e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct frexp_result_vec4_f16 {
+  f16vec4 sig;
+  ivec4 exp;
+};
+
+frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
+  frexp_result_vec4_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  frexp_3dd21e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec4_f16 {
+  f16vec4 sig;
+  ivec4 exp;
+};
+
+frexp_result_vec4_f16 tint_frexp(f16vec4 param_0) {
+  frexp_result_vec4_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  frexp_3dd21e();
+}
+
+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/frexp/3dd21e.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl
new file mode 100644
index 0000000..91c87e7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct frexp_result_vec4_f16 {
+  half4 sig;
+  int4 exp;
+};
+frexp_result_vec4_f16 tint_frexp(half4 param_0) {
+  frexp_result_vec4_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+void frexp_3dd21e() {
+  frexp_result_vec4_f16 res = tint_frexp(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  frexp_3dd21e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  frexp_3dd21e();
+  return;
+}
+
+kernel void compute_main() {
+  frexp_3dd21e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm
new file mode 100644
index 0000000..6585dc0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %19 = OpExtInstImport "GLSL.std.450"
+               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 %frexp_3dd21e "frexp_3dd21e"
+               OpName %__frexp_result_vec4_f16 "__frexp_result_vec4_f16"
+               OpMemberName %__frexp_result_vec4_f16 0 "sig"
+               OpMemberName %__frexp_result_vec4_f16 1 "exp"
+               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
+               OpMemberDecorate %__frexp_result_vec4_f16 0 Offset 0
+               OpMemberDecorate %__frexp_result_vec4_f16 1 Offset 16
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+%__frexp_result_vec4_f16 = OpTypeStruct %v4half %v4int
+         %20 = OpConstantNull %v4half
+%_ptr_Function___frexp_result_vec4_f16 = OpTypePointer Function %__frexp_result_vec4_f16
+         %23 = OpConstantNull %__frexp_result_vec4_f16
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_3dd21e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___frexp_result_vec4_f16 Function %23
+         %13 = OpExtInst %__frexp_result_vec4_f16 %19 FrexpStruct %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %frexp_3dd21e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %frexp_3dd21e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_3dd21e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a33fbd0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/3dd21e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn frexp_3dd21e() {
+  var res = frexp(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_3dd21e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_3dd21e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_3dd21e();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl
new file mode 100644
index 0000000..6f4f993
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn frexp(f16) -> __frexp_result<f16>
+fn frexp_5257dd() {
+  var res = frexp(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_5257dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_5257dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_5257dd();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e34fba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+struct frexp_result_f16 {
+  float16_t sig;
+  int exp;
+};
+frexp_result_f16 tint_frexp(float16_t param_0) {
+  float16_t exp;
+  float16_t sig = frexp(param_0, exp);
+  frexp_result_f16 result = {sig, int(exp)};
+  return result;
+}
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_5257dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_5257dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_5257dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..05c7d5f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+SKIP: FAILED
+
+struct frexp_result_f16 {
+  float16_t sig;
+  int exp;
+};
+frexp_result_f16 tint_frexp(float16_t param_0) {
+  float16_t exp;
+  float16_t sig = frexp(param_0, exp);
+  frexp_result_f16 result = {sig, int(exp)};
+  return result;
+}
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_5257dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_5257dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_5257dd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017322E51900(2,3-11): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl
new file mode 100644
index 0000000..f08939e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_f16 {
+  float16_t sig;
+  int exp;
+};
+
+frexp_result_f16 tint_frexp(float16_t param_0) {
+  frexp_result_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(0.0hf);
+}
+
+vec4 vertex_main() {
+  frexp_5257dd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct frexp_result_f16 {
+  float16_t sig;
+  int exp;
+};
+
+frexp_result_f16 tint_frexp(float16_t param_0) {
+  frexp_result_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(0.0hf);
+}
+
+void fragment_main() {
+  frexp_5257dd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_f16 {
+  float16_t sig;
+  int exp;
+};
+
+frexp_result_f16 tint_frexp(float16_t param_0) {
+  frexp_result_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(0.0hf);
+}
+
+void compute_main() {
+  frexp_5257dd();
+}
+
+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/frexp/5257dd.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl
new file mode 100644
index 0000000..1920b16
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct frexp_result_f16 {
+  half sig;
+  int exp;
+};
+frexp_result_f16 tint_frexp(half param_0) {
+  frexp_result_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+void frexp_5257dd() {
+  frexp_result_f16 res = tint_frexp(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  frexp_5257dd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  frexp_5257dd();
+  return;
+}
+
+kernel void compute_main() {
+  frexp_5257dd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..6c20d39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %17 = OpExtInstImport "GLSL.std.450"
+               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 %frexp_5257dd "frexp_5257dd"
+               OpName %__frexp_result_f16 "__frexp_result_f16"
+               OpMemberName %__frexp_result_f16 0 "sig"
+               OpMemberName %__frexp_result_f16 1 "exp"
+               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
+               OpMemberDecorate %__frexp_result_f16 0 Offset 0
+               OpMemberDecorate %__frexp_result_f16 1 Offset 4
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+        %int = OpTypeInt 32 1
+%__frexp_result_f16 = OpTypeStruct %half %int
+         %18 = OpConstantNull %half
+%_ptr_Function___frexp_result_f16 = OpTypePointer Function %__frexp_result_f16
+         %21 = OpConstantNull %__frexp_result_f16
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_5257dd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___frexp_result_f16 Function %21
+         %13 = OpExtInst %__frexp_result_f16 %17 FrexpStruct %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %frexp_5257dd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %frexp_5257dd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %frexp_5257dd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..ca55834
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5257dd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn frexp_5257dd() {
+  var res = frexp(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_5257dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_5257dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_5257dd();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl
new file mode 100644
index 0000000..7d784db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn frexp(vec<2, f16>) -> __frexp_result_vec<2, f16>
+fn frexp_5f47bf() {
+  var res = frexp(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_5f47bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_5f47bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_5f47bf();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b39e0d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+struct frexp_result_vec2_f16 {
+  vector<float16_t, 2> sig;
+  int2 exp;
+};
+frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) {
+  vector<float16_t, 2> exp;
+  vector<float16_t, 2> sig = frexp(param_0, exp);
+  frexp_result_vec2_f16 result = {sig, int2(exp)};
+  return result;
+}
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_5f47bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_5f47bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_5f47bf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..acfc0ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+SKIP: FAILED
+
+struct frexp_result_vec2_f16 {
+  vector<float16_t, 2> sig;
+  int2 exp;
+};
+frexp_result_vec2_f16 tint_frexp(vector<float16_t, 2> param_0) {
+  vector<float16_t, 2> exp;
+  vector<float16_t, 2> sig = frexp(param_0, exp);
+  frexp_result_vec2_f16 result = {sig, int2(exp)};
+  return result;
+}
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_5f47bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_5f47bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_5f47bf();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D35F6E9740(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl
new file mode 100644
index 0000000..4a75e6c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec2_f16 {
+  f16vec2 sig;
+  ivec2 exp;
+};
+
+frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
+  frexp_result_vec2_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  frexp_5f47bf();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct frexp_result_vec2_f16 {
+  f16vec2 sig;
+  ivec2 exp;
+};
+
+frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
+  frexp_result_vec2_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  frexp_5f47bf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec2_f16 {
+  f16vec2 sig;
+  ivec2 exp;
+};
+
+frexp_result_vec2_f16 tint_frexp(f16vec2 param_0) {
+  frexp_result_vec2_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  frexp_5f47bf();
+}
+
+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/frexp/5f47bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl
new file mode 100644
index 0000000..a2290a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct frexp_result_vec2_f16 {
+  half2 sig;
+  int2 exp;
+};
+frexp_result_vec2_f16 tint_frexp(half2 param_0) {
+  frexp_result_vec2_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+void frexp_5f47bf() {
+  frexp_result_vec2_f16 res = tint_frexp(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  frexp_5f47bf();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  frexp_5f47bf();
+  return;
+}
+
+kernel void compute_main() {
+  frexp_5f47bf();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm
new file mode 100644
index 0000000..e1c51b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %19 = OpExtInstImport "GLSL.std.450"
+               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 %frexp_5f47bf "frexp_5f47bf"
+               OpName %__frexp_result_vec2_f16 "__frexp_result_vec2_f16"
+               OpMemberName %__frexp_result_vec2_f16 0 "sig"
+               OpMemberName %__frexp_result_vec2_f16 1 "exp"
+               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
+               OpMemberDecorate %__frexp_result_vec2_f16 0 Offset 0
+               OpMemberDecorate %__frexp_result_vec2_f16 1 Offset 8
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+%__frexp_result_vec2_f16 = OpTypeStruct %v2half %v2int
+         %20 = OpConstantNull %v2half
+%_ptr_Function___frexp_result_vec2_f16 = OpTypePointer Function %__frexp_result_vec2_f16
+         %23 = OpConstantNull %__frexp_result_vec2_f16
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_5f47bf = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___frexp_result_vec2_f16 Function %23
+         %13 = OpExtInst %__frexp_result_vec2_f16 %19 FrexpStruct %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %frexp_5f47bf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %frexp_5f47bf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_5f47bf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl
new file mode 100644
index 0000000..5dd980e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/5f47bf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn frexp_5f47bf() {
+  var res = frexp(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_5f47bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_5f47bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_5f47bf();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl
new file mode 100644
index 0000000..9b89a6b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn frexp(vec<3, f16>) -> __frexp_result_vec<3, f16>
+fn frexp_ae4a66() {
+  var res = frexp(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_ae4a66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_ae4a66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_ae4a66();
+}
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..35d6455
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.dxc.hlsl
@@ -0,0 +1,41 @@
+struct frexp_result_vec3_f16 {
+  vector<float16_t, 3> sig;
+  int3 exp;
+};
+frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) {
+  vector<float16_t, 3> exp;
+  vector<float16_t, 3> sig = frexp(param_0, exp);
+  frexp_result_vec3_f16 result = {sig, int3(exp)};
+  return result;
+}
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_ae4a66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_ae4a66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_ae4a66();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b25e403
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.fxc.hlsl
@@ -0,0 +1,46 @@
+SKIP: FAILED
+
+struct frexp_result_vec3_f16 {
+  vector<float16_t, 3> sig;
+  int3 exp;
+};
+frexp_result_vec3_f16 tint_frexp(vector<float16_t, 3> param_0) {
+  vector<float16_t, 3> exp;
+  vector<float16_t, 3> sig = frexp(param_0, exp);
+  frexp_result_vec3_f16 result = {sig, int3(exp)};
+  return result;
+}
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  frexp_ae4a66();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  frexp_ae4a66();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  frexp_ae4a66();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D8ABEFAB20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl
new file mode 100644
index 0000000..e1b82e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec3_f16 {
+  f16vec3 sig;
+  ivec3 exp;
+};
+
+frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
+  frexp_result_vec3_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  frexp_ae4a66();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct frexp_result_vec3_f16 {
+  f16vec3 sig;
+  ivec3 exp;
+};
+
+frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
+  frexp_result_vec3_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  frexp_ae4a66();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct frexp_result_vec3_f16 {
+  f16vec3 sig;
+  ivec3 exp;
+};
+
+frexp_result_vec3_f16 tint_frexp(f16vec3 param_0) {
+  frexp_result_vec3_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  frexp_ae4a66();
+}
+
+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/frexp/ae4a66.wgsl.expected.msl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl
new file mode 100644
index 0000000..b58cc10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct frexp_result_vec3_f16 {
+  half3 sig;
+  int3 exp;
+};
+frexp_result_vec3_f16 tint_frexp(half3 param_0) {
+  frexp_result_vec3_f16 result;
+  result.sig = frexp(param_0, result.exp);
+  return result;
+}
+
+void frexp_ae4a66() {
+  frexp_result_vec3_f16 res = tint_frexp(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  frexp_ae4a66();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  frexp_ae4a66();
+  return;
+}
+
+kernel void compute_main() {
+  frexp_ae4a66();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm
new file mode 100644
index 0000000..5bf4a21b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %19 = OpExtInstImport "GLSL.std.450"
+               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 %frexp_ae4a66 "frexp_ae4a66"
+               OpName %__frexp_result_vec3_f16 "__frexp_result_vec3_f16"
+               OpMemberName %__frexp_result_vec3_f16 0 "sig"
+               OpMemberName %__frexp_result_vec3_f16 1 "exp"
+               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
+               OpMemberDecorate %__frexp_result_vec3_f16 0 Offset 0
+               OpMemberDecorate %__frexp_result_vec3_f16 1 Offset 16
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+%__frexp_result_vec3_f16 = OpTypeStruct %v3half %v3int
+         %20 = OpConstantNull %v3half
+%_ptr_Function___frexp_result_vec3_f16 = OpTypePointer Function %__frexp_result_vec3_f16
+         %23 = OpConstantNull %__frexp_result_vec3_f16
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%frexp_ae4a66 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___frexp_result_vec3_f16 Function %23
+         %13 = OpExtInst %__frexp_result_vec3_f16 %19 FrexpStruct %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %frexp_ae4a66
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %frexp_ae4a66
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %frexp_ae4a66
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl
new file mode 100644
index 0000000..fcec0eb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/frexp/ae4a66.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn frexp_ae4a66() {
+  var res = frexp(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  frexp_ae4a66();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  frexp_ae4a66();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  frexp_ae4a66();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl
new file mode 100644
index 0000000..fba79b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn inverseSqrt(f16) -> f16
+fn inverseSqrt_440300() {
+  var res: f16 = inverseSqrt(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_440300();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_440300();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_440300();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..39bea64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void inverseSqrt_440300() {
+  float16_t res = rsqrt(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_440300();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_440300();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_440300();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..81427b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void inverseSqrt_440300() {
+  float16_t res = rsqrt(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_440300();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_440300();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_440300();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237636FBD30(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl
new file mode 100644
index 0000000..8cc5283
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_440300() {
+  float16_t res = inversesqrt(0.0hf);
+}
+
+vec4 vertex_main() {
+  inverseSqrt_440300();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void inverseSqrt_440300() {
+  float16_t res = inversesqrt(0.0hf);
+}
+
+void fragment_main() {
+  inverseSqrt_440300();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_440300() {
+  float16_t res = inversesqrt(0.0hf);
+}
+
+void compute_main() {
+  inverseSqrt_440300();
+}
+
+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/inverseSqrt/440300.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl
new file mode 100644
index 0000000..0cab7ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_440300() {
+  half res = rsqrt(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_440300();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  inverseSqrt_440300();
+  return;
+}
+
+kernel void compute_main() {
+  inverseSqrt_440300();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm
new file mode 100644
index 0000000..49ae296
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %inverseSqrt_440300 "inverseSqrt_440300"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_440300 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 InverseSqrt %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %inverseSqrt_440300
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %inverseSqrt_440300
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %inverseSqrt_440300
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl
new file mode 100644
index 0000000..c2b635a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/440300.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn inverseSqrt_440300() {
+  var res : f16 = inverseSqrt(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_440300();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_440300();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_440300();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl
new file mode 100644
index 0000000..af9bc17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn inverseSqrt(vec<2, f16>) -> vec<2, f16>
+fn inverseSqrt_5f51f8() {
+  var res: vec2<f16> = inverseSqrt(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_5f51f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_5f51f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_5f51f8();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f58be18
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void inverseSqrt_5f51f8() {
+  vector<float16_t, 2> res = rsqrt((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_5f51f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..80d1b67
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void inverseSqrt_5f51f8() {
+  vector<float16_t, 2> res = rsqrt((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_5f51f8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000288A2227E00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl
new file mode 100644
index 0000000..4e73df6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_5f51f8() {
+  f16vec2 res = inversesqrt(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  inverseSqrt_5f51f8();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void inverseSqrt_5f51f8() {
+  f16vec2 res = inversesqrt(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  inverseSqrt_5f51f8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_5f51f8() {
+  f16vec2 res = inversesqrt(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  inverseSqrt_5f51f8();
+}
+
+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/inverseSqrt/5f51f8.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl
new file mode 100644
index 0000000..2e7d4bd9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_5f51f8() {
+  half2 res = rsqrt(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_5f51f8();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
+
+kernel void compute_main() {
+  inverseSqrt_5f51f8();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd5caca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %inverseSqrt_5f51f8 "inverseSqrt_5f51f8"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_5f51f8 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 InverseSqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %inverseSqrt_5f51f8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %inverseSqrt_5f51f8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %inverseSqrt_5f51f8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl
new file mode 100644
index 0000000..672f0e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/5f51f8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn inverseSqrt_5f51f8() {
+  var res : vec2<f16> = inverseSqrt(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_5f51f8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_5f51f8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_5f51f8();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl
new file mode 100644
index 0000000..2a389e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn inverseSqrt(vec<3, f16>) -> vec<3, f16>
+fn inverseSqrt_b85ebd() {
+  var res: vec3<f16> = inverseSqrt(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_b85ebd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_b85ebd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_b85ebd();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ef654c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void inverseSqrt_b85ebd() {
+  vector<float16_t, 3> res = rsqrt((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_b85ebd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e08e83
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void inverseSqrt_b85ebd() {
+  vector<float16_t, 3> res = rsqrt((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_b85ebd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEA9110080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl
new file mode 100644
index 0000000..12e5cab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_b85ebd() {
+  f16vec3 res = inversesqrt(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  inverseSqrt_b85ebd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void inverseSqrt_b85ebd() {
+  f16vec3 res = inversesqrt(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  inverseSqrt_b85ebd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_b85ebd() {
+  f16vec3 res = inversesqrt(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  inverseSqrt_b85ebd();
+}
+
+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/inverseSqrt/b85ebd.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl
new file mode 100644
index 0000000..351560a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_b85ebd() {
+  half3 res = rsqrt(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_b85ebd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
+
+kernel void compute_main() {
+  inverseSqrt_b85ebd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm
new file mode 100644
index 0000000..05243bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %inverseSqrt_b85ebd "inverseSqrt_b85ebd"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_b85ebd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 InverseSqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %inverseSqrt_b85ebd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %inverseSqrt_b85ebd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %inverseSqrt_b85ebd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl
new file mode 100644
index 0000000..e9c1e7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/b85ebd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn inverseSqrt_b85ebd() {
+  var res : vec3<f16> = inverseSqrt(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_b85ebd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_b85ebd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_b85ebd();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl
new file mode 100644
index 0000000..8657926
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn inverseSqrt(vec<4, f16>) -> vec<4, f16>
+fn inverseSqrt_cbdc70() {
+  var res: vec4<f16> = inverseSqrt(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_cbdc70();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_cbdc70();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_cbdc70();
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ed1f192
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void inverseSqrt_cbdc70() {
+  vector<float16_t, 4> res = rsqrt((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_cbdc70();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6880c60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void inverseSqrt_cbdc70() {
+  vector<float16_t, 4> res = rsqrt((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_cbdc70();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E1CCE37DA0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl
new file mode 100644
index 0000000..43f1eda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_cbdc70() {
+  f16vec4 res = inversesqrt(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  inverseSqrt_cbdc70();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void inverseSqrt_cbdc70() {
+  f16vec4 res = inversesqrt(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  inverseSqrt_cbdc70();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void inverseSqrt_cbdc70() {
+  f16vec4 res = inversesqrt(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  inverseSqrt_cbdc70();
+}
+
+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/inverseSqrt/cbdc70.wgsl.expected.msl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl
new file mode 100644
index 0000000..f1610f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void inverseSqrt_cbdc70() {
+  half4 res = rsqrt(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  inverseSqrt_cbdc70();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
+
+kernel void compute_main() {
+  inverseSqrt_cbdc70();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm
new file mode 100644
index 0000000..43367c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %inverseSqrt_cbdc70 "inverseSqrt_cbdc70"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%inverseSqrt_cbdc70 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 InverseSqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %inverseSqrt_cbdc70
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %inverseSqrt_cbdc70
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %inverseSqrt_cbdc70
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl
new file mode 100644
index 0000000..2290320
--- /dev/null
+++ b/test/tint/builtins/gen/literal/inverseSqrt/cbdc70.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn inverseSqrt_cbdc70() {
+  var res : vec4<f16> = inverseSqrt(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  inverseSqrt_cbdc70();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  inverseSqrt_cbdc70();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  inverseSqrt_cbdc70();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl
new file mode 100644
index 0000000..bed22e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ldexp(vec<2, f16>, vec<2, i32>) -> vec<2, f16>
+fn ldexp_3d90b4() {
+  var res: vec2<f16> = ldexp(vec2<f16>(f16()), vec2<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_3d90b4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_3d90b4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_3d90b4();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae0933e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ldexp_3d90b4() {
+  vector<float16_t, 2> res = ldexp((float16_t(0.0h)).xx, (1).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_3d90b4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_3d90b4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_3d90b4();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0608e1f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ldexp_3d90b4() {
+  vector<float16_t, 2> res = ldexp((float16_t(0.0h)).xx, (1).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_3d90b4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_3d90b4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_3d90b4();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001808B7D81C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl
new file mode 100644
index 0000000..74ee06a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_3d90b4() {
+  f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1));
+}
+
+vec4 vertex_main() {
+  ldexp_3d90b4();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ldexp_3d90b4() {
+  f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1));
+}
+
+void fragment_main() {
+  ldexp_3d90b4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_3d90b4() {
+  f16vec2 res = ldexp(f16vec2(0.0hf), ivec2(1));
+}
+
+void compute_main() {
+  ldexp_3d90b4();
+}
+
+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/ldexp/3d90b4.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl
new file mode 100644
index 0000000..9d9e2ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_3d90b4() {
+  half2 res = ldexp(half2(0.0h), int2(1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ldexp_3d90b4();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ldexp_3d90b4();
+  return;
+}
+
+kernel void compute_main() {
+  ldexp_3d90b4();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm
new file mode 100644
index 0000000..0847908
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ldexp_3d90b4 "ldexp_3d90b4"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+        %int = OpTypeInt 32 1
+      %v2int = OpTypeVector %int 2
+      %int_1 = OpConstant %int 1
+         %21 = OpConstantComposite %v2int %int_1 %int_1
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_3d90b4 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Ldexp %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %ldexp_3d90b4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl
new file mode 100644
index 0000000..cacab9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/3d90b4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ldexp_3d90b4() {
+  var res : vec2<f16> = ldexp(vec2<f16>(f16()), vec2<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_3d90b4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_3d90b4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_3d90b4();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl
new file mode 100644
index 0000000..24f8054
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ldexp(f16, i32) -> f16
+fn ldexp_624e0c() {
+  var res: f16 = ldexp(f16(), 1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_624e0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_624e0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_624e0c();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c978bcf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ldexp_624e0c() {
+  float16_t res = ldexp(float16_t(0.0h), 1);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_624e0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_624e0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_624e0c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d3e207e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void ldexp_624e0c() {
+  float16_t res = ldexp(float16_t(0.0h), 1);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_624e0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_624e0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_624e0c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F949F984D0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl
new file mode 100644
index 0000000..f856c62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_624e0c() {
+  float16_t res = ldexp(0.0hf, 1);
+}
+
+vec4 vertex_main() {
+  ldexp_624e0c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ldexp_624e0c() {
+  float16_t res = ldexp(0.0hf, 1);
+}
+
+void fragment_main() {
+  ldexp_624e0c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_624e0c() {
+  float16_t res = ldexp(0.0hf, 1);
+}
+
+void compute_main() {
+  ldexp_624e0c();
+}
+
+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/ldexp/624e0c.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl
new file mode 100644
index 0000000..e63d736
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_624e0c() {
+  half res = ldexp(0.0h, 1);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ldexp_624e0c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ldexp_624e0c();
+  return;
+}
+
+kernel void compute_main() {
+  ldexp_624e0c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm
new file mode 100644
index 0000000..13ce908
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %ldexp_624e0c "ldexp_624e0c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_half = OpTypePointer Function %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_624e0c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Ldexp %16 %int_1
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %ldexp_624e0c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %ldexp_624e0c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %ldexp_624e0c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl
new file mode 100644
index 0000000..1d6ebc8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/624e0c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ldexp_624e0c() {
+  var res : f16 = ldexp(f16(), 1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_624e0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_624e0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_624e0c();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl
new file mode 100644
index 0000000..01a4e81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ldexp(vec<3, f16>, vec<3, i32>) -> vec<3, f16>
+fn ldexp_7485ce() {
+  var res: vec3<f16> = ldexp(vec3<f16>(f16()), vec3<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_7485ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_7485ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_7485ce();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..731bb5d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ldexp_7485ce() {
+  vector<float16_t, 3> res = ldexp((float16_t(0.0h)).xxx, (1).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_7485ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_7485ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_7485ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ac6b68f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ldexp_7485ce() {
+  vector<float16_t, 3> res = ldexp((float16_t(0.0h)).xxx, (1).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_7485ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_7485ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_7485ce();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001698F7B0100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl
new file mode 100644
index 0000000..4a19e3c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7485ce() {
+  f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1));
+}
+
+vec4 vertex_main() {
+  ldexp_7485ce();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ldexp_7485ce() {
+  f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1));
+}
+
+void fragment_main() {
+  ldexp_7485ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7485ce() {
+  f16vec3 res = ldexp(f16vec3(0.0hf), ivec3(1));
+}
+
+void compute_main() {
+  ldexp_7485ce();
+}
+
+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/ldexp/7485ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl
new file mode 100644
index 0000000..b5d93bf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_7485ce() {
+  half3 res = ldexp(half3(0.0h), int3(1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ldexp_7485ce();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ldexp_7485ce();
+  return;
+}
+
+kernel void compute_main() {
+  ldexp_7485ce();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..985d489
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ldexp_7485ce "ldexp_7485ce"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+        %int = OpTypeInt 32 1
+      %v3int = OpTypeVector %int 3
+      %int_1 = OpConstant %int 1
+         %21 = OpConstantComposite %v3int %int_1 %int_1 %int_1
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_7485ce = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Ldexp %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %ldexp_7485ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %ldexp_7485ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %ldexp_7485ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..99f6df2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7485ce.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ldexp_7485ce() {
+  var res : vec3<f16> = ldexp(vec3<f16>(f16()), vec3<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_7485ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_7485ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_7485ce();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl
new file mode 100644
index 0000000..a791767
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn ldexp(vec<4, f16>, vec<4, i32>) -> vec<4, f16>
+fn ldexp_7fa13c() {
+  var res: vec4<f16> = ldexp(vec4<f16>(f16()), vec4<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_7fa13c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_7fa13c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_7fa13c();
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..774c31e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void ldexp_7fa13c() {
+  vector<float16_t, 4> res = ldexp((float16_t(0.0h)).xxxx, (1).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_7fa13c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_7fa13c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_7fa13c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a53fa35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void ldexp_7fa13c() {
+  vector<float16_t, 4> res = ldexp((float16_t(0.0h)).xxxx, (1).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  ldexp_7fa13c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  ldexp_7fa13c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  ldexp_7fa13c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000018D79877AB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl
new file mode 100644
index 0000000..30b6c1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7fa13c() {
+  f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1));
+}
+
+vec4 vertex_main() {
+  ldexp_7fa13c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void ldexp_7fa13c() {
+  f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1));
+}
+
+void fragment_main() {
+  ldexp_7fa13c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void ldexp_7fa13c() {
+  f16vec4 res = ldexp(f16vec4(0.0hf), ivec4(1));
+}
+
+void compute_main() {
+  ldexp_7fa13c();
+}
+
+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/ldexp/7fa13c.wgsl.expected.msl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl
new file mode 100644
index 0000000..b348e4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void ldexp_7fa13c() {
+  half4 res = ldexp(half4(0.0h), int4(1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  ldexp_7fa13c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  ldexp_7fa13c();
+  return;
+}
+
+kernel void compute_main() {
+  ldexp_7fa13c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm
new file mode 100644
index 0000000..f389bc3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %ldexp_7fa13c "ldexp_7fa13c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+        %int = OpTypeInt 32 1
+      %v4int = OpTypeVector %int 4
+      %int_1 = OpConstant %int 1
+         %21 = OpConstantComposite %v4int %int_1 %int_1 %int_1 %int_1
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%ldexp_7fa13c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Ldexp %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %ldexp_7fa13c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl
new file mode 100644
index 0000000..a42ea96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/ldexp/7fa13c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn ldexp_7fa13c() {
+  var res : vec4<f16> = ldexp(vec4<f16>(f16()), vec4<i32>(1));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  ldexp_7fa13c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  ldexp_7fa13c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  ldexp_7fa13c();
+}
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl
new file mode 100644
index 0000000..4306efe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn length(vec<2, f16>) -> f16
+fn length_3f0e13() {
+  var res: f16 = length(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_3f0e13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_3f0e13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_3f0e13();
+}
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08660e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void length_3f0e13() {
+  float16_t res = length((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_3f0e13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_3f0e13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_3f0e13();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aaa0dce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void length_3f0e13() {
+  float16_t res = length((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_3f0e13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_3f0e13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_3f0e13();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025534170870(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl
new file mode 100644
index 0000000..ff3bb99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_3f0e13() {
+  float16_t res = length(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  length_3f0e13();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void length_3f0e13() {
+  float16_t res = length(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  length_3f0e13();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_3f0e13() {
+  float16_t res = length(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  length_3f0e13();
+}
+
+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/length/3f0e13.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl
new file mode 100644
index 0000000..2aadef9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_3f0e13() {
+  half res = length(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  length_3f0e13();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  length_3f0e13();
+  return;
+}
+
+kernel void compute_main() {
+  length_3f0e13();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm
new file mode 100644
index 0000000..5809762
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %length_3f0e13 "length_3f0e13"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_3f0e13 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Length %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %length_3f0e13
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %length_3f0e13
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %length_3f0e13
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl
new file mode 100644
index 0000000..d97f9c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/3f0e13.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn length_3f0e13() {
+  var res : f16 = length(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_3f0e13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_3f0e13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_3f0e13();
+}
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl
new file mode 100644
index 0000000..be2dbf1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn length(vec<4, f16>) -> f16
+fn length_5b1a9b() {
+  var res: f16 = length(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_5b1a9b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_5b1a9b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_5b1a9b();
+}
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..efaee52
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void length_5b1a9b() {
+  float16_t res = length((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_5b1a9b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_5b1a9b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_5b1a9b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..736654a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void length_5b1a9b() {
+  float16_t res = length((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_5b1a9b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_5b1a9b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_5b1a9b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000206B010D5C0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl
new file mode 100644
index 0000000..0fc5433
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_5b1a9b() {
+  float16_t res = length(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  length_5b1a9b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void length_5b1a9b() {
+  float16_t res = length(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  length_5b1a9b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_5b1a9b() {
+  float16_t res = length(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  length_5b1a9b();
+}
+
+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/length/5b1a9b.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl
new file mode 100644
index 0000000..c1013ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_5b1a9b() {
+  half res = length(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  length_5b1a9b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  length_5b1a9b();
+  return;
+}
+
+kernel void compute_main() {
+  length_5b1a9b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm
new file mode 100644
index 0000000..c112767
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %length_5b1a9b "length_5b1a9b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_5b1a9b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Length %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %length_5b1a9b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %length_5b1a9b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %length_5b1a9b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl
new file mode 100644
index 0000000..526971a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/5b1a9b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn length_5b1a9b() {
+  var res : f16 = length(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_5b1a9b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_5b1a9b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_5b1a9b();
+}
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl
new file mode 100644
index 0000000..a51f78a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn length(vec<3, f16>) -> f16
+fn length_ba16d6() {
+  var res: f16 = length(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_ba16d6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_ba16d6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_ba16d6();
+}
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c0c7954
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void length_ba16d6() {
+  float16_t res = length((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_ba16d6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_ba16d6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_ba16d6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..99ff3bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void length_ba16d6() {
+  float16_t res = length((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_ba16d6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_ba16d6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_ba16d6();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE9E8E87F0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl
new file mode 100644
index 0000000..57c51de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_ba16d6() {
+  float16_t res = length(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  length_ba16d6();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void length_ba16d6() {
+  float16_t res = length(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  length_ba16d6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_ba16d6() {
+  float16_t res = length(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  length_ba16d6();
+}
+
+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/length/ba16d6.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl
new file mode 100644
index 0000000..c5e5059
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_ba16d6() {
+  half res = length(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  length_ba16d6();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  length_ba16d6();
+  return;
+}
+
+kernel void compute_main() {
+  length_ba16d6();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm
new file mode 100644
index 0000000..9cb2b45
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %length_ba16d6 "length_ba16d6"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpConstantNull %half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_ba16d6 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %20
+         %13 = OpExtInst %half %15 Length %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %length_ba16d6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %length_ba16d6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %length_ba16d6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl
new file mode 100644
index 0000000..ef23cb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/ba16d6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn length_ba16d6() {
+  var res : f16 = length(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_ba16d6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_ba16d6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_ba16d6();
+}
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl b/test/tint/builtins/gen/literal/length/c158da.wgsl
new file mode 100644
index 0000000..70b692f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn length(f16) -> f16
+fn length_c158da() {
+  var res: f16 = length(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_c158da();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_c158da();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_c158da();
+}
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5b0e775
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void length_c158da() {
+  float16_t res = length(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_c158da();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_c158da();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_c158da();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a73153
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void length_c158da() {
+  float16_t res = length(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  length_c158da();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  length_c158da();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  length_c158da();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B0C50014C0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl
new file mode 100644
index 0000000..afc15b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_c158da() {
+  float16_t res = length(0.0hf);
+}
+
+vec4 vertex_main() {
+  length_c158da();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void length_c158da() {
+  float16_t res = length(0.0hf);
+}
+
+void fragment_main() {
+  length_c158da();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void length_c158da() {
+  float16_t res = length(0.0hf);
+}
+
+void compute_main() {
+  length_c158da();
+}
+
+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/length/c158da.wgsl.expected.msl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl
new file mode 100644
index 0000000..f9f3a70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void length_c158da() {
+  half res = fabs(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  length_c158da();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  length_c158da();
+  return;
+}
+
+kernel void compute_main() {
+  length_c158da();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm
new file mode 100644
index 0000000..8199018
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %length_c158da "length_c158da"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%length_c158da = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Length %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %length_c158da
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %length_c158da
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %length_c158da
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl
new file mode 100644
index 0000000..3cbfcfe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/length/c158da.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn length_c158da() {
+  var res : f16 = length(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  length_c158da();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  length_c158da();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  length_c158da();
+}
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl
new file mode 100644
index 0000000..761a154
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log(vec<3, f16>) -> vec<3, f16>
+fn log_6ff86f() {
+  var res: vec3<f16> = log(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_6ff86f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_6ff86f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_6ff86f();
+}
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b141371
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log_6ff86f() {
+  vector<float16_t, 3> res = log((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_6ff86f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_6ff86f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_6ff86f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9f4b2ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log_6ff86f() {
+  vector<float16_t, 3> res = log((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_6ff86f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_6ff86f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_6ff86f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000269CEF087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl
new file mode 100644
index 0000000..2d6e06d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_6ff86f() {
+  f16vec3 res = log(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  log_6ff86f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log_6ff86f() {
+  f16vec3 res = log(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  log_6ff86f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_6ff86f() {
+  f16vec3 res = log(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  log_6ff86f();
+}
+
+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/log/6ff86f.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl
new file mode 100644
index 0000000..ae29414
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_6ff86f() {
+  half3 res = log(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log_6ff86f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log_6ff86f();
+  return;
+}
+
+kernel void compute_main() {
+  log_6ff86f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm
new file mode 100644
index 0000000..51676f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log_6ff86f "log_6ff86f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_6ff86f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Log %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log_6ff86f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log_6ff86f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log_6ff86f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl
new file mode 100644
index 0000000..9fbbe3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/6ff86f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log_6ff86f() {
+  var res : vec3<f16> = log(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_6ff86f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_6ff86f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_6ff86f();
+}
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl
new file mode 100644
index 0000000..0f6db81
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log(vec<2, f16>) -> vec<2, f16>
+fn log_8f0e32() {
+  var res: vec2<f16> = log(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_8f0e32();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_8f0e32();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_8f0e32();
+}
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c73463a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log_8f0e32() {
+  vector<float16_t, 2> res = log((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_8f0e32();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_8f0e32();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_8f0e32();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c8ce6df
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log_8f0e32() {
+  vector<float16_t, 2> res = log((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_8f0e32();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_8f0e32();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_8f0e32();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000262B0B30AC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl
new file mode 100644
index 0000000..923ec6a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_8f0e32() {
+  f16vec2 res = log(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  log_8f0e32();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log_8f0e32() {
+  f16vec2 res = log(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  log_8f0e32();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_8f0e32() {
+  f16vec2 res = log(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  log_8f0e32();
+}
+
+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/log/8f0e32.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl
new file mode 100644
index 0000000..ecced22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_8f0e32() {
+  half2 res = log(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log_8f0e32();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log_8f0e32();
+  return;
+}
+
+kernel void compute_main() {
+  log_8f0e32();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm
new file mode 100644
index 0000000..7ff10aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log_8f0e32 "log_8f0e32"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_8f0e32 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Log %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log_8f0e32
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log_8f0e32
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log_8f0e32
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl
new file mode 100644
index 0000000..e2a7276
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/8f0e32.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log_8f0e32() {
+  var res : vec2<f16> = log(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_8f0e32();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_8f0e32();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_8f0e32();
+}
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl
new file mode 100644
index 0000000..659b08c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log(f16) -> f16
+fn log_c9f489() {
+  var res: f16 = log(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_c9f489();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_c9f489();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_c9f489();
+}
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..eb5150b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log_c9f489() {
+  float16_t res = log(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_c9f489();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_c9f489();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_c9f489();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9510d92
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void log_c9f489() {
+  float16_t res = log(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_c9f489();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_c9f489();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_c9f489();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000200F08314A0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl
new file mode 100644
index 0000000..62eeaa9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_c9f489() {
+  float16_t res = log(0.0hf);
+}
+
+vec4 vertex_main() {
+  log_c9f489();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log_c9f489() {
+  float16_t res = log(0.0hf);
+}
+
+void fragment_main() {
+  log_c9f489();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_c9f489() {
+  float16_t res = log(0.0hf);
+}
+
+void compute_main() {
+  log_c9f489();
+}
+
+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/log/c9f489.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl
new file mode 100644
index 0000000..65bd95a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_c9f489() {
+  half res = log(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log_c9f489();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log_c9f489();
+  return;
+}
+
+kernel void compute_main() {
+  log_c9f489();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm
new file mode 100644
index 0000000..304b6ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %log_c9f489 "log_c9f489"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_c9f489 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Log %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %log_c9f489
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %log_c9f489
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %log_c9f489
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl
new file mode 100644
index 0000000..6279a42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/c9f489.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log_c9f489() {
+  var res : f16 = log(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_c9f489();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_c9f489();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_c9f489();
+}
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl
new file mode 100644
index 0000000..4482675
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log(vec<4, f16>) -> vec<4, f16>
+fn log_cdbdc1() {
+  var res: vec4<f16> = log(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_cdbdc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_cdbdc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_cdbdc1();
+}
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..754e290
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log_cdbdc1() {
+  vector<float16_t, 4> res = log((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_cdbdc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_cdbdc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_cdbdc1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..46491bc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log_cdbdc1() {
+  vector<float16_t, 4> res = log((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log_cdbdc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log_cdbdc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log_cdbdc1();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EBFCF31A60(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl
new file mode 100644
index 0000000..41e6eab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_cdbdc1() {
+  f16vec4 res = log(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  log_cdbdc1();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log_cdbdc1() {
+  f16vec4 res = log(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  log_cdbdc1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log_cdbdc1() {
+  f16vec4 res = log(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  log_cdbdc1();
+}
+
+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/log/cdbdc1.wgsl.expected.msl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl
new file mode 100644
index 0000000..77806e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log_cdbdc1() {
+  half4 res = log(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log_cdbdc1();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log_cdbdc1();
+  return;
+}
+
+kernel void compute_main() {
+  log_cdbdc1();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm
new file mode 100644
index 0000000..6eea354
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log_cdbdc1 "log_cdbdc1"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %log_cdbdc1 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Log %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log_cdbdc1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log_cdbdc1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log_cdbdc1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl
new file mode 100644
index 0000000..645ccf9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log/cdbdc1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log_cdbdc1() {
+  var res : vec4<f16> = log(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log_cdbdc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log_cdbdc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log_cdbdc1();
+}
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl
new file mode 100644
index 0000000..493fbb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log2(vec<3, f16>) -> vec<3, f16>
+fn log2_38b478() {
+  var res: vec3<f16> = log2(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_38b478();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_38b478();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_38b478();
+}
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..029b567
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log2_38b478() {
+  vector<float16_t, 3> res = log2((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_38b478();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_38b478();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_38b478();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..76ffd38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log2_38b478() {
+  vector<float16_t, 3> res = log2((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_38b478();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_38b478();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_38b478();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D9884A1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl
new file mode 100644
index 0000000..e0f07c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_38b478() {
+  f16vec3 res = log2(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  log2_38b478();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log2_38b478() {
+  f16vec3 res = log2(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  log2_38b478();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_38b478() {
+  f16vec3 res = log2(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  log2_38b478();
+}
+
+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/log2/38b478.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl
new file mode 100644
index 0000000..a36b81f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_38b478() {
+  half3 res = log2(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log2_38b478();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log2_38b478();
+  return;
+}
+
+kernel void compute_main() {
+  log2_38b478();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm
new file mode 100644
index 0000000..de97fed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log2_38b478 "log2_38b478"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_38b478 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Log2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log2_38b478
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log2_38b478
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log2_38b478
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl
new file mode 100644
index 0000000..9dee10e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/38b478.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log2_38b478() {
+  var res : vec3<f16> = log2(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_38b478();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_38b478();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_38b478();
+}
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl b/test/tint/builtins/gen/literal/log2/776088.wgsl
new file mode 100644
index 0000000..3843754
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log2(vec<4, f16>) -> vec<4, f16>
+fn log2_776088() {
+  var res: vec4<f16> = log2(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_776088();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_776088();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_776088();
+}
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a3af8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log2_776088() {
+  vector<float16_t, 4> res = log2((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_776088();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_776088();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_776088();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cc463e0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log2_776088() {
+  vector<float16_t, 4> res = log2((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_776088();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_776088();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_776088();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000254F7CB1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl
new file mode 100644
index 0000000..ebf4aa1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_776088() {
+  f16vec4 res = log2(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  log2_776088();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log2_776088() {
+  f16vec4 res = log2(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  log2_776088();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_776088() {
+  f16vec4 res = log2(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  log2_776088();
+}
+
+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/log2/776088.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl
new file mode 100644
index 0000000..eae4b4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_776088() {
+  half4 res = log2(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log2_776088();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log2_776088();
+  return;
+}
+
+kernel void compute_main() {
+  log2_776088();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm
new file mode 100644
index 0000000..47d547b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log2_776088 "log2_776088"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_776088 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Log2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log2_776088
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log2_776088
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log2_776088
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl
new file mode 100644
index 0000000..87971b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/776088.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log2_776088() {
+  var res : vec4<f16> = log2(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_776088();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_776088();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_776088();
+}
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl
new file mode 100644
index 0000000..669e8ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log2(f16) -> f16
+fn log2_8c10b3() {
+  var res: f16 = log2(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_8c10b3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_8c10b3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_8c10b3();
+}
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9edb6af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log2_8c10b3() {
+  float16_t res = log2(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_8c10b3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_8c10b3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_8c10b3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a1f50c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void log2_8c10b3() {
+  float16_t res = log2(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_8c10b3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_8c10b3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_8c10b3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021DFAAFB990(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl
new file mode 100644
index 0000000..7b9deb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_8c10b3() {
+  float16_t res = log2(0.0hf);
+}
+
+vec4 vertex_main() {
+  log2_8c10b3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log2_8c10b3() {
+  float16_t res = log2(0.0hf);
+}
+
+void fragment_main() {
+  log2_8c10b3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_8c10b3() {
+  float16_t res = log2(0.0hf);
+}
+
+void compute_main() {
+  log2_8c10b3();
+}
+
+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/log2/8c10b3.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl
new file mode 100644
index 0000000..0ea021a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_8c10b3() {
+  half res = log2(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log2_8c10b3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log2_8c10b3();
+  return;
+}
+
+kernel void compute_main() {
+  log2_8c10b3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm
new file mode 100644
index 0000000..f269f68
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %log2_8c10b3 "log2_8c10b3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_8c10b3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Log2 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %log2_8c10b3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %log2_8c10b3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %log2_8c10b3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl
new file mode 100644
index 0000000..6de59ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/8c10b3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log2_8c10b3() {
+  var res : f16 = log2(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_8c10b3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_8c10b3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_8c10b3();
+}
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl
new file mode 100644
index 0000000..9f7c93a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn log2(vec<2, f16>) -> vec<2, f16>
+fn log2_fb9f0b() {
+  var res: vec2<f16> = log2(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_fb9f0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_fb9f0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_fb9f0b();
+}
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1614719
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void log2_fb9f0b() {
+  vector<float16_t, 2> res = log2((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_fb9f0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_fb9f0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_fb9f0b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13779ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void log2_fb9f0b() {
+  vector<float16_t, 2> res = log2((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  log2_fb9f0b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  log2_fb9f0b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  log2_fb9f0b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D63F9088D0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl
new file mode 100644
index 0000000..73abe1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_fb9f0b() {
+  f16vec2 res = log2(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  log2_fb9f0b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void log2_fb9f0b() {
+  f16vec2 res = log2(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  log2_fb9f0b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void log2_fb9f0b() {
+  f16vec2 res = log2(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  log2_fb9f0b();
+}
+
+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/log2/fb9f0b.wgsl.expected.msl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl
new file mode 100644
index 0000000..0532f4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void log2_fb9f0b() {
+  half2 res = log2(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  log2_fb9f0b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  log2_fb9f0b();
+  return;
+}
+
+kernel void compute_main() {
+  log2_fb9f0b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm
new file mode 100644
index 0000000..2dfd8bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %log2_fb9f0b "log2_fb9f0b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%log2_fb9f0b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Log2 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %log2_fb9f0b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %log2_fb9f0b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %log2_fb9f0b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl
new file mode 100644
index 0000000..4fdced8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/log2/fb9f0b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn log2_fb9f0b() {
+  var res : vec2<f16> = log2(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  log2_fb9f0b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  log2_fb9f0b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  log2_fb9f0b();
+}
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl
new file mode 100644
index 0000000..1a46cb5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn max(f16, f16) -> f16
+fn max_111ac0() {
+  var res: f16 = max(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_111ac0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_111ac0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_111ac0();
+}
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..972d568
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void max_111ac0() {
+  float16_t res = max(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_111ac0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_111ac0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_111ac0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e031d96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void max_111ac0() {
+  float16_t res = max(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_111ac0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_111ac0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_111ac0();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000215BA37C140(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl
new file mode 100644
index 0000000..b0864de
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_111ac0() {
+  float16_t res = max(0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  max_111ac0();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void max_111ac0() {
+  float16_t res = max(0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  max_111ac0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_111ac0() {
+  float16_t res = max(0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  max_111ac0();
+}
+
+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/max/111ac0.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl
new file mode 100644
index 0000000..ccbcac5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_111ac0() {
+  half res = fmax(0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  max_111ac0();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  max_111ac0();
+  return;
+}
+
+kernel void compute_main() {
+  max_111ac0();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm
new file mode 100644
index 0000000..b3c0805
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %max_111ac0 "max_111ac0"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_111ac0 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 NMax %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %max_111ac0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %max_111ac0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %max_111ac0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl
new file mode 100644
index 0000000..86e79dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/111ac0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn max_111ac0() {
+  var res : f16 = max(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_111ac0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_111ac0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_111ac0();
+}
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl b/test/tint/builtins/gen/literal/max/34956e.wgsl
new file mode 100644
index 0000000..2b22a89
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn max(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn max_34956e() {
+  var res: vec2<f16> = max(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_34956e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_34956e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_34956e();
+}
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5ecb9bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void max_34956e() {
+  vector<float16_t, 2> res = max((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_34956e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_34956e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_34956e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..54be2a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void max_34956e() {
+  vector<float16_t, 2> res = max((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_34956e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_34956e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_34956e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016DDE0B63C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl
new file mode 100644
index 0000000..c9fb73c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_34956e() {
+  f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  max_34956e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void max_34956e() {
+  f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  max_34956e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_34956e() {
+  f16vec2 res = max(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  max_34956e();
+}
+
+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/max/34956e.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl
new file mode 100644
index 0000000..4f65540
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_34956e() {
+  half2 res = fmax(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  max_34956e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  max_34956e();
+  return;
+}
+
+kernel void compute_main() {
+  max_34956e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm
new file mode 100644
index 0000000..e8003c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %max_34956e "max_34956e"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_34956e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 NMax %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %max_34956e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %max_34956e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %max_34956e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl
new file mode 100644
index 0000000..45ee030
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/34956e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn max_34956e() {
+  var res : vec2<f16> = max(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_34956e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_34956e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_34956e();
+}
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl b/test/tint/builtins/gen/literal/max/445169.wgsl
new file mode 100644
index 0000000..8752c1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn max(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn max_445169() {
+  var res: vec3<f16> = max(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_445169();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_445169();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_445169();
+}
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a291c4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void max_445169() {
+  vector<float16_t, 3> res = max((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_445169();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_445169();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_445169();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bed53ac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void max_445169() {
+  vector<float16_t, 3> res = max((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_445169();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_445169();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_445169();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000280F3D6A940(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl
new file mode 100644
index 0000000..dd8ccdf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_445169() {
+  f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  max_445169();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void max_445169() {
+  f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  max_445169();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_445169() {
+  f16vec3 res = max(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  max_445169();
+}
+
+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/max/445169.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl
new file mode 100644
index 0000000..5bd10e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_445169() {
+  half3 res = fmax(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  max_445169();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  max_445169();
+  return;
+}
+
+kernel void compute_main() {
+  max_445169();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e1a6af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %max_445169 "max_445169"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_445169 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 NMax %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %max_445169
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %max_445169
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %max_445169
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl
new file mode 100644
index 0000000..4e1c567
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/445169.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn max_445169() {
+  var res : vec3<f16> = max(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_445169();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_445169();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_445169();
+}
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl
new file mode 100644
index 0000000..fd8638a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn max(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn max_e14f2b() {
+  var res: vec4<f16> = max(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_e14f2b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_e14f2b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_e14f2b();
+}
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f79027
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void max_e14f2b() {
+  vector<float16_t, 4> res = max((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_e14f2b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_e14f2b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_e14f2b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cff4cc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void max_e14f2b() {
+  vector<float16_t, 4> res = max((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  max_e14f2b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  max_e14f2b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  max_e14f2b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002878BF192B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl
new file mode 100644
index 0000000..f4f78bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_e14f2b() {
+  f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  max_e14f2b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void max_e14f2b() {
+  f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  max_e14f2b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void max_e14f2b() {
+  f16vec4 res = max(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  max_e14f2b();
+}
+
+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/max/e14f2b.wgsl.expected.msl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl
new file mode 100644
index 0000000..3620c05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void max_e14f2b() {
+  half4 res = fmax(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  max_e14f2b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  max_e14f2b();
+  return;
+}
+
+kernel void compute_main() {
+  max_e14f2b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm
new file mode 100644
index 0000000..6198104
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %max_e14f2b "max_e14f2b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %max_e14f2b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 NMax %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %max_e14f2b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %max_e14f2b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %max_e14f2b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl
new file mode 100644
index 0000000..e0d214c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/max/e14f2b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn max_e14f2b() {
+  var res : vec4<f16> = max(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  max_e14f2b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  max_e14f2b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  max_e14f2b();
+}
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl
new file mode 100644
index 0000000..f8cf0d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn min(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn min_7c710a() {
+  var res: vec4<f16> = min(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_7c710a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_7c710a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_7c710a();
+}
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b065ca8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void min_7c710a() {
+  vector<float16_t, 4> res = min((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_7c710a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_7c710a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_7c710a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8a7bcbd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void min_7c710a() {
+  vector<float16_t, 4> res = min((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_7c710a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_7c710a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_7c710a();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000236F63CBD50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl
new file mode 100644
index 0000000..f794845
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_7c710a() {
+  f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  min_7c710a();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void min_7c710a() {
+  f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  min_7c710a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_7c710a() {
+  f16vec4 res = min(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  min_7c710a();
+}
+
+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/min/7c710a.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl
new file mode 100644
index 0000000..7805826
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_7c710a() {
+  half4 res = fmin(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  min_7c710a();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  min_7c710a();
+  return;
+}
+
+kernel void compute_main() {
+  min_7c710a();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm
new file mode 100644
index 0000000..60cd2d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %min_7c710a "min_7c710a"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_7c710a = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 NMin %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %min_7c710a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %min_7c710a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %min_7c710a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee18161
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/7c710a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn min_7c710a() {
+  var res : vec4<f16> = min(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_7c710a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_7c710a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_7c710a();
+}
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl
new file mode 100644
index 0000000..568017c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn min(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn min_ab0acd() {
+  var res: vec3<f16> = min(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_ab0acd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_ab0acd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_ab0acd();
+}
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..839e6b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void min_ab0acd() {
+  vector<float16_t, 3> res = min((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_ab0acd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_ab0acd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_ab0acd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9a20bd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void min_ab0acd() {
+  vector<float16_t, 3> res = min((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_ab0acd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_ab0acd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_ab0acd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CE0B337DB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl
new file mode 100644
index 0000000..bc985d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ab0acd() {
+  f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  min_ab0acd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void min_ab0acd() {
+  f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  min_ab0acd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ab0acd() {
+  f16vec3 res = min(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  min_ab0acd();
+}
+
+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/min/ab0acd.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl
new file mode 100644
index 0000000..cbac2a3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_ab0acd() {
+  half3 res = fmin(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  min_ab0acd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  min_ab0acd();
+  return;
+}
+
+kernel void compute_main() {
+  min_ab0acd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm
new file mode 100644
index 0000000..42feca5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %min_ab0acd "min_ab0acd"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_ab0acd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 NMin %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %min_ab0acd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %min_ab0acd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %min_ab0acd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl
new file mode 100644
index 0000000..01c09ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ab0acd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn min_ab0acd() {
+  var res : vec3<f16> = min(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_ab0acd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_ab0acd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_ab0acd();
+}
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl
new file mode 100644
index 0000000..4222ad4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn min(f16, f16) -> f16
+fn min_ac84d6() {
+  var res: f16 = min(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_ac84d6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_ac84d6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_ac84d6();
+}
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d05db9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void min_ac84d6() {
+  float16_t res = min(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_ac84d6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_ac84d6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_ac84d6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4b61aaa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void min_ac84d6() {
+  float16_t res = min(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_ac84d6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_ac84d6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_ac84d6();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024815ABE8C0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl
new file mode 100644
index 0000000..b79ac60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ac84d6() {
+  float16_t res = min(0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  min_ac84d6();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void min_ac84d6() {
+  float16_t res = min(0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  min_ac84d6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_ac84d6() {
+  float16_t res = min(0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  min_ac84d6();
+}
+
+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/min/ac84d6.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl
new file mode 100644
index 0000000..d267417
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_ac84d6() {
+  half res = fmin(0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  min_ac84d6();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  min_ac84d6();
+  return;
+}
+
+kernel void compute_main() {
+  min_ac84d6();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm
new file mode 100644
index 0000000..e76e5c3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %min_ac84d6 "min_ac84d6"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_ac84d6 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 NMin %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %min_ac84d6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %min_ac84d6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %min_ac84d6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl
new file mode 100644
index 0000000..9e33bab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/ac84d6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn min_ac84d6() {
+  var res : f16 = min(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_ac84d6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_ac84d6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_ac84d6();
+}
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl
new file mode 100644
index 0000000..b769097
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn min(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn min_e780f9() {
+  var res: vec2<f16> = min(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_e780f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_e780f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_e780f9();
+}
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f9c75ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void min_e780f9() {
+  vector<float16_t, 2> res = min((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_e780f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_e780f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_e780f9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a176ab3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void min_e780f9() {
+  vector<float16_t, 2> res = min((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  min_e780f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  min_e780f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  min_e780f9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FEDC6E7DE0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl
new file mode 100644
index 0000000..85e7175
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_e780f9() {
+  f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  min_e780f9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void min_e780f9() {
+  f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  min_e780f9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void min_e780f9() {
+  f16vec2 res = min(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  min_e780f9();
+}
+
+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/min/e780f9.wgsl.expected.msl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl
new file mode 100644
index 0000000..675ed30
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void min_e780f9() {
+  half2 res = fmin(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  min_e780f9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  min_e780f9();
+  return;
+}
+
+kernel void compute_main() {
+  min_e780f9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm
new file mode 100644
index 0000000..45dd579
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %min_e780f9 "min_e780f9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %min_e780f9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 NMin %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %min_e780f9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %min_e780f9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %min_e780f9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl
new file mode 100644
index 0000000..6da42f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/min/e780f9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn min_e780f9() {
+  var res : vec2<f16> = min(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  min_e780f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  min_e780f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  min_e780f9();
+}
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl
new file mode 100644
index 0000000..66ba786
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(f16, f16, f16) -> f16
+fn mix_38cbbb() {
+  var res: f16 = mix(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_38cbbb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_38cbbb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_38cbbb();
+}
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f658161
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_38cbbb() {
+  float16_t res = lerp(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_38cbbb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_38cbbb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_38cbbb();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d8b981b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void mix_38cbbb() {
+  float16_t res = lerp(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_38cbbb();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_38cbbb();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_38cbbb();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E08ADE7D50(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl
new file mode 100644
index 0000000..51e98af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_38cbbb() {
+  float16_t res = mix(0.0hf, 0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  mix_38cbbb();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_38cbbb() {
+  float16_t res = mix(0.0hf, 0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  mix_38cbbb();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_38cbbb() {
+  float16_t res = mix(0.0hf, 0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  mix_38cbbb();
+}
+
+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/mix/38cbbb.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl
new file mode 100644
index 0000000..57e66f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_38cbbb() {
+  half res = mix(0.0h, 0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_38cbbb();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_38cbbb();
+  return;
+}
+
+kernel void compute_main() {
+  mix_38cbbb();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm
new file mode 100644
index 0000000..cbd032d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %mix_38cbbb "mix_38cbbb"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_38cbbb = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 FMix %16 %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %mix_38cbbb
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %mix_38cbbb
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %mix_38cbbb
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl
new file mode 100644
index 0000000..383a567
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/38cbbb.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_38cbbb() {
+  var res : f16 = mix(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_38cbbb();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_38cbbb();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_38cbbb();
+}
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl
new file mode 100644
index 0000000..73b7505
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn mix_63f2fd() {
+  var res: vec3<f16> = mix(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_63f2fd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_63f2fd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_63f2fd();
+}
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3729fef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_63f2fd() {
+  vector<float16_t, 3> res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_63f2fd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_63f2fd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_63f2fd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..92c7608
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_63f2fd() {
+  vector<float16_t, 3> res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_63f2fd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_63f2fd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_63f2fd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B9F0AF6FF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl
new file mode 100644
index 0000000..e51235b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_63f2fd() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  mix_63f2fd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_63f2fd() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  mix_63f2fd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_63f2fd() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  mix_63f2fd();
+}
+
+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/mix/63f2fd.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl
new file mode 100644
index 0000000..8a9ca6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_63f2fd() {
+  half3 res = mix(half3(0.0h), half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_63f2fd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_63f2fd();
+  return;
+}
+
+kernel void compute_main() {
+  mix_63f2fd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm
new file mode 100644
index 0000000..85d9a38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_63f2fd "mix_63f2fd"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_63f2fd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 FMix %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %mix_63f2fd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %mix_63f2fd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_63f2fd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl
new file mode 100644
index 0000000..8aa39e8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/63f2fd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_63f2fd() {
+  var res : vec3<f16> = mix(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_63f2fd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_63f2fd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_63f2fd();
+}
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl
new file mode 100644
index 0000000..3c89b03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn mix_98ee3e() {
+  var res: vec2<f16> = mix(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_98ee3e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_98ee3e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_98ee3e();
+}
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2cc67ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_98ee3e() {
+  vector<float16_t, 2> res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_98ee3e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_98ee3e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_98ee3e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..784bfa3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_98ee3e() {
+  vector<float16_t, 2> res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_98ee3e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_98ee3e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_98ee3e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019DF5529870(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl
new file mode 100644
index 0000000..977312c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_98ee3e() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  mix_98ee3e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_98ee3e() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  mix_98ee3e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_98ee3e() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  mix_98ee3e();
+}
+
+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/mix/98ee3e.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl
new file mode 100644
index 0000000..4f98b7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_98ee3e() {
+  half2 res = mix(half2(0.0h), half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_98ee3e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_98ee3e();
+  return;
+}
+
+kernel void compute_main() {
+  mix_98ee3e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm
new file mode 100644
index 0000000..47c734a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_98ee3e "mix_98ee3e"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_98ee3e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 FMix %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %mix_98ee3e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %mix_98ee3e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_98ee3e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb4929d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/98ee3e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_98ee3e() {
+  var res : vec2<f16> = mix(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_98ee3e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_98ee3e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_98ee3e();
+}
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl
new file mode 100644
index 0000000..21231ef
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16>
+fn mix_c1aec6() {
+  var res: vec3<f16> = mix(vec3<f16>(f16()), vec3<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_c1aec6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_c1aec6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_c1aec6();
+}
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3463407
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_c1aec6() {
+  vector<float16_t, 3> res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_c1aec6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_c1aec6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_c1aec6();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..90e3fb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_c1aec6() {
+  vector<float16_t, 3> res = lerp((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_c1aec6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_c1aec6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_c1aec6();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000197E6FB4A90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl
new file mode 100644
index 0000000..8411e25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_c1aec6() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  mix_c1aec6();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_c1aec6() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  mix_c1aec6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_c1aec6() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  mix_c1aec6();
+}
+
+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/mix/c1aec6.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl
new file mode 100644
index 0000000..a8285ba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_c1aec6() {
+  half3 res = mix(half3(0.0h), half3(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_c1aec6();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_c1aec6();
+  return;
+}
+
+kernel void compute_main() {
+  mix_c1aec6();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm
new file mode 100644
index 0000000..7b6a048
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_c1aec6 "mix_c1aec6"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+         %18 = OpConstantNull %half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_c1aec6 = OpFunction %void None %9
+         %12 = OpLabel
+         %19 = OpVariable %_ptr_Function_v3half Function %17
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %21 = OpCompositeConstruct %v3half %18 %18 %18
+         %13 = OpExtInst %v3half %16 FMix %17 %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %mix_c1aec6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_c1aec6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %mix_c1aec6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl
new file mode 100644
index 0000000..6665965
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/c1aec6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_c1aec6() {
+  var res : vec3<f16> = mix(vec3<f16>(f16()), vec3<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_c1aec6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_c1aec6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_c1aec6();
+}
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl
new file mode 100644
index 0000000..6adeecb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16>
+fn mix_e46a83() {
+  var res: vec2<f16> = mix(vec2<f16>(f16()), vec2<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_e46a83();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_e46a83();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_e46a83();
+}
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fa0f9c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_e46a83() {
+  vector<float16_t, 2> res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_e46a83();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_e46a83();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_e46a83();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ce6313
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_e46a83() {
+  vector<float16_t, 2> res = lerp((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_e46a83();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_e46a83();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_e46a83();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F8B7BA68A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl
new file mode 100644
index 0000000..bae9e6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_e46a83() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  mix_e46a83();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_e46a83() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  mix_e46a83();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_e46a83() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  mix_e46a83();
+}
+
+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/mix/e46a83.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl
new file mode 100644
index 0000000..15babbe
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_e46a83() {
+  half2 res = mix(half2(0.0h), half2(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_e46a83();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_e46a83();
+  return;
+}
+
+kernel void compute_main() {
+  mix_e46a83();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm
new file mode 100644
index 0000000..8dfbb2c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_e46a83 "mix_e46a83"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+         %18 = OpConstantNull %half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_e46a83 = OpFunction %void None %9
+         %12 = OpLabel
+         %19 = OpVariable %_ptr_Function_v2half Function %17
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %21 = OpCompositeConstruct %v2half %18 %18
+         %13 = OpExtInst %v2half %16 FMix %17 %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %mix_e46a83
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_e46a83
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %mix_e46a83
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl
new file mode 100644
index 0000000..44b19f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/e46a83.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_e46a83() {
+  var res : vec2<f16> = mix(vec2<f16>(f16()), vec2<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_e46a83();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_e46a83();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_e46a83();
+}
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl
new file mode 100644
index 0000000..7bf17b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn mix_ee2468() {
+  var res: vec4<f16> = mix(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_ee2468();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_ee2468();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_ee2468();
+}
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..daaa4163
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_ee2468() {
+  vector<float16_t, 4> res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_ee2468();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_ee2468();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_ee2468();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..012c441
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_ee2468() {
+  vector<float16_t, 4> res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_ee2468();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_ee2468();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_ee2468();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B8684C57F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl
new file mode 100644
index 0000000..16c94d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_ee2468() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  mix_ee2468();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_ee2468() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  mix_ee2468();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_ee2468() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  mix_ee2468();
+}
+
+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/mix/ee2468.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl
new file mode 100644
index 0000000..2eabc89
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_ee2468() {
+  half4 res = mix(half4(0.0h), half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_ee2468();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_ee2468();
+  return;
+}
+
+kernel void compute_main() {
+  mix_ee2468();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm
new file mode 100644
index 0000000..8ff66bb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_ee2468 "mix_ee2468"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_ee2468 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 FMix %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %mix_ee2468
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %mix_ee2468
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_ee2468
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl
new file mode 100644
index 0000000..15e8531
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/ee2468.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_ee2468() {
+  var res : vec4<f16> = mix(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_ee2468();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_ee2468();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_ee2468();
+}
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl
new file mode 100644
index 0000000..5ff2c85
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn mix(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16>
+fn mix_f1a543() {
+  var res: vec4<f16> = mix(vec4<f16>(f16()), vec4<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_f1a543();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_f1a543();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_f1a543();
+}
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0701d56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void mix_f1a543() {
+  vector<float16_t, 4> res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_f1a543();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_f1a543();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_f1a543();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..26ebdc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void mix_f1a543() {
+  vector<float16_t, 4> res = lerp((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  mix_f1a543();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  mix_f1a543();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  mix_f1a543();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000020D39006FD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl
new file mode 100644
index 0000000..730990d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_f1a543() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  mix_f1a543();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void mix_f1a543() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  mix_f1a543();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void mix_f1a543() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  mix_f1a543();
+}
+
+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/mix/f1a543.wgsl.expected.msl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl
new file mode 100644
index 0000000..823de59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void mix_f1a543() {
+  half4 res = mix(half4(0.0h), half4(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  mix_f1a543();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  mix_f1a543();
+  return;
+}
+
+kernel void compute_main() {
+  mix_f1a543();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm
new file mode 100644
index 0000000..7f1efc5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %mix_f1a543 "mix_f1a543"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+         %18 = OpConstantNull %half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %mix_f1a543 = OpFunction %void None %9
+         %12 = OpLabel
+         %19 = OpVariable %_ptr_Function_v4half Function %17
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %21 = OpCompositeConstruct %v4half %18 %18 %18 %18
+         %13 = OpExtInst %v4half %16 FMix %17 %17 %21
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %mix_f1a543
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %mix_f1a543
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %mix_f1a543
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl
new file mode 100644
index 0000000..c42b7da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/mix/f1a543.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn mix_f1a543() {
+  var res : vec4<f16> = mix(vec4<f16>(f16()), vec4<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  mix_f1a543();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  mix_f1a543();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  mix_f1a543();
+}
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl
new file mode 100644
index 0000000..236e165
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn modf(vec<3, f16>) -> __modf_result_vec<3, f16>
+fn modf_45005f() {
+  var res = modf(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_45005f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_45005f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_45005f();
+}
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..30ed6b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,40 @@
+struct modf_result_vec3_f16 {
+  vector<float16_t, 3> fract;
+  vector<float16_t, 3> whole;
+};
+modf_result_vec3_f16 tint_modf(vector<float16_t, 3> param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_45005f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_45005f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_45005f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9f164da
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,45 @@
+SKIP: FAILED
+
+struct modf_result_vec3_f16 {
+  vector<float16_t, 3> fract;
+  vector<float16_t, 3> whole;
+};
+modf_result_vec3_f16 tint_modf(vector<float16_t, 3> param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_45005f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_45005f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_45005f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B818324B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl
new file mode 100644
index 0000000..c2ef9d1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec3_f16 {
+  f16vec3 fract;
+  f16vec3 whole;
+};
+
+modf_result_vec3_f16 tint_modf(f16vec3 param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  modf_45005f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct modf_result_vec3_f16 {
+  f16vec3 fract;
+  f16vec3 whole;
+};
+
+modf_result_vec3_f16 tint_modf(f16vec3 param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  modf_45005f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec3_f16 {
+  f16vec3 fract;
+  f16vec3 whole;
+};
+
+modf_result_vec3_f16 tint_modf(f16vec3 param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  modf_45005f();
+}
+
+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/modf/45005f.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl
new file mode 100644
index 0000000..b07ab06
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct modf_result_vec3_f16 {
+  half3 fract;
+  half3 whole;
+};
+modf_result_vec3_f16 tint_modf(half3 param_0) {
+  modf_result_vec3_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_45005f() {
+  modf_result_vec3_f16 res = tint_modf(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  modf_45005f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  modf_45005f();
+  return;
+}
+
+kernel void compute_main() {
+  modf_45005f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm
new file mode 100644
index 0000000..1e06f7a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %17 = OpExtInstImport "GLSL.std.450"
+               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 %modf_45005f "modf_45005f"
+               OpName %__modf_result_vec3_f16 "__modf_result_vec3_f16"
+               OpMemberName %__modf_result_vec3_f16 0 "fract"
+               OpMemberName %__modf_result_vec3_f16 1 "whole"
+               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
+               OpMemberDecorate %__modf_result_vec3_f16 0 Offset 0
+               OpMemberDecorate %__modf_result_vec3_f16 1 Offset 8
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+%__modf_result_vec3_f16 = OpTypeStruct %v3half %v3half
+         %18 = OpConstantNull %v3half
+%_ptr_Function___modf_result_vec3_f16 = OpTypePointer Function %__modf_result_vec3_f16
+         %21 = OpConstantNull %__modf_result_vec3_f16
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_45005f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___modf_result_vec3_f16 Function %21
+         %13 = OpExtInst %__modf_result_vec3_f16 %17 ModfStruct %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %modf_45005f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %modf_45005f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_45005f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl
new file mode 100644
index 0000000..57f4b3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/45005f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn modf_45005f() {
+  var res = modf(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_45005f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_45005f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_45005f();
+}
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl
new file mode 100644
index 0000000..71e2638
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn modf(f16) -> __modf_result<f16>
+fn modf_8dbbbf() {
+  var res = modf(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_8dbbbf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_8dbbbf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_8dbbbf();
+}
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..802fe2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,40 @@
+struct modf_result_f16 {
+  float16_t fract;
+  float16_t whole;
+};
+modf_result_f16 tint_modf(float16_t param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_8dbbbf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_8dbbbf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_8dbbbf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ce161cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,45 @@
+SKIP: FAILED
+
+struct modf_result_f16 {
+  float16_t fract;
+  float16_t whole;
+};
+modf_result_f16 tint_modf(float16_t param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_8dbbbf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_8dbbbf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_8dbbbf();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024604C24BA0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl
new file mode 100644
index 0000000..f949198
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_f16 {
+  float16_t fract;
+  float16_t whole;
+};
+
+modf_result_f16 tint_modf(float16_t param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(0.0hf);
+}
+
+vec4 vertex_main() {
+  modf_8dbbbf();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct modf_result_f16 {
+  float16_t fract;
+  float16_t whole;
+};
+
+modf_result_f16 tint_modf(float16_t param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(0.0hf);
+}
+
+void fragment_main() {
+  modf_8dbbbf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_f16 {
+  float16_t fract;
+  float16_t whole;
+};
+
+modf_result_f16 tint_modf(float16_t param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(0.0hf);
+}
+
+void compute_main() {
+  modf_8dbbbf();
+}
+
+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/modf/8dbbbf.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl
new file mode 100644
index 0000000..f0a8d58
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct modf_result_f16 {
+  half fract;
+  half whole;
+};
+modf_result_f16 tint_modf(half param_0) {
+  modf_result_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_8dbbbf() {
+  modf_result_f16 res = tint_modf(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  modf_8dbbbf();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  modf_8dbbbf();
+  return;
+}
+
+kernel void compute_main() {
+  modf_8dbbbf();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm
new file mode 100644
index 0000000..53162e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %modf_8dbbbf "modf_8dbbbf"
+               OpName %__modf_result_f16 "__modf_result_f16"
+               OpMemberName %__modf_result_f16 0 "fract"
+               OpMemberName %__modf_result_f16 1 "whole"
+               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
+               OpMemberDecorate %__modf_result_f16 0 Offset 0
+               OpMemberDecorate %__modf_result_f16 1 Offset 2
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+%__modf_result_f16 = OpTypeStruct %half %half
+         %17 = OpConstantNull %half
+%_ptr_Function___modf_result_f16 = OpTypePointer Function %__modf_result_f16
+         %20 = OpConstantNull %__modf_result_f16
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_8dbbbf = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___modf_result_f16 Function %20
+         %13 = OpExtInst %__modf_result_f16 %16 ModfStruct %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %modf_8dbbbf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %modf_8dbbbf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %modf_8dbbbf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl
new file mode 100644
index 0000000..2ab39a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/8dbbbf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn modf_8dbbbf() {
+  var res = modf(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_8dbbbf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_8dbbbf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_8dbbbf();
+}
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl b/test/tint/builtins/gen/literal/modf/995934.wgsl
new file mode 100644
index 0000000..ef2c6ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn modf(vec<4, f16>) -> __modf_result_vec<4, f16>
+fn modf_995934() {
+  var res = modf(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_995934();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_995934();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_995934();
+}
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d1b1051
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.dxc.hlsl
@@ -0,0 +1,40 @@
+struct modf_result_vec4_f16 {
+  vector<float16_t, 4> fract;
+  vector<float16_t, 4> whole;
+};
+modf_result_vec4_f16 tint_modf(vector<float16_t, 4> param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_995934();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_995934();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_995934();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a708c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.fxc.hlsl
@@ -0,0 +1,45 @@
+SKIP: FAILED
+
+struct modf_result_vec4_f16 {
+  vector<float16_t, 4> fract;
+  vector<float16_t, 4> whole;
+};
+modf_result_vec4_f16 tint_modf(vector<float16_t, 4> param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_995934();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_995934();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_995934();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016E71A92D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl
new file mode 100644
index 0000000..f3e71cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec4_f16 {
+  f16vec4 fract;
+  f16vec4 whole;
+};
+
+modf_result_vec4_f16 tint_modf(f16vec4 param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  modf_995934();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct modf_result_vec4_f16 {
+  f16vec4 fract;
+  f16vec4 whole;
+};
+
+modf_result_vec4_f16 tint_modf(f16vec4 param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  modf_995934();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec4_f16 {
+  f16vec4 fract;
+  f16vec4 whole;
+};
+
+modf_result_vec4_f16 tint_modf(f16vec4 param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  modf_995934();
+}
+
+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/modf/995934.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl
new file mode 100644
index 0000000..93df00a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct modf_result_vec4_f16 {
+  half4 fract;
+  half4 whole;
+};
+modf_result_vec4_f16 tint_modf(half4 param_0) {
+  modf_result_vec4_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_995934() {
+  modf_result_vec4_f16 res = tint_modf(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  modf_995934();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  modf_995934();
+  return;
+}
+
+kernel void compute_main() {
+  modf_995934();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm
new file mode 100644
index 0000000..6fa7c2f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %17 = OpExtInstImport "GLSL.std.450"
+               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 %modf_995934 "modf_995934"
+               OpName %__modf_result_vec4_f16 "__modf_result_vec4_f16"
+               OpMemberName %__modf_result_vec4_f16 0 "fract"
+               OpMemberName %__modf_result_vec4_f16 1 "whole"
+               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
+               OpMemberDecorate %__modf_result_vec4_f16 0 Offset 0
+               OpMemberDecorate %__modf_result_vec4_f16 1 Offset 8
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+%__modf_result_vec4_f16 = OpTypeStruct %v4half %v4half
+         %18 = OpConstantNull %v4half
+%_ptr_Function___modf_result_vec4_f16 = OpTypePointer Function %__modf_result_vec4_f16
+         %21 = OpConstantNull %__modf_result_vec4_f16
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_995934 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___modf_result_vec4_f16 Function %21
+         %13 = OpExtInst %__modf_result_vec4_f16 %17 ModfStruct %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %modf_995934
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %modf_995934
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_995934
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl
new file mode 100644
index 0000000..1568993
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/995934.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn modf_995934() {
+  var res = modf(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_995934();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_995934();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_995934();
+}
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl
new file mode 100644
index 0000000..5b3d8b5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn modf(vec<2, f16>) -> __modf_result_vec<2, f16>
+fn modf_a545b9() {
+  var res = modf(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_a545b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_a545b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_a545b9();
+}
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d146291
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,40 @@
+struct modf_result_vec2_f16 {
+  vector<float16_t, 2> fract;
+  vector<float16_t, 2> whole;
+};
+modf_result_vec2_f16 tint_modf(vector<float16_t, 2> param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_a545b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_a545b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_a545b9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63d6da7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,45 @@
+SKIP: FAILED
+
+struct modf_result_vec2_f16 {
+  vector<float16_t, 2> fract;
+  vector<float16_t, 2> whole;
+};
+modf_result_vec2_f16 tint_modf(vector<float16_t, 2> param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  modf_a545b9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  modf_a545b9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  modf_a545b9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002393F2A4B80(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl
new file mode 100644
index 0000000..9a4b37a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.glsl
@@ -0,0 +1,88 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec2_f16 {
+  f16vec2 fract;
+  f16vec2 whole;
+};
+
+modf_result_vec2_f16 tint_modf(f16vec2 param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  modf_a545b9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+struct modf_result_vec2_f16 {
+  f16vec2 fract;
+  f16vec2 whole;
+};
+
+modf_result_vec2_f16 tint_modf(f16vec2 param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  modf_a545b9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+struct modf_result_vec2_f16 {
+  f16vec2 fract;
+  f16vec2 whole;
+};
+
+modf_result_vec2_f16 tint_modf(f16vec2 param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  modf_a545b9();
+}
+
+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/modf/a545b9.wgsl.expected.msl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl
new file mode 100644
index 0000000..a9f218a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.msl
@@ -0,0 +1,44 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+struct modf_result_vec2_f16 {
+  half2 fract;
+  half2 whole;
+};
+modf_result_vec2_f16 tint_modf(half2 param_0) {
+  modf_result_vec2_f16 result;
+  result.fract = modf(param_0, result.whole);
+  return result;
+}
+
+void modf_a545b9() {
+  modf_result_vec2_f16 res = tint_modf(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  modf_a545b9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  modf_a545b9();
+  return;
+}
+
+kernel void compute_main() {
+  modf_a545b9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm
new file mode 100644
index 0000000..a47a138
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %17 = OpExtInstImport "GLSL.std.450"
+               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 %modf_a545b9 "modf_a545b9"
+               OpName %__modf_result_vec2_f16 "__modf_result_vec2_f16"
+               OpMemberName %__modf_result_vec2_f16 0 "fract"
+               OpMemberName %__modf_result_vec2_f16 1 "whole"
+               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
+               OpMemberDecorate %__modf_result_vec2_f16 0 Offset 0
+               OpMemberDecorate %__modf_result_vec2_f16 1 Offset 4
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+%__modf_result_vec2_f16 = OpTypeStruct %v2half %v2half
+         %18 = OpConstantNull %v2half
+%_ptr_Function___modf_result_vec2_f16 = OpTypePointer Function %__modf_result_vec2_f16
+         %21 = OpConstantNull %__modf_result_vec2_f16
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%modf_a545b9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function___modf_result_vec2_f16 Function %21
+         %13 = OpExtInst %__modf_result_vec2_f16 %17 ModfStruct %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %modf_a545b9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %modf_a545b9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %modf_a545b9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl
new file mode 100644
index 0000000..177b0e9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/modf/a545b9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn modf_a545b9() {
+  var res = modf(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  modf_a545b9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  modf_a545b9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  modf_a545b9();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl
new file mode 100644
index 0000000..3c612c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn normalize(vec<3, f16>) -> vec<3, f16>
+fn normalize_39d5ec() {
+  var res: vec3<f16> = normalize(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_39d5ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_39d5ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_39d5ec();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4ad650f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void normalize_39d5ec() {
+  vector<float16_t, 3> res = normalize((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_39d5ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_39d5ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_39d5ec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2533db5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void normalize_39d5ec() {
+  vector<float16_t, 3> res = normalize((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_39d5ec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_39d5ec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_39d5ec();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002467316DBB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl
new file mode 100644
index 0000000..e129ddc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_39d5ec() {
+  f16vec3 res = normalize(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  normalize_39d5ec();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void normalize_39d5ec() {
+  f16vec3 res = normalize(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  normalize_39d5ec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_39d5ec() {
+  f16vec3 res = normalize(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  normalize_39d5ec();
+}
+
+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/normalize/39d5ec.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl
new file mode 100644
index 0000000..683a2ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_39d5ec() {
+  half3 res = normalize(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  normalize_39d5ec();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  normalize_39d5ec();
+  return;
+}
+
+kernel void compute_main() {
+  normalize_39d5ec();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm
new file mode 100644
index 0000000..7f52307
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %normalize_39d5ec "normalize_39d5ec"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_39d5ec = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Normalize %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %normalize_39d5ec
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %normalize_39d5ec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %normalize_39d5ec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl
new file mode 100644
index 0000000..f8f2e8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/39d5ec.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn normalize_39d5ec() {
+  var res : vec3<f16> = normalize(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_39d5ec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_39d5ec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_39d5ec();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl
new file mode 100644
index 0000000..8b3c478
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn normalize(vec<2, f16>) -> vec<2, f16>
+fn normalize_7990f3() {
+  var res: vec2<f16> = normalize(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_7990f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_7990f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_7990f3();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b0e04e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void normalize_7990f3() {
+  vector<float16_t, 2> res = normalize((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_7990f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_7990f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_7990f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..52cbb8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void normalize_7990f3() {
+  vector<float16_t, 2> res = normalize((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_7990f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_7990f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_7990f3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E10FCEEA50(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl
new file mode 100644
index 0000000..f59eb6d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_7990f3() {
+  f16vec2 res = normalize(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  normalize_7990f3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void normalize_7990f3() {
+  f16vec2 res = normalize(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  normalize_7990f3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_7990f3() {
+  f16vec2 res = normalize(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  normalize_7990f3();
+}
+
+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/normalize/7990f3.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl
new file mode 100644
index 0000000..bea065f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_7990f3() {
+  half2 res = normalize(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  normalize_7990f3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  normalize_7990f3();
+  return;
+}
+
+kernel void compute_main() {
+  normalize_7990f3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..d00d9f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %normalize_7990f3 "normalize_7990f3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_7990f3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Normalize %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %normalize_7990f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %normalize_7990f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %normalize_7990f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..ce0b29f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/7990f3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn normalize_7990f3() {
+  var res : vec2<f16> = normalize(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_7990f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_7990f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_7990f3();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl
new file mode 100644
index 0000000..81f49c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn normalize(vec<4, f16>) -> vec<4, f16>
+fn normalize_b8cb8d() {
+  var res: vec4<f16> = normalize(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_b8cb8d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_b8cb8d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_b8cb8d();
+}
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..24ac211
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void normalize_b8cb8d() {
+  vector<float16_t, 4> res = normalize((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_b8cb8d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_b8cb8d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_b8cb8d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3eafadc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void normalize_b8cb8d() {
+  vector<float16_t, 4> res = normalize((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  normalize_b8cb8d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  normalize_b8cb8d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  normalize_b8cb8d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027C766AD380(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl
new file mode 100644
index 0000000..897b4f9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_b8cb8d() {
+  f16vec4 res = normalize(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  normalize_b8cb8d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void normalize_b8cb8d() {
+  f16vec4 res = normalize(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  normalize_b8cb8d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void normalize_b8cb8d() {
+  f16vec4 res = normalize(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  normalize_b8cb8d();
+}
+
+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/normalize/b8cb8d.wgsl.expected.msl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl
new file mode 100644
index 0000000..4481b97
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void normalize_b8cb8d() {
+  half4 res = normalize(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  normalize_b8cb8d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  normalize_b8cb8d();
+  return;
+}
+
+kernel void compute_main() {
+  normalize_b8cb8d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm
new file mode 100644
index 0000000..ce722dba
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %normalize_b8cb8d "normalize_b8cb8d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%normalize_b8cb8d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Normalize %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %normalize_b8cb8d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %normalize_b8cb8d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %normalize_b8cb8d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl
new file mode 100644
index 0000000..0721427
--- /dev/null
+++ b/test/tint/builtins/gen/literal/normalize/b8cb8d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn normalize_b8cb8d() {
+  var res : vec4<f16> = normalize(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  normalize_b8cb8d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  normalize_b8cb8d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  normalize_b8cb8d();
+}
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl
new file mode 100644
index 0000000..58ab00c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn pow(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn pow_4f33b2() {
+  var res: vec4<f16> = pow(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_4f33b2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_4f33b2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_4f33b2();
+}
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2804058
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void pow_4f33b2() {
+  vector<float16_t, 4> res = pow((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_4f33b2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_4f33b2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_4f33b2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bca42d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void pow_4f33b2() {
+  vector<float16_t, 4> res = pow((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_4f33b2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_4f33b2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_4f33b2();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000027797C56270(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl
new file mode 100644
index 0000000..cec05e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_4f33b2() {
+  f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  pow_4f33b2();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void pow_4f33b2() {
+  f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  pow_4f33b2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_4f33b2() {
+  f16vec4 res = pow(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  pow_4f33b2();
+}
+
+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/pow/4f33b2.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl
new file mode 100644
index 0000000..abc7e9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_4f33b2() {
+  half4 res = pow(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  pow_4f33b2();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  pow_4f33b2();
+  return;
+}
+
+kernel void compute_main() {
+  pow_4f33b2();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm
new file mode 100644
index 0000000..669759d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %pow_4f33b2 "pow_4f33b2"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_4f33b2 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Pow %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %pow_4f33b2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %pow_4f33b2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %pow_4f33b2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl
new file mode 100644
index 0000000..bb9db59
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/4f33b2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn pow_4f33b2() {
+  var res : vec4<f16> = pow(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_4f33b2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_4f33b2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_4f33b2();
+}
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl
new file mode 100644
index 0000000..c9a6522
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn pow(f16, f16) -> f16
+fn pow_ce9ef5() {
+  var res: f16 = pow(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_ce9ef5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_ce9ef5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_ce9ef5();
+}
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1f9e712
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void pow_ce9ef5() {
+  float16_t res = pow(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_ce9ef5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_ce9ef5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_ce9ef5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a10ed77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void pow_ce9ef5() {
+  float16_t res = pow(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_ce9ef5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_ce9ef5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_ce9ef5();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022B8A05C140(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl
new file mode 100644
index 0000000..23f08db
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_ce9ef5() {
+  float16_t res = pow(0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  pow_ce9ef5();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void pow_ce9ef5() {
+  float16_t res = pow(0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  pow_ce9ef5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_ce9ef5() {
+  float16_t res = pow(0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  pow_ce9ef5();
+}
+
+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/pow/ce9ef5.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl
new file mode 100644
index 0000000..9346414
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_ce9ef5() {
+  half res = pow(0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  pow_ce9ef5();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  pow_ce9ef5();
+  return;
+}
+
+kernel void compute_main() {
+  pow_ce9ef5();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm
new file mode 100644
index 0000000..219cfcf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %pow_ce9ef5 "pow_ce9ef5"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_ce9ef5 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Pow %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %pow_ce9ef5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %pow_ce9ef5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %pow_ce9ef5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl
new file mode 100644
index 0000000..dc2c9c4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/ce9ef5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn pow_ce9ef5() {
+  var res : f16 = pow(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_ce9ef5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_ce9ef5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_ce9ef5();
+}
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl
new file mode 100644
index 0000000..b63e93e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn pow(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn pow_f37b25() {
+  var res: vec2<f16> = pow(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_f37b25();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_f37b25();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_f37b25();
+}
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8efda2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void pow_f37b25() {
+  vector<float16_t, 2> res = pow((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_f37b25();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_f37b25();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_f37b25();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fa7eaa6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void pow_f37b25() {
+  vector<float16_t, 2> res = pow((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_f37b25();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_f37b25();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_f37b25();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EE95DF6780(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl
new file mode 100644
index 0000000..ac933cb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_f37b25() {
+  f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  pow_f37b25();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void pow_f37b25() {
+  f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  pow_f37b25();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_f37b25() {
+  f16vec2 res = pow(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  pow_f37b25();
+}
+
+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/pow/f37b25.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl
new file mode 100644
index 0000000..3962dd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_f37b25() {
+  half2 res = pow(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  pow_f37b25();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  pow_f37b25();
+  return;
+}
+
+kernel void compute_main() {
+  pow_f37b25();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm
new file mode 100644
index 0000000..53e3689
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %pow_f37b25 "pow_f37b25"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_f37b25 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Pow %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %pow_f37b25
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %pow_f37b25
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %pow_f37b25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl
new file mode 100644
index 0000000..96ff2a2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/f37b25.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn pow_f37b25() {
+  var res : vec2<f16> = pow(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_f37b25();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_f37b25();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_f37b25();
+}
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl
new file mode 100644
index 0000000..51ecff3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn pow(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn pow_fa5429() {
+  var res: vec3<f16> = pow(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_fa5429();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_fa5429();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_fa5429();
+}
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fc999c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void pow_fa5429() {
+  vector<float16_t, 3> res = pow((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_fa5429();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_fa5429();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_fa5429();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cae49c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void pow_fa5429() {
+  vector<float16_t, 3> res = pow((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  pow_fa5429();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  pow_fa5429();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  pow_fa5429();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028F07286290(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl
new file mode 100644
index 0000000..113b3ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_fa5429() {
+  f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  pow_fa5429();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void pow_fa5429() {
+  f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  pow_fa5429();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void pow_fa5429() {
+  f16vec3 res = pow(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  pow_fa5429();
+}
+
+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/pow/fa5429.wgsl.expected.msl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl
new file mode 100644
index 0000000..249c3f3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void pow_fa5429() {
+  half3 res = pow(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  pow_fa5429();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  pow_fa5429();
+  return;
+}
+
+kernel void compute_main() {
+  pow_fa5429();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm
new file mode 100644
index 0000000..bc20475
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %pow_fa5429 "pow_fa5429"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %pow_fa5429 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Pow %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %pow_fa5429
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %pow_fa5429
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %pow_fa5429
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl
new file mode 100644
index 0000000..46002ea
--- /dev/null
+++ b/test/tint/builtins/gen/literal/pow/fa5429.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn pow_fa5429() {
+  var res : vec3<f16> = pow(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  pow_fa5429();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  pow_fa5429();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  pow_fa5429();
+}
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl
new file mode 100644
index 0000000..c60793b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn radians(f16) -> f16
+fn radians_208fd9() {
+  var res: f16 = radians(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_208fd9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_208fd9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_208fd9();
+}
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b7b76cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  float16_t res = tint_radians(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_208fd9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_208fd9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_208fd9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d1aeace
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  float16_t res = tint_radians(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_208fd9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_208fd9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_208fd9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B5647B0440(1,1-9): error X3000: unrecognized identifier 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl
new file mode 100644
index 0000000..cf4c962
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_208fd9() {
+  float16_t res = tint_radians(0.0hf);
+}
+
+vec4 vertex_main() {
+  radians_208fd9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_208fd9() {
+  float16_t res = tint_radians(0.0hf);
+}
+
+void fragment_main() {
+  radians_208fd9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+float16_t tint_radians(float16_t param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_208fd9() {
+  float16_t res = tint_radians(0.0hf);
+}
+
+void compute_main() {
+  radians_208fd9();
+}
+
+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/radians/208fd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl
new file mode 100644
index 0000000..d12b406
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half tint_radians(half param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_208fd9() {
+  half res = tint_radians(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  radians_208fd9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  radians_208fd9();
+  return;
+}
+
+kernel void compute_main() {
+  radians_208fd9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm
new file mode 100644
index 0000000..8fc9e39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %radians_208fd9 "radians_208fd9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_208fd9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Radians %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %radians_208fd9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %radians_208fd9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %radians_208fd9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl
new file mode 100644
index 0000000..1febb6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/208fd9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn radians_208fd9() {
+  var res : f16 = radians(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_208fd9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_208fd9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_208fd9();
+}
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl
new file mode 100644
index 0000000..a7887fb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn radians(vec<4, f16>) -> vec<4, f16>
+fn radians_44f20b() {
+  var res: vec4<f16> = radians(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_44f20b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_44f20b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_44f20b();
+}
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6c3cce9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 4> tint_radians(vector<float16_t, 4> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_44f20b() {
+  vector<float16_t, 4> res = tint_radians((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_44f20b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_44f20b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_44f20b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ac64196
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 4> tint_radians(vector<float16_t, 4> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_44f20b() {
+  vector<float16_t, 4> res = tint_radians((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_44f20b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_44f20b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_44f20b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024C9C3BC350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl
new file mode 100644
index 0000000..2b3d4c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_radians(f16vec4 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_44f20b() {
+  f16vec4 res = tint_radians(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  radians_44f20b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec4 tint_radians(f16vec4 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_44f20b() {
+  f16vec4 res = tint_radians(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  radians_44f20b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec4 tint_radians(f16vec4 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_44f20b() {
+  f16vec4 res = tint_radians(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  radians_44f20b();
+}
+
+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/radians/44f20b.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl
new file mode 100644
index 0000000..1e20066
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half4 tint_radians(half4 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_44f20b() {
+  half4 res = tint_radians(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  radians_44f20b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  radians_44f20b();
+  return;
+}
+
+kernel void compute_main() {
+  radians_44f20b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm
new file mode 100644
index 0000000..6321aaa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %radians_44f20b "radians_44f20b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_44f20b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Radians %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %radians_44f20b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %radians_44f20b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %radians_44f20b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl
new file mode 100644
index 0000000..35170cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/44f20b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn radians_44f20b() {
+  var res : vec4<f16> = radians(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_44f20b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_44f20b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_44f20b();
+}
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl
new file mode 100644
index 0000000..4e2a23c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn radians(vec<3, f16>) -> vec<3, f16>
+fn radians_7ea4c7() {
+  var res: vec3<f16> = radians(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_7ea4c7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_7ea4c7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_7ea4c7();
+}
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a9f6f96
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 3> tint_radians(vector<float16_t, 3> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_7ea4c7() {
+  vector<float16_t, 3> res = tint_radians((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_7ea4c7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_7ea4c7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_7ea4c7();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6a13fc2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 3> tint_radians(vector<float16_t, 3> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_7ea4c7() {
+  vector<float16_t, 3> res = tint_radians((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_7ea4c7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_7ea4c7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_7ea4c7();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C0F82EE760(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl
new file mode 100644
index 0000000..a8cc9ab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_radians(f16vec3 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_7ea4c7() {
+  f16vec3 res = tint_radians(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  radians_7ea4c7();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec3 tint_radians(f16vec3 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_7ea4c7() {
+  f16vec3 res = tint_radians(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  radians_7ea4c7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec3 tint_radians(f16vec3 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_7ea4c7() {
+  f16vec3 res = tint_radians(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  radians_7ea4c7();
+}
+
+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/radians/7ea4c7.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl
new file mode 100644
index 0000000..34ca856
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half3 tint_radians(half3 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_7ea4c7() {
+  half3 res = tint_radians(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  radians_7ea4c7();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  radians_7ea4c7();
+  return;
+}
+
+kernel void compute_main() {
+  radians_7ea4c7();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm
new file mode 100644
index 0000000..9ef7401
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %radians_7ea4c7 "radians_7ea4c7"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_7ea4c7 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Radians %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %radians_7ea4c7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %radians_7ea4c7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %radians_7ea4c7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl
new file mode 100644
index 0000000..56b01aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/7ea4c7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn radians_7ea4c7() {
+  var res : vec3<f16> = radians(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_7ea4c7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_7ea4c7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_7ea4c7();
+}
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl
new file mode 100644
index 0000000..f3d4acb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn radians(vec<2, f16>) -> vec<2, f16>
+fn radians_fbacf0() {
+  var res: vec2<f16> = radians(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_fbacf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_fbacf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_fbacf0();
+}
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8d3e076
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+vector<float16_t, 2> tint_radians(vector<float16_t, 2> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_fbacf0() {
+  vector<float16_t, 2> res = tint_radians((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_fbacf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_fbacf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_fbacf0();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..880018a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,39 @@
+SKIP: FAILED
+
+vector<float16_t, 2> tint_radians(vector<float16_t, 2> param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_fbacf0() {
+  vector<float16_t, 2> res = tint_radians((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  radians_fbacf0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  radians_fbacf0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  radians_fbacf0();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028D5138C350(1,8-16): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl
new file mode 100644
index 0000000..ce24c39
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.glsl
@@ -0,0 +1,67 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_radians(f16vec2 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_fbacf0() {
+  f16vec2 res = tint_radians(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  radians_fbacf0();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+f16vec2 tint_radians(f16vec2 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_fbacf0() {
+  f16vec2 res = tint_radians(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  radians_fbacf0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+f16vec2 tint_radians(f16vec2 param_0) {
+  return param_0 * 0.017453292519943295474hf;
+}
+
+
+void radians_fbacf0() {
+  f16vec2 res = tint_radians(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  radians_fbacf0();
+}
+
+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/radians/fbacf0.wgsl.expected.msl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl
new file mode 100644
index 0000000..9359855
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.msl
@@ -0,0 +1,38 @@
+#include <metal_stdlib>
+
+using namespace metal;
+
+half2 tint_radians(half2 param_0) {
+  return param_0 * 0.017453292519943295474;
+}
+
+void radians_fbacf0() {
+  half2 res = tint_radians(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  radians_fbacf0();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  radians_fbacf0();
+  return;
+}
+
+kernel void compute_main() {
+  radians_fbacf0();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm
new file mode 100644
index 0000000..f798f51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %radians_fbacf0 "radians_fbacf0"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%radians_fbacf0 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Radians %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %radians_fbacf0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %radians_fbacf0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %radians_fbacf0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl
new file mode 100644
index 0000000..0aba9cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/radians/fbacf0.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn radians_fbacf0() {
+  var res : vec2<f16> = radians(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  radians_fbacf0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  radians_fbacf0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  radians_fbacf0();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl
new file mode 100644
index 0000000..9d8a01b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn reflect(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn reflect_310de5() {
+  var res: vec4<f16> = reflect(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_310de5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_310de5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_310de5();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4a7f8f4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void reflect_310de5() {
+  vector<float16_t, 4> res = reflect((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_310de5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_310de5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_310de5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e4fb2cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void reflect_310de5() {
+  vector<float16_t, 4> res = reflect((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_310de5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_310de5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_310de5();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFC20B7D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl
new file mode 100644
index 0000000..92a222f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_310de5() {
+  f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  reflect_310de5();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void reflect_310de5() {
+  f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  reflect_310de5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_310de5() {
+  f16vec4 res = reflect(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  reflect_310de5();
+}
+
+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/reflect/310de5.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl
new file mode 100644
index 0000000..774dfb7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_310de5() {
+  half4 res = reflect(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  reflect_310de5();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  reflect_310de5();
+  return;
+}
+
+kernel void compute_main() {
+  reflect_310de5();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm
new file mode 100644
index 0000000..e77a355
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %reflect_310de5 "reflect_310de5"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_310de5 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Reflect %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %reflect_310de5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %reflect_310de5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %reflect_310de5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl
new file mode 100644
index 0000000..61a2100
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/310de5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn reflect_310de5() {
+  var res : vec4<f16> = reflect(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_310de5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_310de5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_310de5();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl
new file mode 100644
index 0000000..85df287
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn reflect(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn reflect_61ca21() {
+  var res: vec3<f16> = reflect(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_61ca21();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_61ca21();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_61ca21();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5a2f305
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void reflect_61ca21() {
+  vector<float16_t, 3> res = reflect((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_61ca21();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_61ca21();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_61ca21();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e8b180
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void reflect_61ca21() {
+  vector<float16_t, 3> res = reflect((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_61ca21();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_61ca21();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_61ca21();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E16EDB83B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl
new file mode 100644
index 0000000..c3b3b78
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_61ca21() {
+  f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  reflect_61ca21();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void reflect_61ca21() {
+  f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  reflect_61ca21();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_61ca21() {
+  f16vec3 res = reflect(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  reflect_61ca21();
+}
+
+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/reflect/61ca21.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl
new file mode 100644
index 0000000..2bd9b84
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_61ca21() {
+  half3 res = reflect(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  reflect_61ca21();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  reflect_61ca21();
+  return;
+}
+
+kernel void compute_main() {
+  reflect_61ca21();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm
new file mode 100644
index 0000000..10d9a35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %reflect_61ca21 "reflect_61ca21"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_61ca21 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Reflect %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %reflect_61ca21
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %reflect_61ca21
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %reflect_61ca21
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl
new file mode 100644
index 0000000..a30006a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/61ca21.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn reflect_61ca21() {
+  var res : vec3<f16> = reflect(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_61ca21();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_61ca21();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_61ca21();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl
new file mode 100644
index 0000000..854ac7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn reflect(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn reflect_bb15ac() {
+  var res: vec2<f16> = reflect(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_bb15ac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_bb15ac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_bb15ac();
+}
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ec357fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void reflect_bb15ac() {
+  vector<float16_t, 2> res = reflect((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_bb15ac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_bb15ac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_bb15ac();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..983ff2a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void reflect_bb15ac() {
+  vector<float16_t, 2> res = reflect((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  reflect_bb15ac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  reflect_bb15ac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  reflect_bb15ac();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E110B86630(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl
new file mode 100644
index 0000000..6ea875d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_bb15ac() {
+  f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  reflect_bb15ac();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void reflect_bb15ac() {
+  f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  reflect_bb15ac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void reflect_bb15ac() {
+  f16vec2 res = reflect(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  reflect_bb15ac();
+}
+
+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/reflect/bb15ac.wgsl.expected.msl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl
new file mode 100644
index 0000000..5ade63c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void reflect_bb15ac() {
+  half2 res = reflect(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  reflect_bb15ac();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  reflect_bb15ac();
+  return;
+}
+
+kernel void compute_main() {
+  reflect_bb15ac();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm
new file mode 100644
index 0000000..c9e584e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %reflect_bb15ac "reflect_bb15ac"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%reflect_bb15ac = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Reflect %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %reflect_bb15ac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %reflect_bb15ac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %reflect_bb15ac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e50cf3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/reflect/bb15ac.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn reflect_bb15ac() {
+  var res : vec2<f16> = reflect(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  reflect_bb15ac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  reflect_bb15ac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  reflect_bb15ac();
+}
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl
new file mode 100644
index 0000000..5614a4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn refract(vec<4, f16>, vec<4, f16>, f16) -> vec<4, f16>
+fn refract_0594ba() {
+  var res: vec4<f16> = refract(vec4<f16>(f16()), vec4<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_0594ba();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_0594ba();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_0594ba();
+}
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cdb4a1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void refract_0594ba() {
+  vector<float16_t, 4> res = refract((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_0594ba();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_0594ba();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_0594ba();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..776bfd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void refract_0594ba() {
+  vector<float16_t, 4> res = refract((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_0594ba();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_0594ba();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_0594ba();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B24EF980B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl
new file mode 100644
index 0000000..dd0c411
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_0594ba() {
+  f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  refract_0594ba();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void refract_0594ba() {
+  f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  refract_0594ba();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_0594ba() {
+  f16vec4 res = refract(f16vec4(0.0hf), f16vec4(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  refract_0594ba();
+}
+
+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/refract/0594ba.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl
new file mode 100644
index 0000000..5bb163e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_0594ba() {
+  half4 res = refract(half4(0.0h), half4(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  refract_0594ba();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  refract_0594ba();
+  return;
+}
+
+kernel void compute_main() {
+  refract_0594ba();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d0cc45
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %refract_0594ba "refract_0594ba"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+         %18 = OpConstantNull %half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_0594ba = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Refract %17 %17 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %refract_0594ba
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_0594ba
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %refract_0594ba
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl
new file mode 100644
index 0000000..ab78c7e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/0594ba.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn refract_0594ba() {
+  var res : vec4<f16> = refract(vec4<f16>(f16()), vec4<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_0594ba();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_0594ba();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_0594ba();
+}
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl
new file mode 100644
index 0000000..130e449
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn refract(vec<2, f16>, vec<2, f16>, f16) -> vec<2, f16>
+fn refract_570cb3() {
+  var res: vec2<f16> = refract(vec2<f16>(f16()), vec2<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_570cb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_570cb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_570cb3();
+}
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1f7f29d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void refract_570cb3() {
+  vector<float16_t, 2> res = refract((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_570cb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_570cb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_570cb3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..10ae4be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void refract_570cb3() {
+  vector<float16_t, 2> res = refract((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_570cb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_570cb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_570cb3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F32B087F20(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl
new file mode 100644
index 0000000..14fad7d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_570cb3() {
+  f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  refract_570cb3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void refract_570cb3() {
+  f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  refract_570cb3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_570cb3() {
+  f16vec2 res = refract(f16vec2(0.0hf), f16vec2(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  refract_570cb3();
+}
+
+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/refract/570cb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl
new file mode 100644
index 0000000..da86c8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_570cb3() {
+  half2 res = refract(half2(0.0h), half2(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  refract_570cb3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  refract_570cb3();
+  return;
+}
+
+kernel void compute_main() {
+  refract_570cb3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..238e6f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %refract_570cb3 "refract_570cb3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+         %18 = OpConstantNull %half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_570cb3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Refract %17 %17 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %refract_570cb3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_570cb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %refract_570cb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..45a3472
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/570cb3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn refract_570cb3() {
+  var res : vec2<f16> = refract(vec2<f16>(f16()), vec2<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_570cb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_570cb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_570cb3();
+}
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl
new file mode 100644
index 0000000..ccc6f61
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn refract(vec<3, f16>, vec<3, f16>, f16) -> vec<3, f16>
+fn refract_8984af() {
+  var res: vec3<f16> = refract(vec3<f16>(f16()), vec3<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_8984af();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_8984af();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_8984af();
+}
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..82aa4ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void refract_8984af() {
+  vector<float16_t, 3> res = refract((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_8984af();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_8984af();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_8984af();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fd30a49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void refract_8984af() {
+  vector<float16_t, 3> res = refract((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  refract_8984af();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  refract_8984af();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  refract_8984af();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019FDBAB9D00(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl
new file mode 100644
index 0000000..cd538f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_8984af() {
+  f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+vec4 vertex_main() {
+  refract_8984af();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void refract_8984af() {
+  f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+void fragment_main() {
+  refract_8984af();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void refract_8984af() {
+  f16vec3 res = refract(f16vec3(0.0hf), f16vec3(0.0hf), 0.0hf);
+}
+
+void compute_main() {
+  refract_8984af();
+}
+
+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/refract/8984af.wgsl.expected.msl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl
new file mode 100644
index 0000000..54ca61d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void refract_8984af() {
+  half3 res = refract(half3(0.0h), half3(0.0h), 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  refract_8984af();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  refract_8984af();
+  return;
+}
+
+kernel void compute_main() {
+  refract_8984af();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm
new file mode 100644
index 0000000..28804a8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.spvasm
@@ -0,0 +1,73 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 35
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %refract_8984af "refract_8984af"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+         %18 = OpConstantNull %half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %21 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%refract_8984af = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Refract %17 %17 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %21
+         %23 = OpLabel
+         %24 = OpFunctionCall %void %refract_8984af
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %26 = OpLabel
+         %27 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %27
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %refract_8984af
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %refract_8984af
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl
new file mode 100644
index 0000000..8ce7e19
--- /dev/null
+++ b/test/tint/builtins/gen/literal/refract/8984af.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn refract_8984af() {
+  var res : vec3<f16> = refract(vec3<f16>(f16()), vec3<f16>(f16()), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  refract_8984af();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  refract_8984af();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  refract_8984af();
+}
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl
new file mode 100644
index 0000000..d5223dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn round(f16) -> f16
+fn round_9078ef() {
+  var res: f16 = round(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_9078ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_9078ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_9078ef();
+}
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e695f9b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void round_9078ef() {
+  float16_t res = round(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_9078ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_9078ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_9078ef();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ba25fa1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void round_9078ef() {
+  float16_t res = round(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_9078ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_9078ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_9078ef();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001AFF97C0AC0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl
new file mode 100644
index 0000000..34f4fd1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_9078ef() {
+  float16_t res = round(0.0hf);
+}
+
+vec4 vertex_main() {
+  round_9078ef();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void round_9078ef() {
+  float16_t res = round(0.0hf);
+}
+
+void fragment_main() {
+  round_9078ef();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_9078ef() {
+  float16_t res = round(0.0hf);
+}
+
+void compute_main() {
+  round_9078ef();
+}
+
+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/round/9078ef.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl
new file mode 100644
index 0000000..c400dc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_9078ef() {
+  half res = rint(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  round_9078ef();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  round_9078ef();
+  return;
+}
+
+kernel void compute_main() {
+  round_9078ef();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm
new file mode 100644
index 0000000..80c9f07
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %round_9078ef "round_9078ef"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_9078ef = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 RoundEven %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %round_9078ef
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %round_9078ef
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %round_9078ef
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl
new file mode 100644
index 0000000..f918a90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/9078ef.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn round_9078ef() {
+  var res : f16 = round(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_9078ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_9078ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_9078ef();
+}
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl
new file mode 100644
index 0000000..3ca7f69
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn round(vec<2, f16>) -> vec<2, f16>
+fn round_d87e84() {
+  var res: vec2<f16> = round(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_d87e84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_d87e84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_d87e84();
+}
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc48afa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void round_d87e84() {
+  vector<float16_t, 2> res = round((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_d87e84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_d87e84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_d87e84();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b025eb8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void round_d87e84() {
+  vector<float16_t, 2> res = round((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_d87e84();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_d87e84();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_d87e84();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001D031328810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl
new file mode 100644
index 0000000..e2e82c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_d87e84() {
+  f16vec2 res = round(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  round_d87e84();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void round_d87e84() {
+  f16vec2 res = round(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  round_d87e84();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_d87e84() {
+  f16vec2 res = round(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  round_d87e84();
+}
+
+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/round/d87e84.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl
new file mode 100644
index 0000000..af2b9b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_d87e84() {
+  half2 res = rint(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  round_d87e84();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  round_d87e84();
+  return;
+}
+
+kernel void compute_main() {
+  round_d87e84();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm
new file mode 100644
index 0000000..e6698b4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %round_d87e84 "round_d87e84"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_d87e84 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 RoundEven %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %round_d87e84
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %round_d87e84
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %round_d87e84
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl
new file mode 100644
index 0000000..d3a6cc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/d87e84.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn round_d87e84() {
+  var res : vec2<f16> = round(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_d87e84();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_d87e84();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_d87e84();
+}
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl
new file mode 100644
index 0000000..dfa1264
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn round(vec<3, f16>) -> vec<3, f16>
+fn round_e1bba2() {
+  var res: vec3<f16> = round(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_e1bba2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_e1bba2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_e1bba2();
+}
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4941302
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void round_e1bba2() {
+  vector<float16_t, 3> res = round((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_e1bba2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_e1bba2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_e1bba2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..899f28d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void round_e1bba2() {
+  vector<float16_t, 3> res = round((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_e1bba2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_e1bba2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_e1bba2();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021F98A3E5C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl
new file mode 100644
index 0000000..873d32a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_e1bba2() {
+  f16vec3 res = round(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  round_e1bba2();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void round_e1bba2() {
+  f16vec3 res = round(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  round_e1bba2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_e1bba2() {
+  f16vec3 res = round(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  round_e1bba2();
+}
+
+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/round/e1bba2.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl
new file mode 100644
index 0000000..c4670c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_e1bba2() {
+  half3 res = rint(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  round_e1bba2();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  round_e1bba2();
+  return;
+}
+
+kernel void compute_main() {
+  round_e1bba2();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm
new file mode 100644
index 0000000..122df56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %round_e1bba2 "round_e1bba2"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_e1bba2 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 RoundEven %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %round_e1bba2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %round_e1bba2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %round_e1bba2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl
new file mode 100644
index 0000000..6da5186
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/e1bba2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn round_e1bba2() {
+  var res : vec3<f16> = round(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_e1bba2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_e1bba2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_e1bba2();
+}
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl
new file mode 100644
index 0000000..6293239
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn round(vec<4, f16>) -> vec<4, f16>
+fn round_f665b5() {
+  var res: vec4<f16> = round(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_f665b5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_f665b5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_f665b5();
+}
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..287b5e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void round_f665b5() {
+  vector<float16_t, 4> res = round((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_f665b5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_f665b5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_f665b5();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c73645a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void round_f665b5() {
+  vector<float16_t, 4> res = round((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  round_f665b5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  round_f665b5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  round_f665b5();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000017F6B0D8810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl
new file mode 100644
index 0000000..bc044ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_f665b5() {
+  f16vec4 res = round(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  round_f665b5();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void round_f665b5() {
+  f16vec4 res = round(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  round_f665b5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void round_f665b5() {
+  f16vec4 res = round(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  round_f665b5();
+}
+
+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/round/f665b5.wgsl.expected.msl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl
new file mode 100644
index 0000000..db3fa98
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void round_f665b5() {
+  half4 res = rint(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  round_f665b5();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  round_f665b5();
+  return;
+}
+
+kernel void compute_main() {
+  round_f665b5();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm
new file mode 100644
index 0000000..9600ad7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %round_f665b5 "round_f665b5"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%round_f665b5 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 RoundEven %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %round_f665b5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %round_f665b5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %round_f665b5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl
new file mode 100644
index 0000000..9338453
--- /dev/null
+++ b/test/tint/builtins/gen/literal/round/f665b5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn round_f665b5() {
+  var res : vec4<f16> = round(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  round_f665b5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  round_f665b5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  round_f665b5();
+}
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl
new file mode 100644
index 0000000..9632064
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(f16, f16, bool) -> f16
+fn select_10e73b() {
+  var res: f16 = select(f16(), f16(), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_10e73b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_10e73b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_10e73b();
+}
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1aaa5ca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_10e73b() {
+  float16_t res = (true ? float16_t(0.0h) : float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_10e73b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_10e73b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_10e73b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9d0c5f2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void select_10e73b() {
+  float16_t res = (true ? float16_t(0.0h) : float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_10e73b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_10e73b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_10e73b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A45741F510(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl
new file mode 100644
index 0000000..bab4323
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_10e73b() {
+  float16_t res = (true ? 0.0hf : 0.0hf);
+}
+
+vec4 vertex_main() {
+  select_10e73b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_10e73b() {
+  float16_t res = (true ? 0.0hf : 0.0hf);
+}
+
+void fragment_main() {
+  select_10e73b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_10e73b() {
+  float16_t res = (true ? 0.0hf : 0.0hf);
+}
+
+void compute_main() {
+  select_10e73b();
+}
+
+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/select/10e73b.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl
new file mode 100644
index 0000000..b7c4cd5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_10e73b() {
+  half res = select(0.0h, 0.0h, true);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_10e73b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_10e73b();
+  return;
+}
+
+kernel void compute_main() {
+  select_10e73b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm
new file mode 100644
index 0000000..af36e83
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_10e73b "select_10e73b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+         %17 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_10e73b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %17
+         %13 = OpSelect %half %true %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %select_10e73b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %select_10e73b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %select_10e73b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl
new file mode 100644
index 0000000..4aa334d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/10e73b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_10e73b() {
+  var res : f16 = select(f16(), f16(), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_10e73b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_10e73b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_10e73b();
+}
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl
new file mode 100644
index 0000000..2278b71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<3, f16>, vec<3, f16>, bool) -> vec<3, f16>
+fn select_1ada2a() {
+  var res: vec3<f16> = select(vec3<f16>(f16()), vec3<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_1ada2a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_1ada2a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_1ada2a();
+}
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87d7806
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_1ada2a() {
+  vector<float16_t, 3> res = (true ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_1ada2a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_1ada2a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_1ada2a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2165304
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_1ada2a() {
+  vector<float16_t, 3> res = (true ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_1ada2a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_1ada2a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_1ada2a();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD85D20100(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl
new file mode 100644
index 0000000..63526f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_1ada2a() {
+  f16vec3 res = (true ? f16vec3(0.0hf) : f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  select_1ada2a();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_1ada2a() {
+  f16vec3 res = (true ? f16vec3(0.0hf) : f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  select_1ada2a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_1ada2a() {
+  f16vec3 res = (true ? f16vec3(0.0hf) : f16vec3(0.0hf));
+}
+
+void compute_main() {
+  select_1ada2a();
+}
+
+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/select/1ada2a.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl
new file mode 100644
index 0000000..bc21eda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_1ada2a() {
+  half3 res = select(half3(0.0h), half3(0.0h), true);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_1ada2a();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_1ada2a();
+  return;
+}
+
+kernel void compute_main() {
+  select_1ada2a();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm
new file mode 100644
index 0000000..2339357
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_1ada2a "select_1ada2a"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+         %18 = OpConstantNull %v3half
+     %v3bool = OpTypeVector %bool 3
+%_ptr_Function_v3bool = OpTypePointer Function %v3bool
+         %22 = OpConstantNull %v3bool
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_1ada2a = OpFunction %void None %9
+         %12 = OpLabel
+         %20 = OpVariable %_ptr_Function_v3bool Function %22
+        %res = OpVariable %_ptr_Function_v3half Function %18
+         %23 = OpCompositeConstruct %v3bool %true %true %true
+         %13 = OpSelect %v3half %23 %18 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %select_1ada2a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_1ada2a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %select_1ada2a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl
new file mode 100644
index 0000000..64fb3712
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/1ada2a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_1ada2a() {
+  var res : vec3<f16> = select(vec3<f16>(f16()), vec3<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_1ada2a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_1ada2a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_1ada2a();
+}
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl b/test/tint/builtins/gen/literal/select/53d518.wgsl
new file mode 100644
index 0000000..a511c17
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<3, f16>, vec<3, f16>, vec<3, bool>) -> vec<3, f16>
+fn select_53d518() {
+  var res: vec3<f16> = select(vec3<f16>(f16()), vec3<f16>(f16()), vec3<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_53d518();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_53d518();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_53d518();
+}
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..95ed17f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_53d518() {
+  vector<float16_t, 3> res = ((true).xxx ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_53d518();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_53d518();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_53d518();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3117c7b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_53d518() {
+  vector<float16_t, 3> res = ((true).xxx ? (float16_t(0.0h)).xxx : (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_53d518();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_53d518();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_53d518();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025E61DB8680(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl
new file mode 100644
index 0000000..1ecee21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_53d518() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), bvec3(true));
+}
+
+vec4 vertex_main() {
+  select_53d518();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_53d518() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), bvec3(true));
+}
+
+void fragment_main() {
+  select_53d518();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_53d518() {
+  f16vec3 res = mix(f16vec3(0.0hf), f16vec3(0.0hf), bvec3(true));
+}
+
+void compute_main() {
+  select_53d518();
+}
+
+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/select/53d518.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl
new file mode 100644
index 0000000..9338705
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_53d518() {
+  half3 res = select(half3(0.0h), half3(0.0h), bool3(true));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_53d518();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_53d518();
+  return;
+}
+
+kernel void compute_main() {
+  select_53d518();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm
new file mode 100644
index 0000000..f76cbac
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_53d518 "select_53d518"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+       %bool = OpTypeBool
+     %v3bool = OpTypeVector %bool 3
+       %true = OpConstantTrue %bool
+         %19 = OpConstantComposite %v3bool %true %true %true
+         %20 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_53d518 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %20
+         %13 = OpSelect %v3half %19 %20 %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %select_53d518
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %select_53d518
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_53d518
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl
new file mode 100644
index 0000000..425a44b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/53d518.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_53d518() {
+  var res : vec3<f16> = select(vec3<f16>(f16()), vec3<f16>(f16()), vec3<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_53d518();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_53d518();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_53d518();
+}
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl
new file mode 100644
index 0000000..f1fda9e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<4, f16>, vec<4, f16>, bool) -> vec<4, f16>
+fn select_830dd9() {
+  var res: vec4<f16> = select(vec4<f16>(f16()), vec4<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_830dd9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_830dd9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_830dd9();
+}
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3bf576f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_830dd9() {
+  vector<float16_t, 4> res = (true ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_830dd9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_830dd9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_830dd9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..522a9e3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_830dd9() {
+  vector<float16_t, 4> res = (true ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_830dd9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_830dd9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_830dd9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E721C969A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl
new file mode 100644
index 0000000..69a2b65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_830dd9() {
+  f16vec4 res = (true ? f16vec4(0.0hf) : f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  select_830dd9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_830dd9() {
+  f16vec4 res = (true ? f16vec4(0.0hf) : f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  select_830dd9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_830dd9() {
+  f16vec4 res = (true ? f16vec4(0.0hf) : f16vec4(0.0hf));
+}
+
+void compute_main() {
+  select_830dd9();
+}
+
+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/select/830dd9.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl
new file mode 100644
index 0000000..f779aeb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_830dd9() {
+  half4 res = select(half4(0.0h), half4(0.0h), true);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_830dd9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_830dd9();
+  return;
+}
+
+kernel void compute_main() {
+  select_830dd9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm
new file mode 100644
index 0000000..5dfcbe6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_830dd9 "select_830dd9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+         %18 = OpConstantNull %v4half
+     %v4bool = OpTypeVector %bool 4
+%_ptr_Function_v4bool = OpTypePointer Function %v4bool
+         %22 = OpConstantNull %v4bool
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_830dd9 = OpFunction %void None %9
+         %12 = OpLabel
+         %20 = OpVariable %_ptr_Function_v4bool Function %22
+        %res = OpVariable %_ptr_Function_v4half Function %18
+         %23 = OpCompositeConstruct %v4bool %true %true %true %true
+         %13 = OpSelect %v4half %23 %18 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %select_830dd9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_830dd9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %select_830dd9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl
new file mode 100644
index 0000000..cb99917
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/830dd9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_830dd9() {
+  var res : vec4<f16> = select(vec4<f16>(f16()), vec4<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_830dd9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_830dd9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_830dd9();
+}
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl
new file mode 100644
index 0000000..0cb4dc0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<2, f16>, vec<2, f16>, bool) -> vec<2, f16>
+fn select_86f9bd() {
+  var res: vec2<f16> = select(vec2<f16>(f16()), vec2<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_86f9bd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_86f9bd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_86f9bd();
+}
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..528ebaf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_86f9bd() {
+  vector<float16_t, 2> res = (true ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_86f9bd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_86f9bd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_86f9bd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d789a21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_86f9bd() {
+  vector<float16_t, 2> res = (true ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_86f9bd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_86f9bd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_86f9bd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000021328920540(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl
new file mode 100644
index 0000000..1ee2a35
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_86f9bd() {
+  f16vec2 res = (true ? f16vec2(0.0hf) : f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  select_86f9bd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_86f9bd() {
+  f16vec2 res = (true ? f16vec2(0.0hf) : f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  select_86f9bd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_86f9bd() {
+  f16vec2 res = (true ? f16vec2(0.0hf) : f16vec2(0.0hf));
+}
+
+void compute_main() {
+  select_86f9bd();
+}
+
+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/select/86f9bd.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl
new file mode 100644
index 0000000..7b01210
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_86f9bd() {
+  half2 res = select(half2(0.0h), half2(0.0h), true);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_86f9bd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_86f9bd();
+  return;
+}
+
+kernel void compute_main() {
+  select_86f9bd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm
new file mode 100644
index 0000000..410963b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_86f9bd "select_86f9bd"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+       %bool = OpTypeBool
+       %true = OpConstantTrue %bool
+         %18 = OpConstantNull %v2half
+     %v2bool = OpTypeVector %bool 2
+%_ptr_Function_v2bool = OpTypePointer Function %v2bool
+         %22 = OpConstantNull %v2bool
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_86f9bd = OpFunction %void None %9
+         %12 = OpLabel
+         %20 = OpVariable %_ptr_Function_v2bool Function %22
+        %res = OpVariable %_ptr_Function_v2half Function %18
+         %23 = OpCompositeConstruct %v2bool %true %true
+         %13 = OpSelect %v2half %23 %18 %18
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %select_86f9bd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_86f9bd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %select_86f9bd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl
new file mode 100644
index 0000000..0454417
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/86f9bd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_86f9bd() {
+  var res : vec2<f16> = select(vec2<f16>(f16()), vec2<f16>(f16()), true);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_86f9bd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_86f9bd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_86f9bd();
+}
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl
new file mode 100644
index 0000000..9f4e789
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<4, f16>, vec<4, f16>, vec<4, bool>) -> vec<4, f16>
+fn select_a081f1() {
+  var res: vec4<f16> = select(vec4<f16>(f16()), vec4<f16>(f16()), vec4<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_a081f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_a081f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_a081f1();
+}
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3eb1517
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_a081f1() {
+  vector<float16_t, 4> res = ((true).xxxx ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_a081f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_a081f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_a081f1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..651eaf7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_a081f1() {
+  vector<float16_t, 4> res = ((true).xxxx ? (float16_t(0.0h)).xxxx : (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_a081f1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_a081f1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_a081f1();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000202B4A94A10(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl
new file mode 100644
index 0000000..a486535
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_a081f1() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), bvec4(true));
+}
+
+vec4 vertex_main() {
+  select_a081f1();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_a081f1() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), bvec4(true));
+}
+
+void fragment_main() {
+  select_a081f1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_a081f1() {
+  f16vec4 res = mix(f16vec4(0.0hf), f16vec4(0.0hf), bvec4(true));
+}
+
+void compute_main() {
+  select_a081f1();
+}
+
+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/select/a081f1.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl
new file mode 100644
index 0000000..fddeb4d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_a081f1() {
+  half4 res = select(half4(0.0h), half4(0.0h), bool4(true));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_a081f1();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_a081f1();
+  return;
+}
+
+kernel void compute_main() {
+  select_a081f1();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm
new file mode 100644
index 0000000..37e70c6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_a081f1 "select_a081f1"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+       %bool = OpTypeBool
+     %v4bool = OpTypeVector %bool 4
+       %true = OpConstantTrue %bool
+         %19 = OpConstantComposite %v4bool %true %true %true %true
+         %20 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_a081f1 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %20
+         %13 = OpSelect %v4half %19 %20 %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %select_a081f1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %select_a081f1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_a081f1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl
new file mode 100644
index 0000000..feefad7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/a081f1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_a081f1() {
+  var res : vec4<f16> = select(vec4<f16>(f16()), vec4<f16>(f16()), vec4<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_a081f1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_a081f1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_a081f1();
+}
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl
new file mode 100644
index 0000000..1d862f6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn select(vec<2, f16>, vec<2, f16>, vec<2, bool>) -> vec<2, f16>
+fn select_ed7c13() {
+  var res: vec2<f16> = select(vec2<f16>(f16()), vec2<f16>(f16()), vec2<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_ed7c13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_ed7c13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_ed7c13();
+}
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1db2ca4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void select_ed7c13() {
+  vector<float16_t, 2> res = ((true).xx ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_ed7c13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_ed7c13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_ed7c13();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0006a34
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void select_ed7c13() {
+  vector<float16_t, 2> res = ((true).xx ? (float16_t(0.0h)).xx : (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  select_ed7c13();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  select_ed7c13();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  select_ed7c13();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024686E0D4B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl
new file mode 100644
index 0000000..3e0564b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_ed7c13() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), bvec2(true));
+}
+
+vec4 vertex_main() {
+  select_ed7c13();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void select_ed7c13() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), bvec2(true));
+}
+
+void fragment_main() {
+  select_ed7c13();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void select_ed7c13() {
+  f16vec2 res = mix(f16vec2(0.0hf), f16vec2(0.0hf), bvec2(true));
+}
+
+void compute_main() {
+  select_ed7c13();
+}
+
+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/select/ed7c13.wgsl.expected.msl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl
new file mode 100644
index 0000000..172c6dd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void select_ed7c13() {
+  half2 res = select(half2(0.0h), half2(0.0h), bool2(true));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  select_ed7c13();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  select_ed7c13();
+  return;
+}
+
+kernel void compute_main() {
+  select_ed7c13();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm
new file mode 100644
index 0000000..3112c00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %select_ed7c13 "select_ed7c13"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+       %bool = OpTypeBool
+     %v2bool = OpTypeVector %bool 2
+       %true = OpConstantTrue %bool
+         %19 = OpConstantComposite %v2bool %true %true
+         %20 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%select_ed7c13 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %20
+         %13 = OpSelect %v2half %19 %20 %20
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %select_ed7c13
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %select_ed7c13
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %select_ed7c13
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl
new file mode 100644
index 0000000..427fba2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/select/ed7c13.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn select_ed7c13() {
+  var res : vec2<f16> = select(vec2<f16>(f16()), vec2<f16>(f16()), vec2<bool>(true));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  select_ed7c13();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  select_ed7c13();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  select_ed7c13();
+}
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl b/test/tint/builtins/gen/literal/sign/160933.wgsl
new file mode 100644
index 0000000..13a6c3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sign(vec<4, f16>) -> vec<4, f16>
+fn sign_160933() {
+  var res: vec4<f16> = sign(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_160933();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_160933();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_160933();
+}
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b8e2784
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sign_160933() {
+  vector<float16_t, 4> res = sign((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_160933();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_160933();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_160933();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b111818
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sign_160933() {
+  vector<float16_t, 4> res = sign((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_160933();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_160933();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_160933();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A1A601ACD0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl
new file mode 100644
index 0000000..23eade5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_160933() {
+  f16vec4 res = sign(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  sign_160933();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sign_160933() {
+  f16vec4 res = sign(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  sign_160933();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_160933() {
+  f16vec4 res = sign(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  sign_160933();
+}
+
+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/sign/160933.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl
new file mode 100644
index 0000000..faf94ed
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_160933() {
+  half4 res = sign(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sign_160933();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sign_160933();
+  return;
+}
+
+kernel void compute_main() {
+  sign_160933();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm
new file mode 100644
index 0000000..9a1664c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sign_160933 "sign_160933"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_160933 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 FSign %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sign_160933
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sign_160933
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sign_160933
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl
new file mode 100644
index 0000000..5633954
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/160933.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sign_160933() {
+  var res : vec4<f16> = sign(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_160933();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_160933();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_160933();
+}
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl
new file mode 100644
index 0000000..dc23259
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sign(vec<3, f16>) -> vec<3, f16>
+fn sign_5d283a() {
+  var res: vec3<f16> = sign(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_5d283a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_5d283a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_5d283a();
+}
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0331539
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sign_5d283a() {
+  vector<float16_t, 3> res = sign((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_5d283a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_5d283a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_5d283a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7493bb0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sign_5d283a() {
+  vector<float16_t, 3> res = sign((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_5d283a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_5d283a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_5d283a();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002BE5E5FBCB0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl
new file mode 100644
index 0000000..4cda792
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_5d283a() {
+  f16vec3 res = sign(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  sign_5d283a();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sign_5d283a() {
+  f16vec3 res = sign(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  sign_5d283a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_5d283a() {
+  f16vec3 res = sign(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  sign_5d283a();
+}
+
+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/sign/5d283a.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl
new file mode 100644
index 0000000..3ffb6b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_5d283a() {
+  half3 res = sign(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sign_5d283a();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sign_5d283a();
+  return;
+}
+
+kernel void compute_main() {
+  sign_5d283a();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm
new file mode 100644
index 0000000..487c968
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sign_5d283a "sign_5d283a"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_5d283a = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 FSign %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sign_5d283a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sign_5d283a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sign_5d283a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl
new file mode 100644
index 0000000..754ba8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/5d283a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sign_5d283a() {
+  var res : vec3<f16> = sign(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_5d283a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_5d283a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_5d283a();
+}
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl
new file mode 100644
index 0000000..b8d85dc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sign(f16) -> f16
+fn sign_7c85ea() {
+  var res: f16 = sign(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_7c85ea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_7c85ea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_7c85ea();
+}
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fa81821
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sign_7c85ea() {
+  float16_t res = sign(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_7c85ea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_7c85ea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_7c85ea();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6690d62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void sign_7c85ea() {
+  float16_t res = sign(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_7c85ea();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_7c85ea();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_7c85ea();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001A85B767D00(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl
new file mode 100644
index 0000000..c49bc28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_7c85ea() {
+  float16_t res = sign(0.0hf);
+}
+
+vec4 vertex_main() {
+  sign_7c85ea();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sign_7c85ea() {
+  float16_t res = sign(0.0hf);
+}
+
+void fragment_main() {
+  sign_7c85ea();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_7c85ea() {
+  float16_t res = sign(0.0hf);
+}
+
+void compute_main() {
+  sign_7c85ea();
+}
+
+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/sign/7c85ea.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl
new file mode 100644
index 0000000..9f39434
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_7c85ea() {
+  half res = sign(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sign_7c85ea();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sign_7c85ea();
+  return;
+}
+
+kernel void compute_main() {
+  sign_7c85ea();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3a19c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %sign_7c85ea "sign_7c85ea"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_7c85ea = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 FSign %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %sign_7c85ea
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %sign_7c85ea
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %sign_7c85ea
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl
new file mode 100644
index 0000000..5080143
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/7c85ea.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sign_7c85ea() {
+  var res : f16 = sign(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_7c85ea();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_7c85ea();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_7c85ea();
+}
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl
new file mode 100644
index 0000000..169814e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sign(vec<2, f16>) -> vec<2, f16>
+fn sign_ccdb3c() {
+  var res: vec2<f16> = sign(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_ccdb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_ccdb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_ccdb3c();
+}
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e0c820c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sign_ccdb3c() {
+  vector<float16_t, 2> res = sign((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_ccdb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_ccdb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_ccdb3c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a77b50b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sign_ccdb3c() {
+  vector<float16_t, 2> res = sign((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sign_ccdb3c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sign_ccdb3c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sign_ccdb3c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE218EE9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl
new file mode 100644
index 0000000..fae5053
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_ccdb3c() {
+  f16vec2 res = sign(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  sign_ccdb3c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sign_ccdb3c() {
+  f16vec2 res = sign(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  sign_ccdb3c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sign_ccdb3c() {
+  f16vec2 res = sign(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  sign_ccdb3c();
+}
+
+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/sign/ccdb3c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl
new file mode 100644
index 0000000..8df474b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sign_ccdb3c() {
+  half2 res = sign(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sign_ccdb3c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sign_ccdb3c();
+  return;
+}
+
+kernel void compute_main() {
+  sign_ccdb3c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm
new file mode 100644
index 0000000..8366c62
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sign_ccdb3c "sign_ccdb3c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sign_ccdb3c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 FSign %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sign_ccdb3c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sign_ccdb3c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sign_ccdb3c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a5f0ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sign/ccdb3c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sign_ccdb3c() {
+  var res : vec2<f16> = sign(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sign_ccdb3c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sign_ccdb3c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sign_ccdb3c();
+}
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl
new file mode 100644
index 0000000..abe172c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sin(vec<3, f16>) -> vec<3, f16>
+fn sin_2c903b() {
+  var res: vec3<f16> = sin(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_2c903b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_2c903b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_2c903b();
+}
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8da2e1c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sin_2c903b() {
+  vector<float16_t, 3> res = sin((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_2c903b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_2c903b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_2c903b();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b22e708
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sin_2c903b() {
+  vector<float16_t, 3> res = sin((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_2c903b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_2c903b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_2c903b();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000153299087E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl
new file mode 100644
index 0000000..21de9a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_2c903b() {
+  f16vec3 res = sin(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  sin_2c903b();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sin_2c903b() {
+  f16vec3 res = sin(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  sin_2c903b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_2c903b() {
+  f16vec3 res = sin(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  sin_2c903b();
+}
+
+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/sin/2c903b.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl
new file mode 100644
index 0000000..85bf223
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_2c903b() {
+  half3 res = sin(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sin_2c903b();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sin_2c903b();
+  return;
+}
+
+kernel void compute_main() {
+  sin_2c903b();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm
new file mode 100644
index 0000000..ad41fb3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sin_2c903b "sin_2c903b"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_2c903b = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Sin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sin_2c903b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sin_2c903b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sin_2c903b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl
new file mode 100644
index 0000000..dd038f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/2c903b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sin_2c903b() {
+  var res : vec3<f16> = sin(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_2c903b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_2c903b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_2c903b();
+}
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl
new file mode 100644
index 0000000..527f92b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sin(vec<2, f16>) -> vec<2, f16>
+fn sin_3cca11() {
+  var res: vec2<f16> = sin(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_3cca11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_3cca11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_3cca11();
+}
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2f44faa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sin_3cca11() {
+  vector<float16_t, 2> res = sin((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_3cca11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_3cca11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_3cca11();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..38960b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sin_3cca11() {
+  vector<float16_t, 2> res = sin((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_3cca11();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_3cca11();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_3cca11();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025136111160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl
new file mode 100644
index 0000000..3d2c148
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_3cca11() {
+  f16vec2 res = sin(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  sin_3cca11();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sin_3cca11() {
+  f16vec2 res = sin(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  sin_3cca11();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_3cca11() {
+  f16vec2 res = sin(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  sin_3cca11();
+}
+
+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/sin/3cca11.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl
new file mode 100644
index 0000000..0e631c7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_3cca11() {
+  half2 res = sin(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sin_3cca11();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sin_3cca11();
+  return;
+}
+
+kernel void compute_main() {
+  sin_3cca11();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm
new file mode 100644
index 0000000..f80895e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sin_3cca11 "sin_3cca11"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_3cca11 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Sin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sin_3cca11
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sin_3cca11
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sin_3cca11
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl
new file mode 100644
index 0000000..31f967a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/3cca11.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sin_3cca11() {
+  var res : vec2<f16> = sin(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_3cca11();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_3cca11();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_3cca11();
+}
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl
new file mode 100644
index 0000000..8a16544
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sin(vec<4, f16>) -> vec<4, f16>
+fn sin_5c0712() {
+  var res: vec4<f16> = sin(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_5c0712();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_5c0712();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_5c0712();
+}
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ffc0c91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sin_5c0712() {
+  vector<float16_t, 4> res = sin((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_5c0712();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_5c0712();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_5c0712();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..26e763a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sin_5c0712() {
+  vector<float16_t, 4> res = sin((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_5c0712();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_5c0712();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_5c0712();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE3DAE1580(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl
new file mode 100644
index 0000000..c16ccdf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_5c0712() {
+  f16vec4 res = sin(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  sin_5c0712();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sin_5c0712() {
+  f16vec4 res = sin(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  sin_5c0712();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_5c0712() {
+  f16vec4 res = sin(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  sin_5c0712();
+}
+
+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/sin/5c0712.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl
new file mode 100644
index 0000000..9393236
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_5c0712() {
+  half4 res = sin(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sin_5c0712();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sin_5c0712();
+  return;
+}
+
+kernel void compute_main() {
+  sin_5c0712();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm
new file mode 100644
index 0000000..5060ea8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sin_5c0712 "sin_5c0712"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_5c0712 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Sin %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sin_5c0712
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sin_5c0712
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sin_5c0712
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl
new file mode 100644
index 0000000..451cac0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/5c0712.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sin_5c0712() {
+  var res : vec4<f16> = sin(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_5c0712();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_5c0712();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_5c0712();
+}
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl
new file mode 100644
index 0000000..9f69a70
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sin(f16) -> f16
+fn sin_66a59f() {
+  var res: f16 = sin(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_66a59f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_66a59f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_66a59f();
+}
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dbb0994
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sin_66a59f() {
+  float16_t res = sin(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_66a59f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_66a59f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_66a59f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f6b54ff
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void sin_66a59f() {
+  float16_t res = sin(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sin_66a59f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sin_66a59f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sin_66a59f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002CA5CAC0100(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl
new file mode 100644
index 0000000..dc6b376
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_66a59f() {
+  float16_t res = sin(0.0hf);
+}
+
+vec4 vertex_main() {
+  sin_66a59f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sin_66a59f() {
+  float16_t res = sin(0.0hf);
+}
+
+void fragment_main() {
+  sin_66a59f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sin_66a59f() {
+  float16_t res = sin(0.0hf);
+}
+
+void compute_main() {
+  sin_66a59f();
+}
+
+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/sin/66a59f.wgsl.expected.msl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl
new file mode 100644
index 0000000..8204eec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sin_66a59f() {
+  half res = sin(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sin_66a59f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sin_66a59f();
+  return;
+}
+
+kernel void compute_main() {
+  sin_66a59f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm
new file mode 100644
index 0000000..19a2e29
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %sin_66a59f "sin_66a59f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %sin_66a59f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Sin %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %sin_66a59f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %sin_66a59f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %sin_66a59f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl
new file mode 100644
index 0000000..afb239b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sin/66a59f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sin_66a59f() {
+  var res : f16 = sin(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sin_66a59f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sin_66a59f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sin_66a59f();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl
new file mode 100644
index 0000000..dc47091
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sinh(vec<3, f16>) -> vec<3, f16>
+fn sinh_0908c1() {
+  var res: vec3<f16> = sinh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_0908c1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_0908c1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_0908c1();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..797d893
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sinh_0908c1() {
+  vector<float16_t, 3> res = sinh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_0908c1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_0908c1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_0908c1();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cac1c4b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sinh_0908c1() {
+  vector<float16_t, 3> res = sinh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_0908c1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_0908c1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_0908c1();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E72E75B6A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl
new file mode 100644
index 0000000..6130c64
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_0908c1() {
+  f16vec3 res = sinh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  sinh_0908c1();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sinh_0908c1() {
+  f16vec3 res = sinh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  sinh_0908c1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_0908c1() {
+  f16vec3 res = sinh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  sinh_0908c1();
+}
+
+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/sinh/0908c1.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl
new file mode 100644
index 0000000..5da508a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_0908c1() {
+  half3 res = sinh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sinh_0908c1();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sinh_0908c1();
+  return;
+}
+
+kernel void compute_main() {
+  sinh_0908c1();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm
new file mode 100644
index 0000000..62c2763
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sinh_0908c1 "sinh_0908c1"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_0908c1 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Sinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sinh_0908c1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sinh_0908c1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sinh_0908c1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl
new file mode 100644
index 0000000..f583b10
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/0908c1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sinh_0908c1() {
+  var res : vec3<f16> = sinh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_0908c1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_0908c1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_0908c1();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl
new file mode 100644
index 0000000..ad51136
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sinh(f16) -> f16
+fn sinh_69cce2() {
+  var res: f16 = sinh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_69cce2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_69cce2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_69cce2();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2772106
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sinh_69cce2() {
+  float16_t res = sinh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_69cce2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_69cce2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_69cce2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4dca58e2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void sinh_69cce2() {
+  float16_t res = sinh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_69cce2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_69cce2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_69cce2();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EB249D0520(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl
new file mode 100644
index 0000000..4b0c3e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_69cce2() {
+  float16_t res = sinh(0.0hf);
+}
+
+vec4 vertex_main() {
+  sinh_69cce2();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sinh_69cce2() {
+  float16_t res = sinh(0.0hf);
+}
+
+void fragment_main() {
+  sinh_69cce2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_69cce2() {
+  float16_t res = sinh(0.0hf);
+}
+
+void compute_main() {
+  sinh_69cce2();
+}
+
+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/sinh/69cce2.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl
new file mode 100644
index 0000000..5fada22
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_69cce2() {
+  half res = sinh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sinh_69cce2();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sinh_69cce2();
+  return;
+}
+
+kernel void compute_main() {
+  sinh_69cce2();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm
new file mode 100644
index 0000000..994f5e4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %sinh_69cce2 "sinh_69cce2"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_69cce2 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Sinh %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %sinh_69cce2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %sinh_69cce2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %sinh_69cce2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl
new file mode 100644
index 0000000..8defcbd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/69cce2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sinh_69cce2() {
+  var res : f16 = sinh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_69cce2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_69cce2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_69cce2();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl
new file mode 100644
index 0000000..09ce2ee
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sinh(vec<2, f16>) -> vec<2, f16>
+fn sinh_924f19() {
+  var res: vec2<f16> = sinh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_924f19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_924f19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_924f19();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e79ca20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sinh_924f19() {
+  vector<float16_t, 2> res = sinh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_924f19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_924f19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_924f19();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..357854d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sinh_924f19() {
+  vector<float16_t, 2> res = sinh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_924f19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_924f19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_924f19();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019A6900E9E0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl
new file mode 100644
index 0000000..844c7ec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_924f19() {
+  f16vec2 res = sinh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  sinh_924f19();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sinh_924f19() {
+  f16vec2 res = sinh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  sinh_924f19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_924f19() {
+  f16vec2 res = sinh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  sinh_924f19();
+}
+
+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/sinh/924f19.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl
new file mode 100644
index 0000000..48d04ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_924f19() {
+  half2 res = sinh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sinh_924f19();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sinh_924f19();
+  return;
+}
+
+kernel void compute_main() {
+  sinh_924f19();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f2db5e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sinh_924f19 "sinh_924f19"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_924f19 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Sinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sinh_924f19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sinh_924f19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sinh_924f19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl
new file mode 100644
index 0000000..d384cab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/924f19.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sinh_924f19() {
+  var res : vec2<f16> = sinh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_924f19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_924f19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_924f19();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl
new file mode 100644
index 0000000..878d0b6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sinh(vec<4, f16>) -> vec<4, f16>
+fn sinh_ba7e25() {
+  var res: vec4<f16> = sinh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_ba7e25();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_ba7e25();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_ba7e25();
+}
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..87cbff0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sinh_ba7e25() {
+  vector<float16_t, 4> res = sinh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_ba7e25();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_ba7e25();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_ba7e25();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1100cab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sinh_ba7e25() {
+  vector<float16_t, 4> res = sinh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sinh_ba7e25();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sinh_ba7e25();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sinh_ba7e25();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000024997A21160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl
new file mode 100644
index 0000000..61015c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_ba7e25() {
+  f16vec4 res = sinh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  sinh_ba7e25();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sinh_ba7e25() {
+  f16vec4 res = sinh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  sinh_ba7e25();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sinh_ba7e25() {
+  f16vec4 res = sinh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  sinh_ba7e25();
+}
+
+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/sinh/ba7e25.wgsl.expected.msl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl
new file mode 100644
index 0000000..9aef6b3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sinh_ba7e25() {
+  half4 res = sinh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sinh_ba7e25();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sinh_ba7e25();
+  return;
+}
+
+kernel void compute_main() {
+  sinh_ba7e25();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm
new file mode 100644
index 0000000..3e9f2c0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sinh_ba7e25 "sinh_ba7e25"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sinh_ba7e25 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Sinh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sinh_ba7e25
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sinh_ba7e25
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sinh_ba7e25
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl
new file mode 100644
index 0000000..9587e3e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sinh/ba7e25.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sinh_ba7e25() {
+  var res : vec4<f16> = sinh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sinh_ba7e25();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sinh_ba7e25();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sinh_ba7e25();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl
new file mode 100644
index 0000000..a6bdd56
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn smoothstep(vec<2, f16>, vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn smoothstep_12c031() {
+  var res: vec2<f16> = smoothstep(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_12c031();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_12c031();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_12c031();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..836c5b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void smoothstep_12c031() {
+  vector<float16_t, 2> res = smoothstep((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_12c031();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_12c031();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_12c031();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ab2bc4c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void smoothstep_12c031() {
+  vector<float16_t, 2> res = smoothstep((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_12c031();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_12c031();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_12c031();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000298CE8896B0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl
new file mode 100644
index 0000000..64a110f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_12c031() {
+  f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  smoothstep_12c031();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void smoothstep_12c031() {
+  f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  smoothstep_12c031();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_12c031() {
+  f16vec2 res = smoothstep(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  smoothstep_12c031();
+}
+
+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/smoothstep/12c031.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl
new file mode 100644
index 0000000..1f30e7c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_12c031() {
+  half2 res = smoothstep(half2(0.0h), half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  smoothstep_12c031();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  smoothstep_12c031();
+  return;
+}
+
+kernel void compute_main() {
+  smoothstep_12c031();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm
new file mode 100644
index 0000000..aaaee6e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %smoothstep_12c031 "smoothstep_12c031"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_12c031 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 SmoothStep %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %smoothstep_12c031
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %smoothstep_12c031
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %smoothstep_12c031
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl
new file mode 100644
index 0000000..62ad2a7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/12c031.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn smoothstep_12c031() {
+  var res : vec2<f16> = smoothstep(vec2<f16>(f16()), vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_12c031();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_12c031();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_12c031();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl
new file mode 100644
index 0000000..d9e1447
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn smoothstep(f16, f16, f16) -> f16
+fn smoothstep_586e12() {
+  var res: f16 = smoothstep(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_586e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_586e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_586e12();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0a0bb8a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void smoothstep_586e12() {
+  float16_t res = smoothstep(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_586e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_586e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_586e12();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ac1f915
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void smoothstep_586e12() {
+  float16_t res = smoothstep(float16_t(0.0h), float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_586e12();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_586e12();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_586e12();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000272E8A60100(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl
new file mode 100644
index 0000000..26afc28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_586e12() {
+  float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  smoothstep_586e12();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void smoothstep_586e12() {
+  float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  smoothstep_586e12();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_586e12() {
+  float16_t res = smoothstep(0.0hf, 0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  smoothstep_586e12();
+}
+
+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/smoothstep/586e12.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl
new file mode 100644
index 0000000..a6a9fb3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_586e12() {
+  half res = smoothstep(0.0h, 0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  smoothstep_586e12();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  smoothstep_586e12();
+  return;
+}
+
+kernel void compute_main() {
+  smoothstep_586e12();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm
new file mode 100644
index 0000000..38ef86f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %smoothstep_586e12 "smoothstep_586e12"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_586e12 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 SmoothStep %16 %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %smoothstep_586e12
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %smoothstep_586e12
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %smoothstep_586e12
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl
new file mode 100644
index 0000000..e6600ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/586e12.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn smoothstep_586e12() {
+  var res : f16 = smoothstep(f16(), f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_586e12();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_586e12();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_586e12();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl
new file mode 100644
index 0000000..4fdbd51
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn smoothstep(vec<3, f16>, vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn smoothstep_6e7a74() {
+  var res: vec3<f16> = smoothstep(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_6e7a74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_6e7a74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_6e7a74();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f1869c2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void smoothstep_6e7a74() {
+  vector<float16_t, 3> res = smoothstep((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_6e7a74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_6e7a74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_6e7a74();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9837ccc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void smoothstep_6e7a74() {
+  vector<float16_t, 3> res = smoothstep((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_6e7a74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_6e7a74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_6e7a74();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023CD6C4BC30(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl
new file mode 100644
index 0000000..12129b7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_6e7a74() {
+  f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  smoothstep_6e7a74();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void smoothstep_6e7a74() {
+  f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  smoothstep_6e7a74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_6e7a74() {
+  f16vec3 res = smoothstep(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  smoothstep_6e7a74();
+}
+
+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/smoothstep/6e7a74.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl
new file mode 100644
index 0000000..d90125c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_6e7a74() {
+  half3 res = smoothstep(half3(0.0h), half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  smoothstep_6e7a74();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  smoothstep_6e7a74();
+  return;
+}
+
+kernel void compute_main() {
+  smoothstep_6e7a74();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm
new file mode 100644
index 0000000..21d9c28
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %smoothstep_6e7a74 "smoothstep_6e7a74"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_6e7a74 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 SmoothStep %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %smoothstep_6e7a74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %smoothstep_6e7a74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %smoothstep_6e7a74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl
new file mode 100644
index 0000000..1a7ea0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/6e7a74.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn smoothstep_6e7a74() {
+  var res : vec3<f16> = smoothstep(vec3<f16>(f16()), vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_6e7a74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_6e7a74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_6e7a74();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl
new file mode 100644
index 0000000..e1de207
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn smoothstep(vec<4, f16>, vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn smoothstep_c43ebd() {
+  var res: vec4<f16> = smoothstep(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_c43ebd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_c43ebd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_c43ebd();
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e25a8cd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void smoothstep_c43ebd() {
+  vector<float16_t, 4> res = smoothstep((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_c43ebd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_c43ebd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_c43ebd();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..92388b8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void smoothstep_c43ebd() {
+  vector<float16_t, 4> res = smoothstep((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  smoothstep_c43ebd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  smoothstep_c43ebd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  smoothstep_c43ebd();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023328C496C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl
new file mode 100644
index 0000000..b67a5c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_c43ebd() {
+  f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  smoothstep_c43ebd();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void smoothstep_c43ebd() {
+  f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  smoothstep_c43ebd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void smoothstep_c43ebd() {
+  f16vec4 res = smoothstep(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  smoothstep_c43ebd();
+}
+
+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/smoothstep/c43ebd.wgsl.expected.msl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl
new file mode 100644
index 0000000..c7743d7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void smoothstep_c43ebd() {
+  half4 res = smoothstep(half4(0.0h), half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  smoothstep_c43ebd();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  smoothstep_c43ebd();
+  return;
+}
+
+kernel void compute_main() {
+  smoothstep_c43ebd();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm
new file mode 100644
index 0000000..9230951
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %smoothstep_c43ebd "smoothstep_c43ebd"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%smoothstep_c43ebd = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 SmoothStep %17 %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %smoothstep_c43ebd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %smoothstep_c43ebd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %smoothstep_c43ebd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl
new file mode 100644
index 0000000..1b6b725
--- /dev/null
+++ b/test/tint/builtins/gen/literal/smoothstep/c43ebd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn smoothstep_c43ebd() {
+  var res : vec4<f16> = smoothstep(vec4<f16>(f16()), vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  smoothstep_c43ebd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  smoothstep_c43ebd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  smoothstep_c43ebd();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl
new file mode 100644
index 0000000..019539d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sqrt(vec<4, f16>) -> vec<4, f16>
+fn sqrt_803d1c() {
+  var res: vec4<f16> = sqrt(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_803d1c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_803d1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_803d1c();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0b44b89
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sqrt_803d1c() {
+  vector<float16_t, 4> res = sqrt((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_803d1c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_803d1c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_803d1c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..56a2453
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sqrt_803d1c() {
+  vector<float16_t, 4> res = sqrt((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_803d1c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_803d1c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_803d1c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002342D12DCF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl
new file mode 100644
index 0000000..2b0c4f5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_803d1c() {
+  f16vec4 res = sqrt(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  sqrt_803d1c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sqrt_803d1c() {
+  f16vec4 res = sqrt(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  sqrt_803d1c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_803d1c() {
+  f16vec4 res = sqrt(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  sqrt_803d1c();
+}
+
+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/sqrt/803d1c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl
new file mode 100644
index 0000000..c85c1ae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_803d1c() {
+  half4 res = sqrt(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sqrt_803d1c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sqrt_803d1c();
+  return;
+}
+
+kernel void compute_main() {
+  sqrt_803d1c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm
new file mode 100644
index 0000000..3204761
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sqrt_803d1c "sqrt_803d1c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_803d1c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Sqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sqrt_803d1c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sqrt_803d1c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sqrt_803d1c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl
new file mode 100644
index 0000000..3361e60
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/803d1c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sqrt_803d1c() {
+  var res : vec4<f16> = sqrt(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_803d1c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_803d1c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_803d1c();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl
new file mode 100644
index 0000000..7bdb02f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sqrt(vec<3, f16>) -> vec<3, f16>
+fn sqrt_895a0c() {
+  var res: vec3<f16> = sqrt(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_895a0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_895a0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_895a0c();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3ce6e95
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sqrt_895a0c() {
+  vector<float16_t, 3> res = sqrt((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_895a0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_895a0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_895a0c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8d0d057
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sqrt_895a0c() {
+  vector<float16_t, 3> res = sqrt((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_895a0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_895a0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_895a0c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FD1487D710(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl
new file mode 100644
index 0000000..d0cedab
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_895a0c() {
+  f16vec3 res = sqrt(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  sqrt_895a0c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sqrt_895a0c() {
+  f16vec3 res = sqrt(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  sqrt_895a0c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_895a0c() {
+  f16vec3 res = sqrt(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  sqrt_895a0c();
+}
+
+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/sqrt/895a0c.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl
new file mode 100644
index 0000000..72be3e1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_895a0c() {
+  half3 res = sqrt(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sqrt_895a0c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sqrt_895a0c();
+  return;
+}
+
+kernel void compute_main() {
+  sqrt_895a0c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm
new file mode 100644
index 0000000..bcc0768
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sqrt_895a0c "sqrt_895a0c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_895a0c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Sqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sqrt_895a0c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sqrt_895a0c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sqrt_895a0c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl
new file mode 100644
index 0000000..44c3686
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/895a0c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sqrt_895a0c() {
+  var res : vec3<f16> = sqrt(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_895a0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_895a0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_895a0c();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl
new file mode 100644
index 0000000..4158a6f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sqrt(vec<2, f16>) -> vec<2, f16>
+fn sqrt_d9ab4d() {
+  var res: vec2<f16> = sqrt(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_d9ab4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_d9ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_d9ab4d();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dc9426f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sqrt_d9ab4d() {
+  vector<float16_t, 2> res = sqrt((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_d9ab4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_d9ab4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_d9ab4d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a2088d6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void sqrt_d9ab4d() {
+  vector<float16_t, 2> res = sqrt((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_d9ab4d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_d9ab4d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_d9ab4d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000256F2C5EAF0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl
new file mode 100644
index 0000000..8a12e8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_d9ab4d() {
+  f16vec2 res = sqrt(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  sqrt_d9ab4d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sqrt_d9ab4d() {
+  f16vec2 res = sqrt(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  sqrt_d9ab4d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_d9ab4d() {
+  f16vec2 res = sqrt(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  sqrt_d9ab4d();
+}
+
+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/sqrt/d9ab4d.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl
new file mode 100644
index 0000000..d64d5a1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_d9ab4d() {
+  half2 res = sqrt(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sqrt_d9ab4d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sqrt_d9ab4d();
+  return;
+}
+
+kernel void compute_main() {
+  sqrt_d9ab4d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm
new file mode 100644
index 0000000..d18a251
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %sqrt_d9ab4d "sqrt_d9ab4d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_d9ab4d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Sqrt %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %sqrt_d9ab4d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %sqrt_d9ab4d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %sqrt_d9ab4d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl
new file mode 100644
index 0000000..ccda9f1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/d9ab4d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sqrt_d9ab4d() {
+  var res : vec2<f16> = sqrt(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_d9ab4d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_d9ab4d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_d9ab4d();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl
new file mode 100644
index 0000000..4dc19b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn sqrt(f16) -> f16
+fn sqrt_ec33e9() {
+  var res: f16 = sqrt(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_ec33e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_ec33e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_ec33e9();
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c76014e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void sqrt_ec33e9() {
+  float16_t res = sqrt(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_ec33e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_ec33e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_ec33e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..71be999
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void sqrt_ec33e9() {
+  float16_t res = sqrt(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  sqrt_ec33e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  sqrt_ec33e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  sqrt_ec33e9();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001C2CF8D7D20(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl
new file mode 100644
index 0000000..89b0d09
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_ec33e9() {
+  float16_t res = sqrt(0.0hf);
+}
+
+vec4 vertex_main() {
+  sqrt_ec33e9();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void sqrt_ec33e9() {
+  float16_t res = sqrt(0.0hf);
+}
+
+void fragment_main() {
+  sqrt_ec33e9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void sqrt_ec33e9() {
+  float16_t res = sqrt(0.0hf);
+}
+
+void compute_main() {
+  sqrt_ec33e9();
+}
+
+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/sqrt/ec33e9.wgsl.expected.msl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl
new file mode 100644
index 0000000..bfd3d49
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void sqrt_ec33e9() {
+  half res = sqrt(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  sqrt_ec33e9();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  sqrt_ec33e9();
+  return;
+}
+
+kernel void compute_main() {
+  sqrt_ec33e9();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..a39a404
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %sqrt_ec33e9 "sqrt_ec33e9"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%sqrt_ec33e9 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Sqrt %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %sqrt_ec33e9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %sqrt_ec33e9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %sqrt_ec33e9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..5145314
--- /dev/null
+++ b/test/tint/builtins/gen/literal/sqrt/ec33e9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn sqrt_ec33e9() {
+  var res : f16 = sqrt(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  sqrt_ec33e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  sqrt_ec33e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  sqrt_ec33e9();
+}
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl
new file mode 100644
index 0000000..2baa12b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn step(vec<2, f16>, vec<2, f16>) -> vec<2, f16>
+fn step_07cb06() {
+  var res: vec2<f16> = step(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_07cb06();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_07cb06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_07cb06();
+}
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae74c4e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void step_07cb06() {
+  vector<float16_t, 2> res = step((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_07cb06();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_07cb06();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_07cb06();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9be8957
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void step_07cb06() {
+  vector<float16_t, 2> res = step((float16_t(0.0h)).xx, (float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_07cb06();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_07cb06();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_07cb06();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000190D7A566C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.glsl
new file mode 100644
index 0000000..fd5c470
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_07cb06() {
+  f16vec2 res = step(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  step_07cb06();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void step_07cb06() {
+  f16vec2 res = step(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  step_07cb06();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_07cb06() {
+  f16vec2 res = step(f16vec2(0.0hf), f16vec2(0.0hf));
+}
+
+void compute_main() {
+  step_07cb06();
+}
+
+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/step/07cb06.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.msl
new file mode 100644
index 0000000..aa04803
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_07cb06() {
+  half2 res = step(half2(0.0h), half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  step_07cb06();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  step_07cb06();
+  return;
+}
+
+kernel void compute_main() {
+  step_07cb06();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.spvasm
new file mode 100644
index 0000000..d73eed8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %step_07cb06 "step_07cb06"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_07cb06 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Step %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %step_07cb06
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %step_07cb06
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %step_07cb06
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl
new file mode 100644
index 0000000..4ebf853
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/07cb06.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn step_07cb06() {
+  var res : vec2<f16> = step(vec2<f16>(f16()), vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_07cb06();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_07cb06();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_07cb06();
+}
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl b/test/tint/builtins/gen/literal/step/630d07.wgsl
new file mode 100644
index 0000000..b789a99
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn step(f16, f16) -> f16
+fn step_630d07() {
+  var res: f16 = step(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_630d07();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_630d07();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_630d07();
+}
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0839e00
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void step_630d07() {
+  float16_t res = step(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_630d07();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_630d07();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_630d07();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..634d34b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void step_630d07() {
+  float16_t res = step(float16_t(0.0h), float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_630d07();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_630d07();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_630d07();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EFB6F7D2D0(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.glsl
new file mode 100644
index 0000000..7ddbf13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_630d07() {
+  float16_t res = step(0.0hf, 0.0hf);
+}
+
+vec4 vertex_main() {
+  step_630d07();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void step_630d07() {
+  float16_t res = step(0.0hf, 0.0hf);
+}
+
+void fragment_main() {
+  step_630d07();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_630d07() {
+  float16_t res = step(0.0hf, 0.0hf);
+}
+
+void compute_main() {
+  step_630d07();
+}
+
+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/step/630d07.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.msl
new file mode 100644
index 0000000..ef616cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_630d07() {
+  half res = step(0.0h, 0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  step_630d07();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  step_630d07();
+  return;
+}
+
+kernel void compute_main() {
+  step_630d07();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.spvasm
new file mode 100644
index 0000000..5783a90
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %step_630d07 "step_630d07"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_630d07 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Step %16 %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %step_630d07
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %step_630d07
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %step_630d07
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a0527d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/630d07.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn step_630d07() {
+  var res : f16 = step(f16(), f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_630d07();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_630d07();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_630d07();
+}
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl b/test/tint/builtins/gen/literal/step/baa320.wgsl
new file mode 100644
index 0000000..b2e66b0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn step(vec<4, f16>, vec<4, f16>) -> vec<4, f16>
+fn step_baa320() {
+  var res: vec4<f16> = step(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_baa320();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_baa320();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_baa320();
+}
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f5992e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void step_baa320() {
+  vector<float16_t, 4> res = step((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_baa320();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_baa320();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_baa320();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a394391
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void step_baa320() {
+  vector<float16_t, 4> res = step((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_baa320();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_baa320();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_baa320();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000023DD42966C0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.glsl
new file mode 100644
index 0000000..37f8212
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_baa320() {
+  f16vec4 res = step(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  step_baa320();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void step_baa320() {
+  f16vec4 res = step(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  step_baa320();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_baa320() {
+  f16vec4 res = step(f16vec4(0.0hf), f16vec4(0.0hf));
+}
+
+void compute_main() {
+  step_baa320();
+}
+
+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/step/baa320.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.msl
new file mode 100644
index 0000000..ea8bc33
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_baa320() {
+  half4 res = step(half4(0.0h), half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  step_baa320();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  step_baa320();
+  return;
+}
+
+kernel void compute_main() {
+  step_baa320();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.spvasm
new file mode 100644
index 0000000..492cd3f7
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %step_baa320 "step_baa320"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_baa320 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Step %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %step_baa320
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %step_baa320
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %step_baa320
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl
new file mode 100644
index 0000000..c500a65
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/baa320.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn step_baa320() {
+  var res : vec4<f16> = step(vec4<f16>(f16()), vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_baa320();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_baa320();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_baa320();
+}
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl
new file mode 100644
index 0000000..77da1c9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn step(vec<3, f16>, vec<3, f16>) -> vec<3, f16>
+fn step_cc6b61() {
+  var res: vec3<f16> = step(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_cc6b61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_cc6b61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_cc6b61();
+}
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d4a6c36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void step_cc6b61() {
+  vector<float16_t, 3> res = step((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_cc6b61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_cc6b61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_cc6b61();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..00514c5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void step_cc6b61() {
+  vector<float16_t, 3> res = step((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  step_cc6b61();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  step_cc6b61();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  step_cc6b61();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015E30CB9FC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.glsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.glsl
new file mode 100644
index 0000000..0cb5d43
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_cc6b61() {
+  f16vec3 res = step(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  step_cc6b61();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void step_cc6b61() {
+  f16vec3 res = step(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  step_cc6b61();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void step_cc6b61() {
+  f16vec3 res = step(f16vec3(0.0hf), f16vec3(0.0hf));
+}
+
+void compute_main() {
+  step_cc6b61();
+}
+
+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/step/cc6b61.wgsl.expected.msl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.msl
new file mode 100644
index 0000000..4e65712
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void step_cc6b61() {
+  half3 res = step(half3(0.0h), half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  step_cc6b61();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  step_cc6b61();
+  return;
+}
+
+kernel void compute_main() {
+  step_cc6b61();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.spvasm
new file mode 100644
index 0000000..8e2e6b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %step_cc6b61 "step_cc6b61"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%step_cc6b61 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Step %17 %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %step_cc6b61
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %step_cc6b61
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %step_cc6b61
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1d9624
--- /dev/null
+++ b/test/tint/builtins/gen/literal/step/cc6b61.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn step_cc6b61() {
+  var res : vec3<f16> = step(vec3<f16>(f16()), vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  step_cc6b61();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  step_cc6b61();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  step_cc6b61();
+}
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl
new file mode 100644
index 0000000..912e7b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tan(vec<4, f16>) -> vec<4, f16>
+fn tan_539e54() {
+  var res: vec4<f16> = tan(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_539e54();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_539e54();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_539e54();
+}
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aa87efc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tan_539e54() {
+  vector<float16_t, 4> res = tan((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_539e54();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_539e54();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_539e54();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ec31619
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tan_539e54() {
+  vector<float16_t, 4> res = tan((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_539e54();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_539e54();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_539e54();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002A069448210(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl
new file mode 100644
index 0000000..8c94127
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_539e54() {
+  f16vec4 res = tan(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  tan_539e54();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tan_539e54() {
+  f16vec4 res = tan(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  tan_539e54();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_539e54() {
+  f16vec4 res = tan(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  tan_539e54();
+}
+
+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/tan/539e54.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl
new file mode 100644
index 0000000..268bfda
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_539e54() {
+  half4 res = tan(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tan_539e54();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tan_539e54();
+  return;
+}
+
+kernel void compute_main() {
+  tan_539e54();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm
new file mode 100644
index 0000000..12de658
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tan_539e54 "tan_539e54"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_539e54 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Tan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tan_539e54
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tan_539e54
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tan_539e54
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl
new file mode 100644
index 0000000..91e3dfd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/539e54.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tan_539e54() {
+  var res : vec4<f16> = tan(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_539e54();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_539e54();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_539e54();
+}
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl
new file mode 100644
index 0000000..1ff6156
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tan(vec<2, f16>) -> vec<2, f16>
+fn tan_9f7c9c() {
+  var res: vec2<f16> = tan(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_9f7c9c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_9f7c9c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_9f7c9c();
+}
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bac1555
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tan_9f7c9c() {
+  vector<float16_t, 2> res = tan((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_9f7c9c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_9f7c9c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_9f7c9c();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..63c3d76
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tan_9f7c9c() {
+  vector<float16_t, 2> res = tan((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_9f7c9c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_9f7c9c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_9f7c9c();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000211853A84A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl
new file mode 100644
index 0000000..2b07fc4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_9f7c9c() {
+  f16vec2 res = tan(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  tan_9f7c9c();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tan_9f7c9c() {
+  f16vec2 res = tan(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  tan_9f7c9c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_9f7c9c() {
+  f16vec2 res = tan(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  tan_9f7c9c();
+}
+
+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/tan/9f7c9c.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl
new file mode 100644
index 0000000..ff408ad
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_9f7c9c() {
+  half2 res = tan(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tan_9f7c9c();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tan_9f7c9c();
+  return;
+}
+
+kernel void compute_main() {
+  tan_9f7c9c();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm
new file mode 100644
index 0000000..658d6a6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tan_9f7c9c "tan_9f7c9c"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_9f7c9c = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Tan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tan_9f7c9c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tan_9f7c9c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tan_9f7c9c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl
new file mode 100644
index 0000000..1287e05
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/9f7c9c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tan_9f7c9c() {
+  var res : vec2<f16> = tan(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_9f7c9c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_9f7c9c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_9f7c9c();
+}
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl
new file mode 100644
index 0000000..c76db2d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tan(f16) -> f16
+fn tan_d4d491() {
+  var res: f16 = tan(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_d4d491();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_d4d491();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_d4d491();
+}
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a4be323
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tan_d4d491() {
+  float16_t res = tan(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_d4d491();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_d4d491();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_d4d491();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2057021
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void tan_d4d491() {
+  float16_t res = tan(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_d4d491();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_d4d491();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_d4d491();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001FE0D3A0520(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl
new file mode 100644
index 0000000..e6a73c8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_d4d491() {
+  float16_t res = tan(0.0hf);
+}
+
+vec4 vertex_main() {
+  tan_d4d491();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tan_d4d491() {
+  float16_t res = tan(0.0hf);
+}
+
+void fragment_main() {
+  tan_d4d491();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_d4d491() {
+  float16_t res = tan(0.0hf);
+}
+
+void compute_main() {
+  tan_d4d491();
+}
+
+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/tan/d4d491.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl
new file mode 100644
index 0000000..3dc2e14
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_d4d491() {
+  half res = tan(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tan_d4d491();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tan_d4d491();
+  return;
+}
+
+kernel void compute_main() {
+  tan_d4d491();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm
new file mode 100644
index 0000000..661dd9a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %tan_d4d491 "tan_d4d491"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_d4d491 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Tan %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %tan_d4d491
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %tan_d4d491
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %tan_d4d491
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl
new file mode 100644
index 0000000..da8f919
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/d4d491.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tan_d4d491() {
+  var res : f16 = tan(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_d4d491();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_d4d491();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_d4d491();
+}
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl
new file mode 100644
index 0000000..9d70504
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tan(vec<3, f16>) -> vec<3, f16>
+fn tan_db0456() {
+  var res: vec3<f16> = tan(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_db0456();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_db0456();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_db0456();
+}
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2253d71
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tan_db0456() {
+  vector<float16_t, 3> res = tan((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_db0456();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_db0456();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_db0456();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d84a308
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tan_db0456() {
+  vector<float16_t, 3> res = tan((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tan_db0456();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tan_db0456();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tan_db0456();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001B50B7A7080(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl
new file mode 100644
index 0000000..4812d1b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_db0456() {
+  f16vec3 res = tan(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  tan_db0456();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tan_db0456() {
+  f16vec3 res = tan(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  tan_db0456();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tan_db0456() {
+  f16vec3 res = tan(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  tan_db0456();
+}
+
+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/tan/db0456.wgsl.expected.msl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl
new file mode 100644
index 0000000..3d87665
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tan_db0456() {
+  half3 res = tan(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tan_db0456();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tan_db0456();
+  return;
+}
+
+kernel void compute_main() {
+  tan_db0456();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm
new file mode 100644
index 0000000..2f1c402
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tan_db0456 "tan_db0456"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+ %tan_db0456 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Tan %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tan_db0456
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tan_db0456
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tan_db0456
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl
new file mode 100644
index 0000000..dc68ad2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tan/db0456.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tan_db0456() {
+  var res : vec3<f16> = tan(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tan_db0456();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tan_db0456();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tan_db0456();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl
new file mode 100644
index 0000000..a02fef4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tanh(vec<3, f16>) -> vec<3, f16>
+fn tanh_06a4fe() {
+  var res: vec3<f16> = tanh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_06a4fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_06a4fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_06a4fe();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fb193b2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tanh_06a4fe() {
+  vector<float16_t, 3> res = tanh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_06a4fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_06a4fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_06a4fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..34fa18b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tanh_06a4fe() {
+  vector<float16_t, 3> res = tanh((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_06a4fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_06a4fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_06a4fe();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000025833A77D70(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl
new file mode 100644
index 0000000..0840a2c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_06a4fe() {
+  f16vec3 res = tanh(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  tanh_06a4fe();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tanh_06a4fe() {
+  f16vec3 res = tanh(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  tanh_06a4fe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_06a4fe() {
+  f16vec3 res = tanh(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  tanh_06a4fe();
+}
+
+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/tanh/06a4fe.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl
new file mode 100644
index 0000000..ae1bf02
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_06a4fe() {
+  half3 res = tanh(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tanh_06a4fe();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tanh_06a4fe();
+  return;
+}
+
+kernel void compute_main() {
+  tanh_06a4fe();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..b06c654
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tanh_06a4fe "tanh_06a4fe"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_06a4fe = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Tanh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tanh_06a4fe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tanh_06a4fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tanh_06a4fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..fde59a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/06a4fe.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tanh_06a4fe() {
+  var res : vec3<f16> = tanh(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_06a4fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_06a4fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_06a4fe();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl
new file mode 100644
index 0000000..b83daae
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tanh(f16) -> f16
+fn tanh_5b19af() {
+  var res: f16 = tanh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_5b19af();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_5b19af();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_5b19af();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9d2dee6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tanh_5b19af() {
+  float16_t res = tanh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_5b19af();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_5b19af();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_5b19af();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..de2732f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void tanh_5b19af() {
+  float16_t res = tanh(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_5b19af();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_5b19af();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_5b19af();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000016C55EB1160(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl
new file mode 100644
index 0000000..b909cb9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_5b19af() {
+  float16_t res = tanh(0.0hf);
+}
+
+vec4 vertex_main() {
+  tanh_5b19af();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tanh_5b19af() {
+  float16_t res = tanh(0.0hf);
+}
+
+void fragment_main() {
+  tanh_5b19af();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_5b19af() {
+  float16_t res = tanh(0.0hf);
+}
+
+void compute_main() {
+  tanh_5b19af();
+}
+
+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/tanh/5b19af.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl
new file mode 100644
index 0000000..a012294
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_5b19af() {
+  half res = tanh(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tanh_5b19af();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tanh_5b19af();
+  return;
+}
+
+kernel void compute_main() {
+  tanh_5b19af();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm
new file mode 100644
index 0000000..db2580f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %tanh_5b19af "tanh_5b19af"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_5b19af = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Tanh %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %tanh_5b19af
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %tanh_5b19af
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %tanh_5b19af
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl
new file mode 100644
index 0000000..a2e4217
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/5b19af.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tanh_5b19af() {
+  var res : f16 = tanh(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_5b19af();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_5b19af();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_5b19af();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl
new file mode 100644
index 0000000..acd3e21
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tanh(vec<2, f16>) -> vec<2, f16>
+fn tanh_6d105a() {
+  var res: vec2<f16> = tanh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_6d105a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_6d105a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_6d105a();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9a1b417
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tanh_6d105a() {
+  vector<float16_t, 2> res = tanh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_6d105a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_6d105a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_6d105a();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fce0b80
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tanh_6d105a() {
+  vector<float16_t, 2> res = tanh((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_6d105a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_6d105a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_6d105a();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000015291DA1160(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl
new file mode 100644
index 0000000..f5aa9d4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_6d105a() {
+  f16vec2 res = tanh(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  tanh_6d105a();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tanh_6d105a() {
+  f16vec2 res = tanh(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  tanh_6d105a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_6d105a() {
+  f16vec2 res = tanh(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  tanh_6d105a();
+}
+
+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/tanh/6d105a.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl
new file mode 100644
index 0000000..b9795af
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_6d105a() {
+  half2 res = tanh(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tanh_6d105a();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tanh_6d105a();
+  return;
+}
+
+kernel void compute_main() {
+  tanh_6d105a();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm
new file mode 100644
index 0000000..101dbc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tanh_6d105a "tanh_6d105a"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_6d105a = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Tanh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tanh_6d105a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tanh_6d105a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tanh_6d105a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl
new file mode 100644
index 0000000..9b0b089
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/6d105a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tanh_6d105a() {
+  var res : vec2<f16> = tanh(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_6d105a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_6d105a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_6d105a();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl
new file mode 100644
index 0000000..c0579cc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn tanh(vec<4, f16>) -> vec<4, f16>
+fn tanh_e8efb3() {
+  var res: vec4<f16> = tanh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_e8efb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_e8efb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_e8efb3();
+}
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..547e3c1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void tanh_e8efb3() {
+  vector<float16_t, 4> res = tanh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_e8efb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_e8efb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_e8efb3();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cc5d017
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void tanh_e8efb3() {
+  vector<float16_t, 4> res = tanh((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  tanh_e8efb3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  tanh_e8efb3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  tanh_e8efb3();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E87C8DF490(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl
new file mode 100644
index 0000000..7d9bf91
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_e8efb3() {
+  f16vec4 res = tanh(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  tanh_e8efb3();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void tanh_e8efb3() {
+  f16vec4 res = tanh(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  tanh_e8efb3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void tanh_e8efb3() {
+  f16vec4 res = tanh(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  tanh_e8efb3();
+}
+
+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/tanh/e8efb3.wgsl.expected.msl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl
new file mode 100644
index 0000000..7da14aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void tanh_e8efb3() {
+  half4 res = tanh(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  tanh_e8efb3();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  tanh_e8efb3();
+  return;
+}
+
+kernel void compute_main() {
+  tanh_e8efb3();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm
new file mode 100644
index 0000000..4b18be4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %tanh_e8efb3 "tanh_e8efb3"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%tanh_e8efb3 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Tanh %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %tanh_e8efb3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %tanh_e8efb3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %tanh_e8efb3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl
new file mode 100644
index 0000000..5cde1f8
--- /dev/null
+++ b/test/tint/builtins/gen/literal/tanh/e8efb3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn tanh_e8efb3() {
+  var res : vec4<f16> = tanh(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  tanh_e8efb3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  tanh_e8efb3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  tanh_e8efb3();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl
new file mode 100644
index 0000000..a413e2b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<3, 3, f16>) -> mat<3, 3, f16>
+fn transpose_06794e() {
+  var res: mat3x3<f16> = transpose(mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_06794e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_06794e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_06794e();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..134ef42
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_06794e() {
+  matrix<float16_t, 3, 3> res = transpose(matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_06794e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_06794e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_06794e();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2e4508d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_06794e() {
+  matrix<float16_t, 3, 3> res = transpose(matrix<float16_t, 3, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_06794e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_06794e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_06794e();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000204EECC7200(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl
new file mode 100644
index 0000000..045b737
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_06794e() {
+  f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_06794e();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_06794e() {
+  f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_06794e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_06794e() {
+  f16mat3 res = transpose(f16mat3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void compute_main() {
+  transpose_06794e();
+}
+
+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/transpose/06794e.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl
new file mode 100644
index 0000000..e698039
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_06794e() {
+  half3x3 res = transpose(half3x3(half3(0.0h), half3(0.0h), half3(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_06794e();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_06794e();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_06794e();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm
new file mode 100644
index 0000000..26c14aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_06794e "transpose_06794e"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+ %mat3v3half = OpTypeMatrix %v3half 3
+         %17 = OpConstantNull %mat3v3half
+%_ptr_Function_mat3v3half = OpTypePointer Function %mat3v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_06794e = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat3v3half Function %17
+         %13 = OpTranspose %mat3v3half %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %transpose_06794e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %transpose_06794e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_06794e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl
new file mode 100644
index 0000000..ac99ba2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/06794e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_06794e() {
+  var res : mat3x3<f16> = transpose(mat3x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_06794e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_06794e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_06794e();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl
new file mode 100644
index 0000000..dd1c459
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<4, 2, f16>) -> mat<2, 4, f16>
+fn transpose_5edd96() {
+  var res: mat2x4<f16> = transpose(mat4x2<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_5edd96();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_5edd96();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_5edd96();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1f253b9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_5edd96() {
+  matrix<float16_t, 2, 4> res = transpose(matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_5edd96();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_5edd96();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_5edd96();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f8832f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_5edd96() {
+  matrix<float16_t, 2, 4> res = transpose(matrix<float16_t, 4, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_5edd96();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_5edd96();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_5edd96();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000292A0E96D40(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl
new file mode 100644
index 0000000..48b8ac1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5edd96() {
+  f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_5edd96();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_5edd96() {
+  f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_5edd96();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5edd96() {
+  f16mat2x4 res = transpose(f16mat4x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void compute_main() {
+  transpose_5edd96();
+}
+
+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/transpose/5edd96.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl
new file mode 100644
index 0000000..09cffcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_5edd96() {
+  half2x4 res = transpose(half4x2(half2(0.0h), half2(0.0h), half2(0.0h), half2(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_5edd96();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_5edd96();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_5edd96();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm
new file mode 100644
index 0000000..07e8594
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_5edd96 "transpose_5edd96"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+ %mat2v4half = OpTypeMatrix %v4half 2
+     %v2half = OpTypeVector %half 2
+ %mat4v2half = OpTypeMatrix %v2half 4
+         %19 = OpConstantNull %mat4v2half
+%_ptr_Function_mat2v4half = OpTypePointer Function %mat2v4half
+         %22 = OpConstantNull %mat2v4half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_5edd96 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat2v4half Function %22
+         %13 = OpTranspose %mat2v4half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_5edd96
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_5edd96
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_5edd96
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl
new file mode 100644
index 0000000..aaf9fbf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5edd96.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_5edd96() {
+  var res : mat2x4<f16> = transpose(mat4x2<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_5edd96();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_5edd96();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_5edd96();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl
new file mode 100644
index 0000000..47e4c77
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<4, 3, f16>) -> mat<3, 4, f16>
+fn transpose_5f36bf() {
+  var res: mat3x4<f16> = transpose(mat4x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_5f36bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_5f36bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_5f36bf();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b518924
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_5f36bf() {
+  matrix<float16_t, 3, 4> res = transpose(matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_5f36bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_5f36bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_5f36bf();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cc78b8f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_5f36bf() {
+  matrix<float16_t, 3, 4> res = transpose(matrix<float16_t, 4, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_5f36bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_5f36bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_5f36bf();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000237E1607910(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl
new file mode 100644
index 0000000..bc4a794
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5f36bf() {
+  f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_5f36bf();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_5f36bf() {
+  f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_5f36bf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_5f36bf() {
+  f16mat3x4 res = transpose(f16mat4x3(f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void compute_main() {
+  transpose_5f36bf();
+}
+
+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/transpose/5f36bf.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl
new file mode 100644
index 0000000..d931f01
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_5f36bf() {
+  half3x4 res = transpose(half4x3(half3(0.0h), half3(0.0h), half3(0.0h), half3(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_5f36bf();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_5f36bf();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_5f36bf();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm
new file mode 100644
index 0000000..c9e6ffa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_5f36bf "transpose_5f36bf"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+ %mat3v4half = OpTypeMatrix %v4half 3
+     %v3half = OpTypeVector %half 3
+ %mat4v3half = OpTypeMatrix %v3half 4
+         %19 = OpConstantNull %mat4v3half
+%_ptr_Function_mat3v4half = OpTypePointer Function %mat3v4half
+         %22 = OpConstantNull %mat3v4half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_5f36bf = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat3v4half Function %22
+         %13 = OpTranspose %mat3v4half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_5f36bf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_5f36bf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_5f36bf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl
new file mode 100644
index 0000000..878b15a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/5f36bf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_5f36bf() {
+  var res : mat3x4<f16> = transpose(mat4x3<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_5f36bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_5f36bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_5f36bf();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl
new file mode 100644
index 0000000..5a59b3b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<2, 2, f16>) -> mat<2, 2, f16>
+fn transpose_7be8b2() {
+  var res: mat2x2<f16> = transpose(mat2x2<f16>(f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_7be8b2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_7be8b2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_7be8b2();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e72e2d0
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_7be8b2() {
+  matrix<float16_t, 2, 2> res = transpose(matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_7be8b2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_7be8b2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_7be8b2();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a45d63b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_7be8b2() {
+  matrix<float16_t, 2, 2> res = transpose(matrix<float16_t, 2, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_7be8b2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_7be8b2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_7be8b2();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001EDDB33C1F0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl
new file mode 100644
index 0000000..44cafb6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_7be8b2() {
+  f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_7be8b2();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_7be8b2() {
+  f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_7be8b2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_7be8b2() {
+  f16mat2 res = transpose(f16mat2(f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void compute_main() {
+  transpose_7be8b2();
+}
+
+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/transpose/7be8b2.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl
new file mode 100644
index 0000000..435d12f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_7be8b2() {
+  half2x2 res = transpose(half2x2(half2(0.0h), half2(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_7be8b2();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_7be8b2();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_7be8b2();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm
new file mode 100644
index 0000000..7575dca
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_7be8b2 "transpose_7be8b2"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+ %mat2v2half = OpTypeMatrix %v2half 2
+         %17 = OpConstantNull %mat2v2half
+%_ptr_Function_mat2v2half = OpTypePointer Function %mat2v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_7be8b2 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat2v2half Function %17
+         %13 = OpTranspose %mat2v2half %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %transpose_7be8b2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %transpose_7be8b2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_7be8b2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl
new file mode 100644
index 0000000..437f1ce
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/7be8b2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_7be8b2() {
+  var res : mat2x2<f16> = transpose(mat2x2<f16>(f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_7be8b2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_7be8b2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_7be8b2();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl
new file mode 100644
index 0000000..870582b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<4, 4, f16>) -> mat<4, 4, f16>
+fn transpose_844869() {
+  var res: mat4x4<f16> = transpose(mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_844869();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_844869();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_844869();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0ad869b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_844869() {
+  matrix<float16_t, 4, 4> res = transpose(matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_844869();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_844869();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_844869();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ec91e0b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_844869() {
+  matrix<float16_t, 4, 4> res = transpose(matrix<float16_t, 4, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_844869();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_844869();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_844869();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001F000A07970(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl
new file mode 100644
index 0000000..a244d66
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_844869() {
+  f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_844869();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_844869() {
+  f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_844869();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_844869() {
+  f16mat4 res = transpose(f16mat4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void compute_main() {
+  transpose_844869();
+}
+
+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/transpose/844869.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl
new file mode 100644
index 0000000..b02ce13
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_844869() {
+  half4x4 res = transpose(half4x4(half4(0.0h), half4(0.0h), half4(0.0h), half4(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_844869();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_844869();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_844869();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm
new file mode 100644
index 0000000..8308419
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_844869 "transpose_844869"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+ %mat4v4half = OpTypeMatrix %v4half 4
+         %17 = OpConstantNull %mat4v4half
+%_ptr_Function_mat4v4half = OpTypePointer Function %mat4v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_844869 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat4v4half Function %17
+         %13 = OpTranspose %mat4v4half %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %transpose_844869
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %transpose_844869
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_844869
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl
new file mode 100644
index 0000000..b917ed4
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/844869.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_844869() {
+  var res : mat4x4<f16> = transpose(mat4x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_844869();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_844869();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_844869();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl
new file mode 100644
index 0000000..e792547
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<3, 4, f16>) -> mat<4, 3, f16>
+fn transpose_8c06ce() {
+  var res: mat4x3<f16> = transpose(mat3x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_8c06ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_8c06ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_8c06ce();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7962142
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_8c06ce() {
+  matrix<float16_t, 4, 3> res = transpose(matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_8c06ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_8c06ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_8c06ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7a4521b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_8c06ce() {
+  matrix<float16_t, 4, 3> res = transpose(matrix<float16_t, 3, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_8c06ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_8c06ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_8c06ce();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000028A648373A0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl
new file mode 100644
index 0000000..77ffe38
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_8c06ce() {
+  f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_8c06ce();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_8c06ce() {
+  f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_8c06ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_8c06ce() {
+  f16mat4x3 res = transpose(f16mat3x4(f16vec4(0.0hf), f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void compute_main() {
+  transpose_8c06ce();
+}
+
+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/transpose/8c06ce.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl
new file mode 100644
index 0000000..dd48f03
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_8c06ce() {
+  half4x3 res = transpose(half3x4(half4(0.0h), half4(0.0h), half4(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_8c06ce();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_8c06ce();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_8c06ce();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..04c004e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_8c06ce "transpose_8c06ce"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+ %mat4v3half = OpTypeMatrix %v3half 4
+     %v4half = OpTypeVector %half 4
+ %mat3v4half = OpTypeMatrix %v4half 3
+         %19 = OpConstantNull %mat3v4half
+%_ptr_Function_mat4v3half = OpTypePointer Function %mat4v3half
+         %22 = OpConstantNull %mat4v3half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_8c06ce = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat4v3half Function %22
+         %13 = OpTranspose %mat4v3half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_8c06ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_8c06ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_8c06ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..09d0c25
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/8c06ce.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_8c06ce() {
+  var res : mat4x3<f16> = transpose(mat3x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_8c06ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_8c06ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_8c06ce();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl
new file mode 100644
index 0000000..7be77d2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<3, 2, f16>) -> mat<2, 3, f16>
+fn transpose_b9ad1f() {
+  var res: mat2x3<f16> = transpose(mat3x2<f16>(f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_b9ad1f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_b9ad1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_b9ad1f();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97e3dcb
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_b9ad1f() {
+  matrix<float16_t, 2, 3> res = transpose(matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_b9ad1f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_b9ad1f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_b9ad1f();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..dd484fc
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_b9ad1f() {
+  matrix<float16_t, 2, 3> res = transpose(matrix<float16_t, 3, 2>((float16_t(0.0h)).xx, (float16_t(0.0h)).xx, (float16_t(0.0h)).xx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_b9ad1f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_b9ad1f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_b9ad1f();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000001E12EBEEBC0(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl
new file mode 100644
index 0000000..f549a0d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_b9ad1f() {
+  f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_b9ad1f();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_b9ad1f() {
+  f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_b9ad1f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_b9ad1f() {
+  f16mat2x3 res = transpose(f16mat3x2(f16vec2(0.0hf), f16vec2(0.0hf), f16vec2(0.0hf)));
+}
+
+void compute_main() {
+  transpose_b9ad1f();
+}
+
+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/transpose/b9ad1f.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl
new file mode 100644
index 0000000..6fc6f1d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_b9ad1f() {
+  half2x3 res = transpose(half3x2(half2(0.0h), half2(0.0h), half2(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_b9ad1f();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_b9ad1f();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_b9ad1f();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm
new file mode 100644
index 0000000..c3ed30e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_b9ad1f "transpose_b9ad1f"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+ %mat2v3half = OpTypeMatrix %v3half 2
+     %v2half = OpTypeVector %half 2
+ %mat3v2half = OpTypeMatrix %v2half 3
+         %19 = OpConstantNull %mat3v2half
+%_ptr_Function_mat2v3half = OpTypePointer Function %mat2v3half
+         %22 = OpConstantNull %mat2v3half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_b9ad1f = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat2v3half Function %22
+         %13 = OpTranspose %mat2v3half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_b9ad1f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_b9ad1f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_b9ad1f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl
new file mode 100644
index 0000000..49ee3fa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/b9ad1f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_b9ad1f() {
+  var res : mat2x3<f16> = transpose(mat3x2<f16>(f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_b9ad1f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_b9ad1f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_b9ad1f();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl
new file mode 100644
index 0000000..4375de3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<2, 3, f16>) -> mat<3, 2, f16>
+fn transpose_d6faec() {
+  var res: mat3x2<f16> = transpose(mat2x3<f16>(f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_d6faec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_d6faec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_d6faec();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4ab9a4a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_d6faec() {
+  matrix<float16_t, 3, 2> res = transpose(matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_d6faec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_d6faec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_d6faec();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0fdbfb1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_d6faec() {
+  matrix<float16_t, 3, 2> res = transpose(matrix<float16_t, 2, 3>((float16_t(0.0h)).xxx, (float16_t(0.0h)).xxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_d6faec();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_d6faec();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_d6faec();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x000002356649E890(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl
new file mode 100644
index 0000000..c7f7f4b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_d6faec() {
+  f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_d6faec();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_d6faec() {
+  f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_d6faec();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_d6faec() {
+  f16mat3x2 res = transpose(f16mat2x3(f16vec3(0.0hf), f16vec3(0.0hf)));
+}
+
+void compute_main() {
+  transpose_d6faec();
+}
+
+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/transpose/d6faec.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl
new file mode 100644
index 0000000..b4629d5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_d6faec() {
+  half3x2 res = transpose(half2x3(half3(0.0h), half3(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_d6faec();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_d6faec();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_d6faec();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm
new file mode 100644
index 0000000..a9f192c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_d6faec "transpose_d6faec"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+ %mat3v2half = OpTypeMatrix %v2half 3
+     %v3half = OpTypeVector %half 3
+ %mat2v3half = OpTypeMatrix %v3half 2
+         %19 = OpConstantNull %mat2v3half
+%_ptr_Function_mat3v2half = OpTypePointer Function %mat3v2half
+         %22 = OpConstantNull %mat3v2half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_d6faec = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat3v2half Function %22
+         %13 = OpTranspose %mat3v2half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_d6faec
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_d6faec
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_d6faec
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl
new file mode 100644
index 0000000..5e26944
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/d6faec.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_d6faec() {
+  var res : mat3x2<f16> = transpose(mat2x3<f16>(f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_d6faec();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_d6faec();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_d6faec();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl
new file mode 100644
index 0000000..706d3bd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn transpose(mat<2, 4, f16>) -> mat<4, 2, f16>
+fn transpose_faeb05() {
+  var res: mat4x2<f16> = transpose(mat2x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_faeb05();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_faeb05();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_faeb05();
+}
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a44dc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void transpose_faeb05() {
+  matrix<float16_t, 4, 2> res = transpose(matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_faeb05();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_faeb05();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_faeb05();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16ac417
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void transpose_faeb05() {
+  matrix<float16_t, 4, 2> res = transpose(matrix<float16_t, 2, 4>((float16_t(0.0h)).xxxx, (float16_t(0.0h)).xxxx));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  transpose_faeb05();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  transpose_faeb05();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  transpose_faeb05();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000019548DF3C90(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl
new file mode 100644
index 0000000..720b3fd
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_faeb05() {
+  f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+vec4 vertex_main() {
+  transpose_faeb05();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void transpose_faeb05() {
+  f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void fragment_main() {
+  transpose_faeb05();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void transpose_faeb05() {
+  f16mat4x2 res = transpose(f16mat2x4(f16vec4(0.0hf), f16vec4(0.0hf)));
+}
+
+void compute_main() {
+  transpose_faeb05();
+}
+
+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/transpose/faeb05.wgsl.expected.msl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl
new file mode 100644
index 0000000..ec6e27d
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void transpose_faeb05() {
+  half4x2 res = transpose(half2x4(half4(0.0h), half4(0.0h)));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  transpose_faeb05();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  transpose_faeb05();
+  return;
+}
+
+kernel void compute_main() {
+  transpose_faeb05();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm
new file mode 100644
index 0000000..eff9828
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+               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 %transpose_faeb05 "transpose_faeb05"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+ %mat4v2half = OpTypeMatrix %v2half 4
+     %v4half = OpTypeVector %half 4
+ %mat2v4half = OpTypeMatrix %v4half 2
+         %19 = OpConstantNull %mat2v4half
+%_ptr_Function_mat4v2half = OpTypePointer Function %mat4v2half
+         %22 = OpConstantNull %mat4v2half
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%transpose_faeb05 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_mat4v2half Function %22
+         %13 = OpTranspose %mat4v2half %19
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %transpose_faeb05
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %transpose_faeb05
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %transpose_faeb05
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl
new file mode 100644
index 0000000..795686f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/transpose/faeb05.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn transpose_faeb05() {
+  var res : mat4x2<f16> = transpose(mat2x4<f16>(f16(), f16(), f16(), f16(), f16(), f16(), f16(), f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  transpose_faeb05();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  transpose_faeb05();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  transpose_faeb05();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl
new file mode 100644
index 0000000..6874719
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn trunc(vec<3, f16>) -> vec<3, f16>
+fn trunc_103ab8() {
+  var res: vec3<f16> = trunc(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_103ab8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_103ab8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_103ab8();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..dd3ebec
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void trunc_103ab8() {
+  vector<float16_t, 3> res = trunc((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_103ab8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_103ab8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_103ab8();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e27ff8b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void trunc_103ab8() {
+  vector<float16_t, 3> res = trunc((float16_t(0.0h)).xxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_103ab8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_103ab8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_103ab8();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x0000022CEF83F530(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl
new file mode 100644
index 0000000..da7798a
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_103ab8() {
+  f16vec3 res = trunc(f16vec3(0.0hf));
+}
+
+vec4 vertex_main() {
+  trunc_103ab8();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void trunc_103ab8() {
+  f16vec3 res = trunc(f16vec3(0.0hf));
+}
+
+void fragment_main() {
+  trunc_103ab8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_103ab8() {
+  f16vec3 res = trunc(f16vec3(0.0hf));
+}
+
+void compute_main() {
+  trunc_103ab8();
+}
+
+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/trunc/103ab8.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl
new file mode 100644
index 0000000..1121743
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_103ab8() {
+  half3 res = trunc(half3(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  trunc_103ab8();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  trunc_103ab8();
+  return;
+}
+
+kernel void compute_main() {
+  trunc_103ab8();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm
new file mode 100644
index 0000000..e1a21cf
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %trunc_103ab8 "trunc_103ab8"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v3half = OpTypeVector %half 3
+         %17 = OpConstantNull %v3half
+%_ptr_Function_v3half = OpTypePointer Function %v3half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_103ab8 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v3half Function %17
+         %13 = OpExtInst %v3half %16 Trunc %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %trunc_103ab8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %trunc_103ab8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %trunc_103ab8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl
new file mode 100644
index 0000000..9422358
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/103ab8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn trunc_103ab8() {
+  var res : vec3<f16> = trunc(vec3<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_103ab8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_103ab8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_103ab8();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl
new file mode 100644
index 0000000..ef8b02b
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn trunc(vec<2, f16>) -> vec<2, f16>
+fn trunc_a56109() {
+  var res: vec2<f16> = trunc(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_a56109();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_a56109();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_a56109();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0cc0eb2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void trunc_a56109() {
+  vector<float16_t, 2> res = trunc((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_a56109();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_a56109();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_a56109();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..003cc1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void trunc_a56109() {
+  vector<float16_t, 2> res = trunc((float16_t(0.0h)).xx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_a56109();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_a56109();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_a56109();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000295C5ED1620(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl
new file mode 100644
index 0000000..d403886
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_a56109() {
+  f16vec2 res = trunc(f16vec2(0.0hf));
+}
+
+vec4 vertex_main() {
+  trunc_a56109();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void trunc_a56109() {
+  f16vec2 res = trunc(f16vec2(0.0hf));
+}
+
+void fragment_main() {
+  trunc_a56109();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_a56109() {
+  f16vec2 res = trunc(f16vec2(0.0hf));
+}
+
+void compute_main() {
+  trunc_a56109();
+}
+
+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/trunc/a56109.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl
new file mode 100644
index 0000000..19d67d9
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_a56109() {
+  half2 res = trunc(half2(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  trunc_a56109();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  trunc_a56109();
+  return;
+}
+
+kernel void compute_main() {
+  trunc_a56109();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm
new file mode 100644
index 0000000..5899e0f
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %trunc_a56109 "trunc_a56109"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v2half = OpTypeVector %half 2
+         %17 = OpConstantNull %v2half
+%_ptr_Function_v2half = OpTypePointer Function %v2half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_a56109 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v2half Function %17
+         %13 = OpExtInst %v2half %16 Trunc %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %trunc_a56109
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %trunc_a56109
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %trunc_a56109
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl
new file mode 100644
index 0000000..174127e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/a56109.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn trunc_a56109() {
+  var res : vec2<f16> = trunc(vec2<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_a56109();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_a56109();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_a56109();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl
new file mode 100644
index 0000000..0dccaa6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn trunc(f16) -> f16
+fn trunc_cc2b0d() {
+  var res: f16 = trunc(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_cc2b0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_cc2b0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_cc2b0d();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b268816
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void trunc_cc2b0d() {
+  float16_t res = trunc(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_cc2b0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_cc2b0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_cc2b0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..afe8dc6
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,36 @@
+SKIP: FAILED
+
+void trunc_cc2b0d() {
+  float16_t res = trunc(float16_t(0.0h));
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_cc2b0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_cc2b0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_cc2b0d();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,3-11): error X3000: unrecognized identifier 'float16_t'
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000176C0197D30(2,13-15): error X3000: unrecognized identifier 'res'
+
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl
new file mode 100644
index 0000000..257a571
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_cc2b0d() {
+  float16_t res = trunc(0.0hf);
+}
+
+vec4 vertex_main() {
+  trunc_cc2b0d();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void trunc_cc2b0d() {
+  float16_t res = trunc(0.0hf);
+}
+
+void fragment_main() {
+  trunc_cc2b0d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_cc2b0d() {
+  float16_t res = trunc(0.0hf);
+}
+
+void compute_main() {
+  trunc_cc2b0d();
+}
+
+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/trunc/cc2b0d.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl
new file mode 100644
index 0000000..b2c50aa
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_cc2b0d() {
+  half res = trunc(0.0h);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  trunc_cc2b0d();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  trunc_cc2b0d();
+  return;
+}
+
+kernel void compute_main() {
+  trunc_cc2b0d();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm
new file mode 100644
index 0000000..49a49a20
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.spvasm
@@ -0,0 +1,71 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 33
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %15 = OpExtInstImport "GLSL.std.450"
+               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 %trunc_cc2b0d "trunc_cc2b0d"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+         %16 = OpConstantNull %half
+%_ptr_Function_half = OpTypePointer Function %half
+         %19 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_cc2b0d = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_half Function %16
+         %13 = OpExtInst %half %15 Trunc %16
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %19
+         %21 = OpLabel
+         %22 = OpFunctionCall %void %trunc_cc2b0d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %24 = OpLabel
+         %25 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %25
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %trunc_cc2b0d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %trunc_cc2b0d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl
new file mode 100644
index 0000000..a20cd36
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/cc2b0d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn trunc_cc2b0d() {
+  var res : f16 = trunc(f16());
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_cc2b0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_cc2b0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_cc2b0d();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl
new file mode 100644
index 0000000..bae66be
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 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 f16;
+
+// fn trunc(vec<4, f16>) -> vec<4, f16>
+fn trunc_ce7c17() {
+  var res: vec4<f16> = trunc(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_ce7c17();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_ce7c17();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_ce7c17();
+}
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..83e63a1
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.dxc.hlsl
@@ -0,0 +1,30 @@
+void trunc_ce7c17() {
+  vector<float16_t, 4> res = trunc((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_ce7c17();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_ce7c17();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_ce7c17();
+  return;
+}
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..08aa6d3
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+SKIP: FAILED
+
+void trunc_ce7c17() {
+  vector<float16_t, 4> res = trunc((float16_t(0.0h)).xxxx);
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  trunc_ce7c17();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  trunc_ce7c17();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  trunc_ce7c17();
+  return;
+}
+FXC validation failure:
+D:\Projects\RampUp\dawn\test\tint\builtins\Shader@0x00000235C1E68810(2,10-18): error X3000: syntax error: unexpected token 'float16_t'
+
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl
new file mode 100644
index 0000000..1ab86a5
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_ce7c17() {
+  f16vec4 res = trunc(f16vec4(0.0hf));
+}
+
+vec4 vertex_main() {
+  trunc_ce7c17();
+  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
+#extension GL_AMD_gpu_shader_half_float : require
+precision mediump float;
+
+void trunc_ce7c17() {
+  f16vec4 res = trunc(f16vec4(0.0hf));
+}
+
+void fragment_main() {
+  trunc_ce7c17();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+#extension GL_AMD_gpu_shader_half_float : require
+
+void trunc_ce7c17() {
+  f16vec4 res = trunc(f16vec4(0.0hf));
+}
+
+void compute_main() {
+  trunc_ce7c17();
+}
+
+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/trunc/ce7c17.wgsl.expected.msl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl
new file mode 100644
index 0000000..bbb5f1e
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void trunc_ce7c17() {
+  half4 res = trunc(half4(0.0h));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner() {
+  trunc_ce7c17();
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main() {
+  float4 const inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main() {
+  trunc_ce7c17();
+  return;
+}
+
+kernel void compute_main() {
+  trunc_ce7c17();
+  return;
+}
+
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm
new file mode 100644
index 0000000..2eecaa2
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.spvasm
@@ -0,0 +1,72 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 34
+; Schema: 0
+               OpCapability Shader
+               OpCapability Float16
+               OpCapability UniformAndStorageBuffer16BitAccess
+               OpCapability StorageBuffer16BitAccess
+               OpCapability StorageInputOutput16
+         %16 = OpExtInstImport "GLSL.std.450"
+               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 %trunc_ce7c17 "trunc_ce7c17"
+               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
+      %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
+       %void = OpTypeVoid
+          %9 = OpTypeFunction %void
+       %half = OpTypeFloat 16
+     %v4half = OpTypeVector %half 4
+         %17 = OpConstantNull %v4half
+%_ptr_Function_v4half = OpTypePointer Function %v4half
+         %20 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%trunc_ce7c17 = OpFunction %void None %9
+         %12 = OpLabel
+        %res = OpVariable %_ptr_Function_v4half Function %17
+         %13 = OpExtInst %v4half %16 Trunc %17
+               OpStore %res %13
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %20
+         %22 = OpLabel
+         %23 = OpFunctionCall %void %trunc_ce7c17
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %9
+         %25 = OpLabel
+         %26 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %26
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %9
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %trunc_ce7c17
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %9
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %trunc_ce7c17
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl
new file mode 100644
index 0000000..0004a8c
--- /dev/null
+++ b/test/tint/builtins/gen/literal/trunc/ce7c17.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+enable f16;
+
+fn trunc_ce7c17() {
+  var res : vec4<f16> = trunc(vec4<f16>(f16()));
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  trunc_ce7c17();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  trunc_ce7c17();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  trunc_ce7c17();
+}